TITLE:: FMHEncode1
summary:: Second Order Ambisonic encoder
categories:: Libraries>JoshUGens, UGens>Multichannel>Ambisonics
related:: Classes/FMHDecode1, Classes/FMHEncode2
keyword:: JoshUGens

DESCRIPTION::


CLASSMETHODS::

METHOD:: ar
(describe argument here)

ARGUMENT:: in

ARGUMENT:: azimuth
In radians, -pi to pi.

ARGUMENT:: elevation
In radians, -0.5pi to +0.5pi.

ARGUMENT:: rho
The speaker radius (1 places shound at the radius, <1 within the radius, >1 is outside the radius) beyond the radius, a distance scaling is applied (no filtering is done).

ARGUMENT:: gain
A control rate level input.

ARGUMENT:: wComp
Chooses how the W channels is scaled. If 0, a scaler of 0.707 is used. If 1, W is varied according to the scaling of the X, Y, Z, R, S, T, U, and V channels. 1 is the default.

note:: Output channels are in order W,X,Y,Z, R, S, T, U, V.
Because of the way the W component is scaled, it is recommended that you only decode with FMHDecode1 and it's methods.::


INSTANCEMETHODS::

METHOD:: init


EXAMPLES::

code::
s.boot;

(
{
	var w, x, y, z, r, s, t, u, v;
	#w, x, y, z, r, s, t, u, v =
		FMHEncode1.ar(WhiteNoise.ar.dup,MouseX.kr(0, 2pi), MouseY.kr(-0.5pi, 0.5pi) + [0, 0.5pi], 1, 0.3).sum;
	FMHDecode1.cube(w, x, y, z, s, t, v);
}.scope(8);
)
::
