TITLE:: BFManipulate
summary:: BFormat sound manipulation
categories:: Libraries>JoshUGens, UGens>Multichannel>Ambisonics
related:: Classes/BFDecode1, Classes/BFEncode1, Classes/BFEncode2, Classes/BFEncodeSter
keyword:: JoshUGens

DESCRIPTION::
Manipulates the entire soundfiled of a BFormat signal around an the x-, y-, or z-axis.

CLASSMETHODS::

METHOD:: ar


ARGUMENT:: w
B-format signal.

ARGUMENT:: x
B-format signal.

ARGUMENT:: y
B-format signal.

ARGUMENT:: z
B-format signal.

ARGUMENT:: rotate
Rotate the soundfiled around the z-axis (left to right) in radians.

ARGUMENT:: tilt
Rotate about the x- axis (clock-wise and counter-clock-wise) in radians.

ARGUMENT:: tumble
Rotate about the y axis (up and down) in radians.



INSTANCEMETHODS::

METHOD:: checkInputs


METHOD:: init


EXAMPLES::

code::
s.boot;
(
{
	var w, x, y, z, p, a, b, c, d;

	p = Resonz.ar(PinkNoise.ar(100), 440, 0.01) *
		LFSaw.kr(2, pi, -0.2, 0.2); // source
	q = Resonz.ar(PinkNoise.ar(100), 330, 0.01) *
		LFSaw.kr(2, pi, -0.2, 0.2); // source

	// B-format encode
	#w, x, y, z = BFEncode1.ar(p, -0.25pi, 1) +
		BFEncode1.ar(DelayC.ar(q, 0.2, 0.2), 0.25pi, 1);

	#a, b, c, d = BFManipulate.ar(w, x, y, z,
		MouseX.kr(-pi, pi), 0, MouseY.kr(-pi, pi));
	// B-format decode to cube / quad
	BFDecode1.ar(a, b, c, d,
		[-0.25pi, 0.25pi, 0.75pi, 1.25pi,-0.25pi, 0.25pi, 0.75pi, 1.25pi],
		[0.25pi,0.25pi,0.25pi,0.25pi,-0.25pi,-0.25pi,-0.25pi,-0.25pi,]);
}.scope(8);
)
::
