ambisonictoolkit / atk-sc3

An extension library for the SuperCollider programming language
GNU General Public License v3.0
74 stars 12 forks source link

add: Zotter, et al., diffuse field radius #140

Open joslloand opened 1 month ago

joslloand commented 1 month ago

Diffuse Sound Field Synthesis

"... approximate radial limit of an error-free sweet area...", eq. 65

// return diffuse field radius from decoding radius
~diffRadius = { |decRadius = (AtkHoa.refRadius), order = (AtkHoa.defaultOrder)|
    order / (order + 1) * decRadius
}

Classes:

Method name(s)?:

joslloand commented 1 month ago

HoaRadius is concerned with the effective soundfield resynthesis radius, so it may not be suitable to include a method here, as we may run the risk of confusing the radius of exact reproduction with the diffuse field synthesis radius.

HoaOrder is likely the ideal class, as we could also include(?):

a method returning the target array size given a desired diffuse field radius.

NOTE: this could be used in conjunction with HoaRadius to match a given desired effective radius.

// return decoding radius from diffuse field radius
~decRadius = { |diffRadius = (AtkHoa.refRadius), order = (AtkHoa.defaultOrder)|
        (order + 1) / order * diffRadius
}
joslloand commented 1 month ago

... for naming, review ATK Code Style Guidelines