Skip to content

Commit

Permalink
ATK: update Help to -degrad & -raddeg methods
Browse files Browse the repository at this point in the history
Update Help examples to use -degrad & -raddeg methods rather than
explicit conversion by * pi/180 & * 180/pi
  • Loading branch information
joslloand committed Jul 2, 2016
1 parent cd94bba commit 55024fd
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 72 deletions.
36 changes: 18 additions & 18 deletions source/ATK/sc/HelpSource/Classes/FoaDecode.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

(
{
Expand All @@ -86,7 +86,7 @@ code::
// hard right = back
azim = MouseX.kr(pi, -pi);


// ------------------------------------------------------------
// test sig
sig = PinkNoise.ar; // mono pink noise
Expand Down Expand Up @@ -147,7 +147,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

(
{
Expand All @@ -168,7 +168,7 @@ code::
// hard right = back
azim = MouseX.kr(pi, -pi);


// ------------------------------------------------------------
// test sig
sig = PinkNoise.ar; // mono pink noise
Expand Down Expand Up @@ -201,7 +201,7 @@ subsection:: Synthetic binaural decoder

The Ambisonic Tookit provides a synthetic spherical head model HRTF decoder. footnote::See: R. O. Duda, "Modeling head related transfer functions," in Proceedings of the Twenty-Seventh Annual Asilomar Conference on Signals, Systems and Computers, Asilomar, CA, 1993.:: Ten subjects with varying head sizes are available. Audition to find one that works best for you.

Additionally, HRTF decoders computed from measured HRIRs are also available: link::Classes/FoaDecoderKernel#*newListen:: & link::Classes/FoaDecoderKernel#*newCIPIC::.
Additionally, HRTF decoders computed from measured HRIRs are also available: link::Classes/FoaDecoderKernel#*newListen:: & link::Classes/FoaDecoderKernel#*newCIPIC::.


note:: A kernel type decoder, see link::Classes/FoaDecoderKernel#*newSpherical:: for further details.::
Expand Down Expand Up @@ -229,7 +229,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

(
{
Expand All @@ -250,7 +250,7 @@ code::
// hard right = back
azim = MouseX.kr(pi, -pi);


// ------------------------------------------------------------
// test sig
sig = PinkNoise.ar; // mono pink noise
Expand Down Expand Up @@ -308,7 +308,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

(
{
Expand All @@ -329,7 +329,7 @@ code::
// hard right = back
azim = MouseX.kr(pi, -pi);


// ------------------------------------------------------------
// test sig
sig = PinkNoise.ar; // mono pink noise
Expand Down Expand Up @@ -385,7 +385,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

(
{
Expand Down Expand Up @@ -534,7 +534,7 @@ subsection:: Psychoacoustically optimised quadraphonic decoder

The decoder presented here is an example of a dual-band ( code::'dual':: ) psychoacoustically optmisied, near-field compensated decoder described by Gerzon. footnote::M. A. Gerzon, "Multi-system ambisonic decoder," Wireless World, pp. 43-47, 69-73, July/Aug. 1977.:: This sort of decoder is considered the ideal for first order Ambisonics, meeting all the criteria outlined by Gerzon to qualify as Ambisonic, footnote::E. Benjamin, R. Lee, and A. Heller, "Is My Decoder Ambisonic?," in Proceedings of the 125th Audio Engineering Society Convention, San Francisco, 2008.:: and is the choice for critical studio listening.

Additionally, this decode is rendered as a 'narrow quadraphonic' layout, with loudspeaker angles at code:: [ 30.0, 150.0, -150.0, -30.0 ] ::. For studio based work, this can be convenient, as the front pair is at the correct angle for two channel stereo monitoring. The narrow layout gives increased localisation and stabilised images at front and back, at the expense of reduced stability at the sides.
Additionally, this decode is rendered as a 'narrow quadraphonic' layout, with loudspeaker angles at code:: [ 30.0, 150.0, -150.0, -30.0 ] ::. For studio based work, this can be convenient, as the front pair is at the correct angle for two channel stereo monitoring. The narrow layout gives increased localisation and stabilised images at front and back, at the expense of reduced stability at the sides.

Near-field compensation, filtering for the near-field effects of loudspeaker placement, is made through the use of link::Classes/FoaNFC::.

Expand Down Expand Up @@ -562,7 +562,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg
~distance

(
Expand Down Expand Up @@ -616,7 +616,7 @@ code::

subsection:: ITU 5.0 decoder

The Ambisonic Toolkit includes link::http://www.brucewiggins.co.uk/?page_id=78##Bruce Wiggins':: optimised ITU 5.0 decoders. footnote::Irregular decoders in the Ambisonic Toolkit are kindly provided by Bruce Wiggins: link::http://www.brucewiggins.co.uk/::. See also: B. Wiggins, I. Paterson-Stephens, V. Lowndes, and S. Berry, "The design and optimisation of surround sound decoders using heuristic methods," in Proceedings of UKSIM 2003: Conference on Computer Simulation, Cambridge, England, 2003.::
The Ambisonic Toolkit includes link::http://www.brucewiggins.co.uk/?page_id=78##Bruce Wiggins':: optimised ITU 5.0 decoders. footnote::Irregular decoders in the Ambisonic Toolkit are kindly provided by Bruce Wiggins: link::http://www.brucewiggins.co.uk/::. See also: B. Wiggins, I. Paterson-Stephens, V. Lowndes, and S. Berry, "The design and optimisation of surround sound decoders using heuristic methods," in Proceedings of UKSIM 2003: Conference on Computer Simulation, Cambridge, England, 2003.::

note:: A matrix type decoder, see link::Classes/FoaDecoderMatrix#*new5_0:: for further details.::

Expand All @@ -640,7 +640,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

(
{
Expand All @@ -663,7 +663,7 @@ code::
// hard right = back
azim = MouseX.kr(pi, -pi);


// ------------------------------------------------------------
// test sig
sig = PinkNoise.ar; // mono pink noise
Expand Down Expand Up @@ -719,7 +719,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

(
{
Expand Down Expand Up @@ -793,7 +793,7 @@ code::
// define encoder / decoder matrices
~encoder = FoaEncoderMatrix.newOmni
~decoder = FoaDecoderMatrix.newDiametric(
pi/180 * [[30, 0], [-30, 0], [90, 35.3], [-90, 35.3]],
[[30, 0], [-30, 0], [90, 35.3], [-90, 35.3]].degrad,
'dual'
)
~distance = 1.2 // louspeaker distance, for NFC, in meters
Expand All @@ -805,7 +805,7 @@ code::

~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg
~distance

(
Expand Down
4 changes: 2 additions & 2 deletions source/ATK/sc/HelpSource/Classes/FoaDecoderKernel.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ code::
~decoder = FoaDecoderKernel.newUHJ

// inspect
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

// don't forget to free!!
~decoder.free
Expand All @@ -219,7 +219,7 @@ code::
~decoder = FoaDecoderKernel.newCIPIC

// inspect
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

// don't forget to free!!
~decoder.free
Expand Down
28 changes: 14 additions & 14 deletions source/ATK/sc/HelpSource/Classes/FoaDecoderMatrix.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ code::
~decoder = FoaDecoderMatrix.newStereo(~angle, ~pattern)

// Cardioids at 131 deg
~angle = 131/2 * pi/180
~angle = (131/2).degrad
~pattern = 0.5
~decoder = FoaDecoderMatrix.newStereo(~angle, ~pattern)

// Super-cardioids at 115 deg
~angle = 115/2 * pi/180
~angle = (115/2).degrad
~pattern = 0.63
~decoder = FoaDecoderMatrix.newStereo(~angle, ~pattern)

// Hyper-cardioids at 105 deg
~angle = 105/2 * pi/180
~angle = (105/2).degrad
~pattern = 0.75
~decoder = FoaDecoderMatrix.newStereo(~angle, ~pattern)

Expand Down Expand Up @@ -217,23 +217,23 @@ code::
// [ 30, -30, -150, 150 ]

// specify 1/2 the desired directions
~directions = pi/180 * [ 30, -30 ];
~directions = [ 30, -30 ].degrad;
~decoder = FoaDecoderMatrix.newDiametric(~directions);

// inspect
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg
::
code::
// Periphonic (3D) decoder with eight channels arranged in a bi-rectangle:
// [ [ 30, 0 ], [ -30, 0 ], [ 90, 35.3 ], [ -90, 35.3 ],
// [ -150, -0 ], [ 150, -0 ], [ -90, -35.3 ], [ 90, -35.3 ] ]

// specify 1/2 the desired directions
~directions = pi/180 * [ [ 30, 0 ], [ -30, 0 ], [ 90, 35.3 ], [ -90, 35.3] ];
~directions = [[ 30, 0 ], [ -30, 0 ], [ 90, 35.3 ], [ -90, 35.3]].degrad;
~decoder = FoaDecoderMatrix.newDiametric(~directions);

// inspect
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg
::

Please see link::#decoder_k:: for further discussion on strong::k::.
Expand Down Expand Up @@ -292,7 +292,7 @@ code::
// inspect
~decoder.kind
~decoder.numChannels
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg

(
{
Expand Down Expand Up @@ -482,33 +482,33 @@ code::
~decoder = FoaDecoderMatrix.newQuad(pi/6)

// inspect
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg
::

code::
// decoder (two rings of 6)
~decoder = FoaDecoderMatrix.newPeri(6)

// inspect
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg
::

code::
// Pantophonic (2D) decoder with four channels arranged in a rectangle:
~directions = pi/180 * [ 30, -30 ]
~directions = [ 30, -30 ].degrad
~decoder = FoaDecoderMatrix.newDiametric(~directions)

// inspect
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg
::

code::
// Periphonic (3D) decoder with eight channels arranged in a bi-rectangle:
~directions = pi/180 * [ [ 30, 0 ], [ -30, 0 ], [ 90, 35.3 ], [ -90, 35.3] ]
~directions = [[ 30, 0 ], [ -30, 0 ], [ 90, 35.3 ], [ -90, 35.3]].degrad
~decoder = FoaDecoderMatrix.newDiametric(~directions)

// inspect
~decoder.dirChannels * 180/pi
~decoder.dirChannels.raddeg
::


Expand Down
20 changes: 10 additions & 10 deletions source/ATK/sc/HelpSource/Classes/FoaEncode.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ code::
// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg


// read a whole sound into memory
Expand Down Expand Up @@ -433,7 +433,7 @@ code::
// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg

(
{
Expand Down Expand Up @@ -509,7 +509,7 @@ code::
// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg


// read a whole sound into memory
Expand Down Expand Up @@ -587,7 +587,7 @@ code::
// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg


// read a whole sound into memory
Expand Down Expand Up @@ -667,7 +667,7 @@ code::
// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg


// read a whole sound into memory
Expand Down Expand Up @@ -747,7 +747,7 @@ code::
// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg


// read a whole sound into memory
Expand Down Expand Up @@ -832,7 +832,7 @@ code::
// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg


// read a whole sound into memory
Expand Down Expand Up @@ -904,7 +904,7 @@ code::
// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg


// read a whole sound into memory
Expand Down Expand Up @@ -967,14 +967,14 @@ code::


// define encoder matrix
~directions = pi / 180 * [ [ 22.5, 0 ], [ -22.5, 0 ], [ 67.5, 0 ], [ -67.5, 0 ], [ 112.5, 0 ], [ -112.5, 0 ], [ 157.5, 0 ], [ -157.5, 0 ], [ 45, 45 ], [ -45, 45 ], [ -135, 45 ], [ 135, 45 ] ]
~directions = [ [ 22.5, 0 ], [ -22.5, 0 ], [ 67.5, 0 ], [ -67.5, 0 ], [ 112.5, 0 ], [ -112.5, 0 ], [ 157.5, 0 ], [ -157.5, 0 ], [ 45, 45 ], [ -45, 45 ], [ -135, 45 ], [ 135, 45 ] ].degrad
~encoder = FoaEncoderMatrix.newDirections(~directions)


// inspect
~encoder.kind
~encoder.numChannels
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg


// read a whole sound into memory
Expand Down
6 changes: 3 additions & 3 deletions source/ATK/sc/HelpSource/Classes/FoaEncoderKernel.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ code::
~encoder = FoaEncoderKernel.newSuper

// inspect
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg

// don't forget to free!!
~encoder.free
Expand All @@ -168,7 +168,7 @@ code::
~encoder = FoaEncoderKernel.newUHJ

// inspect
~encoder.dirChannels * 180/pi
~encoder.dirChannels.raddeg

// don't forget to free!!
~encoder.free
Expand Down Expand Up @@ -246,4 +246,4 @@ list::

EXAMPLES::

Please see link::Classes/FoaEncode#Examples::.
Please see link::Classes/FoaEncode#Examples::.
Loading

0 comments on commit 55024fd

Please sign in to comment.