diff --git a/source/JoshUGens/sc/help/AtsAmp.html b/source/JoshUGens/sc/help/AtsAmp.html deleted file mode 100644 index bc4f78354f..0000000000 --- a/source/JoshUGens/sc/help/AtsAmp.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - -

AtsFreq / AtsAmp Use Freq and Amp data from a given partial

-

AtsParInfo One UGen to return both Amp and Freq info

-


-

AtsFreq.kr(atsbuffer partialNum, filePointer, mul, add);

-


-

- returns frequency information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-


-

AtsAmp.kr(atsbuffer, partialNum, filePointer, mul, add);

-


-

- returns amplitude information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-

-

AtsParInfo.kr(atsbuffer, partialNum, filePointer, mul, add);

-


-

- returns amplitude and freq information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-

-

-

Usage

-

 

-

For resynthesis purposes, an ATS file needs to be loaded into a buffer.  When loading an ATS file, you need to supply a buffer number to store ATS data in.

-


-

s.boot;

-


-

a = AtsFile.new("sounds/a11wlk01.ats").load;

-


-

( //use freq and amp information for a filter ugen (just the first 30 partials)

-

{

-

var noise, freqs, amps, partials;

-

partials = Array.series(30, 1, 1);

-

// outputs an array of 30 freq values;

-

freqs = AtsFreq.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// outputs an array of 30 amp values

-

amps = AtsAmp.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// feed these into a reson filter, mix down to one channel

-

Mix.ar(Resonz.ar(WhiteNoise.ar(20), freqs, 0.01, amps));

-

}.play(s);

-

);

-


-

( //use freq and amp information for a filter ugen (just the first 30 partials)

-

{

-

var noise, freqs, amps, freqs1, amps1, partials, out;

-

partials = Array.series(30, 1, 1);

-

// outputs an array of 30 freq values;

-

out = AtsParInfo.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// need to flop the array output

-

#amps, freqs = out.flop;

-

// outputs an array of 30 amp values

-

// feed these into a reson filter, mix down to one channel

-

Mix.ar(Resonz.ar(WhiteNoise.ar(20), freqs, 0.01, amps ));

-

}.play(s);

-

);

- - diff --git a/source/JoshUGens/sc/help/AtsFile.html b/source/JoshUGens/sc/help/AtsFile.html deleted file mode 100644 index 672976c9e4..0000000000 --- a/source/JoshUGens/sc/help/AtsFile.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - -

AtsFile For working with ATS file data

-


-


-

Working with ATS files

-


-

ATS (Analysis-Transformation-Synthesis) files are analysis files created using Oscar DeLiscia, Juan Pampin and Pete Moss's atsa command-line analysis tool (available at http://www.dxarts.washington.edu/ats). The analysis of the sound first attemps to track and record frequency data into sinusoidal partials.  Then, any sound that couldn't be analyzed into partial information is analyzed as noise information. The information can then be tranformed and resynthesized using this information.

-


-

Once installed, type atsa at the command line to see flag options and usage.

-


-

An example from within the SuperCollider_f directory:

-


-

atsa sounds/a11wlk01.wav  sounds/a11wlk01.ats -H5000

-

-

-H5000 limits the analysis to frequencies below 5kHz.

-


-

Class Methods

-


-

Loading an ATS file with AtsFile

-


-

*new(path, server) - load an ATS file into memory at path with buffer number bufnum.  server defaults to Server.default. 

-


-

a = AtsFile.new("sounds/a11wlk01.ats");

-

-

Instance Methods

-


-

load(buffer) - loads the information of the ATS file into a buffer for use by the AtsSynth UGens. If buffer is nil, one will be allocated for you. Only for real-time usage.

-


-

a.load;

-

-

freeBuffer - releases the ATS buffer

-


-

info - returns info about the ATS object

-


-

getParFreq(par) - returns an array of frequencies of partial number par (starting with 0) per frame of analysis.

-


-

getParAmp(par) - returns an array of amplitudes of partial number par (starting with 0) per frame of analysis.

-


-

getFrameFreq(frame) - returns an array of frequenciesfor a given frame (starting with 0).

-


-

getFrameAmp(frame) - returns an array of frequenciesfor a given frame (starting with 0).

-


-

saveForSC(path) - save the ATS file as an AIFF that can be loaded into a buffer (for NRT and fast loading file data in real-time)

-


-

 

- - diff --git a/source/JoshUGens/sc/help/AtsFreq.html b/source/JoshUGens/sc/help/AtsFreq.html deleted file mode 100644 index 06c53ba690..0000000000 --- a/source/JoshUGens/sc/help/AtsFreq.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - -

AtsFreq / AtsAmp Use Freq and Amp data from a given partial

-

AtsParInfo One UGen to return both Amp and Freq info

-


-

AtsFreq.kr(atsbuffer partialNum, filePointer, mul, add);

-


-

- returns frequency information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-


-

AtsAmp.kr(atsbuffer, partialNum, filePointer, mul, add);

-


-

- returns amplitude information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-

-

AtsParInfo.kr(atsbuffer, partialNum, filePointer, mul, add);

-


-

- returns amplitude and freq information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-

-

-

Usage

-

 

-

For resynthesis purposes, an ATS file needs to be loaded into a buffer.  When loading an ATS file, you need to supply a buffer number to store ATS data in.

-


-

s.boot;

-


-

a = AtsFile.new("sounds/a11wlk01.ats").load;

-


-

( //use freq and amp information for a filter ugen (just the first 30 partials)

-

{

-

var noise, freqs, amps, partials;

-

partials = Array.series(30, 1, 1);

-

// outputs an array of 30 freq values;

-

freqs = AtsFreq.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// outputs an array of 30 amp values

-

amps = AtsAmp.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// feed these into a reson filter, mix down to one channel

-

Mix.ar(Resonz.ar(WhiteNoise.ar(20), freqs, 0.01, amps));

-

}.play(s);

-

);

-


-

( //use freq and amp information for a filter ugen (just the first 30 partials)

-

{

-

var noise, freqs, amps, freqs1, amps1, partials, out;

-

partials = Array.series(30, 1, 1);

-

// outputs an array of 30 freq values;

-

out = AtsParInfo.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// need to flop the array output

-

#amps, freqs = out.flop;

-

// outputs an array of 30 amp values

-

// feed these into a reson filter, mix down to one channel

-

Mix.ar(Resonz.ar(WhiteNoise.ar(20), freqs, 0.01, amps ));

-

}.play(s);

-

);

- - diff --git a/source/JoshUGens/sc/help/AtsNoiSynth.html b/source/JoshUGens/sc/help/AtsNoiSynth.html deleted file mode 100644 index 5248255b8f..0000000000 --- a/source/JoshUGens/sc/help/AtsNoiSynth.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - -

AtsNoiSynth Resynthesize sine and noise data from an ATS analysis file

-


-

AtsNoiSynth.ar(atsbuffer, numPartials, partialStart, partialSkip, filePointer, sinePct, noisePct, freqMul,

-

freqAdd, numBands, bandStart, bandSkip, mul, add)

-

-

- resynthesizes information from an ATS file, with transformations.

-


-

atsbuffer -  the buffer number that contains the AtsFile information

-

numPartials - the number of partials to synthesize

-

partialStart - the partial in the analysis to start the synthesis on. Partial 0 is the first partial.

-

partialSkip - an integer that indicates the increment from partialStart of which partials to synthesize.

-

filePointer - a value (between 0 and 1) that indicates which part of the file to synthesize.  Accepts ugens 

-

or a static value.

-

sinePct - a scaler on the sinusoidal portion of the resynthesis.

-

noisePct - a scaler on the noise portion of the resynthesis.

-

freqMul - a multiplier on the sinusoidal frequency information.

-

freqAdd - a value to add to frequency information.

-

numBands - the number of critical bands (noise) to synthesize.  There are 25 critical bands.

-

bandStart - the critical band to start resynthesis on. Partial 0 is the first band.

-

bandSkip - an integer that indicates the increment from bandStart of which bands to synthesize.

-

-

**WARNING** If you try to resynthesize partials or bands that don't exist, those partials will fail silently.  All valid partials will still be synthesized.

-


-

Usage

-

 

-

For resynthesis purposes, an ATS file needs to be loaded into a buffer.  When loading an ATS file, you need to supply a buffer number to store ATS data in.

-


-

s.boot;

-


-

a = AtsFile.new("sounds/a11wlk01.ats").load;

-


-

( //play just the resynth, with LFSaw pointing into the file

-

{

-

AtsNoiSynth.ar(a.bufnum, a.numPartials, 1, 1, 

-

filePointer: LFSaw.kr(a.sndDur.reciprocal, 1, 0.5, 0.5), noisePct: 1, mul: 1)

-

}.play(s);

-

);

-


-

( //play noise only, don't resynthesize sine info

-

{

-

AtsNoiSynth.ar(a.bufnum, 0, 0, 1, filePointer: LFSaw.kr(a.sndDur.reciprocal, 1, 0.5, 0.5), mul: 1)

-

}.play(s);

-

);

-


-

( //resynthesize every other noise band

-

{

-

AtsNoiSynth.ar(a.bufnum, 0, 0, 1, filePointer: LFSaw.kr(a.sndDur.reciprocal, 1, 0.5, 0.5), 

-

numBands: 12, bandStart: 1, bandSkip: 2, mul: 10)

-

}.play(s);

-

);

-


-

( //resynthesize only the upper bands of noise

-

{

-

AtsNoiSynth.ar(a.bufnum, 0, 0, 1, filePointer: LFSaw.kr(a.sndDur.reciprocal, 1, 0.5, 0.5), 

-

numBands: 12, bandStart: 12, bandSkip: 1, mul: 10)

-

}.play(s);

-

)

-


- - diff --git a/source/JoshUGens/sc/help/AtsParInfo.html b/source/JoshUGens/sc/help/AtsParInfo.html deleted file mode 100644 index bc4f78354f..0000000000 --- a/source/JoshUGens/sc/help/AtsParInfo.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - -

AtsFreq / AtsAmp Use Freq and Amp data from a given partial

-

AtsParInfo One UGen to return both Amp and Freq info

-


-

AtsFreq.kr(atsbuffer partialNum, filePointer, mul, add);

-


-

- returns frequency information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-


-

AtsAmp.kr(atsbuffer, partialNum, filePointer, mul, add);

-


-

- returns amplitude information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-

-

AtsParInfo.kr(atsbuffer, partialNum, filePointer, mul, add);

-


-

- returns amplitude and freq information for a given partial

-


-

partialNumber - the number of the partial to return frequency data for.  Partial 0 is the first partial.

-

-

-

Usage

-

 

-

For resynthesis purposes, an ATS file needs to be loaded into a buffer.  When loading an ATS file, you need to supply a buffer number to store ATS data in.

-


-

s.boot;

-


-

a = AtsFile.new("sounds/a11wlk01.ats").load;

-


-

( //use freq and amp information for a filter ugen (just the first 30 partials)

-

{

-

var noise, freqs, amps, partials;

-

partials = Array.series(30, 1, 1);

-

// outputs an array of 30 freq values;

-

freqs = AtsFreq.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// outputs an array of 30 amp values

-

amps = AtsAmp.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// feed these into a reson filter, mix down to one channel

-

Mix.ar(Resonz.ar(WhiteNoise.ar(20), freqs, 0.01, amps));

-

}.play(s);

-

);

-


-

( //use freq and amp information for a filter ugen (just the first 30 partials)

-

{

-

var noise, freqs, amps, freqs1, amps1, partials, out;

-

partials = Array.series(30, 1, 1);

-

// outputs an array of 30 freq values;

-

out = AtsParInfo.kr(a.bufnum, partials, MouseX.kr(0, 1));

-

// need to flop the array output

-

#amps, freqs = out.flop;

-

// outputs an array of 30 amp values

-

// feed these into a reson filter, mix down to one channel

-

Mix.ar(Resonz.ar(WhiteNoise.ar(20), freqs, 0.01, amps ));

-

}.play(s);

-

);

- - diff --git a/source/JoshUGens/sc/help/BFDecode1.html b/source/JoshUGens/sc/help/BFDecode1.html deleted file mode 100644 index 47bacded0b..0000000000 --- a/source/JoshUGens/sc/help/BFDecode1.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - -

BFDecode1 3D Ambisonic decoder

-


-

BFDecode1.ar(w, x, y, z, azimuth, elevation, wComp)

-


-

Decode a two dimensional ambisonic B-format signal for any speaker arrangement

-

w, x, y, z - the B-format signals. All of these MUST be audio rate signals. If you want to zero one out, use

-

K2A.ar(0).

-

azimuth - the angle from 0pi front and center of the speaker.  Can be an array of angles.

-

elevation - the angle from 0pi center of the speaker.  Can be an array of angles.

-

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 and Z channels. 1 is the default.

-


-


-

Because of the way the W component is scaled, it is recommended that you only decode with BFEncode signals with BFDecode1 and it's methods.

-


-

s=Server.internal.boot;

-

(

-

{

-

var w, x, y, z, p, a, b, c, d;

-

-

p = PinkNoise.ar; // source

-

-

// B-format encode

-

#w, x, y, z = BFEncode1.ar(p, MouseX.kr(-pi, pi), MouseY.kr(0.25pi, -0.25pi), 1); 

-

-

// B-format decode to cube / quad ([lfh, rfh, rrh, lrh, lfl, rfl, rrl, lrl])

-

// lfl = left fron high, lfl = left front low etc...

-

BFDecode1.ar(w, x, y, z, 

-

[-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);

-

)

-


-

3D Ambisonic decoder with compensation for speakers at different distances (delay and intenisty caluclated for meters)

-


-


-


-

BFDecode1.ar1(w, x, y, z, azimuth, elevation, maxDist, distance)

-


-

Decode a two dimensional ambisonic B-format signal for any speaker arrangement

-

w, x, y, z - the B-format signals. 

-

azimuth - the angle from 0pi front and center of the speaker.  Can be an array of angles.

-

elevation - the angle from 0pi center of the speaker.  Can be an array of angles.

-

maxDist - the distance (in meters) to the furthest speaker from center (this allocates the delay size)

-

distance - the distance (in meteres) to each speaker.

-

scaleflag - if 1, apply amplitude scaling to the closest signals to match more distant speakers

-


-

s=Server.internal.boot;

-

(

-

{

-

var w, x, y, z, p;

-

-

p = PinkNoise.ar(1) * LFSaw.kr(2, pi, -0.2, 0.2); // source

-

-

// B-format encode

-

#w, x, y, z = BFEncode1.ar(p, MouseX.kr(-0.5pi, 0.5pi), 0, 1); 

-

-

// B-format decode to stereo with speakers at different distances

-

BFDecode1.ar1(w, x, y, z, [-0.25pi, 0.25pi], 0, 10, [MouseY.kr(5, 10), 10]);

-

-

}.scope(2);

-

)

- - diff --git a/source/JoshUGens/sc/help/BFEncode1.html b/source/JoshUGens/sc/help/BFEncode1.html deleted file mode 100644 index ce44ce05cf..0000000000 --- a/source/JoshUGens/sc/help/BFEncode1.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - -

BFEncode1 Ambisonic B format encoder

-


-

BFEncode1.ar(in, azimuth, elevation, rho, gain, wComp)

-


-

in - input signal

-

azimuth -  in radians, -pi to pi

-

elevation -  in radians, -0.5pi to +0.5pi

-

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).

-

gain - a control rate level input.

-

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 and Z channels. 0 is the default.

-


-

Output channels are in order W,X,Y,Z.

-


-

s=Server.internal.boot;

-

// You'll only hear the first two channels on a stereo setup.

-

(

-

{ 

-

#w, x, y, z = BFEncode1.ar(WhiteNoise.ar,MouseX.kr(0, 2pi), 0, MouseY.kr(0.0, 4.0), 0.3);

-

//decode for 4 channels

-

BFDecode1.ar(w, x, y, z, [-0.25pi, 0.25pi, 0.75pi, 1.25pi], 0);

-

}.scope(4));

- - diff --git a/source/JoshUGens/sc/help/BFEncode2.html b/source/JoshUGens/sc/help/BFEncode2.html deleted file mode 100644 index 2a58d3c6e4..0000000000 --- a/source/JoshUGens/sc/help/BFEncode2.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - -

BFEncode2 Ambisonic B format encoder

-


-

BFEncode2.ar(in, point_x, point_y, elevation, gain)

-


-

in - input signal

-

point_x - a point in the x axis

-

point_y - a point in the y axis

-

elevation -  in radians, -0.5pi to +0.5pi

-

gain - a control rate level input.

-

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 and Z channels. 1 is the default.

-


-


-

x, y positions-

-

0 -1 behind

-

0 1 in front 

-

-1 0 right

-

1 0 left

-


-


-

Output channels are in order W,X,Y,Z.

-

Because of the way the W component is scaled, it is recommended that you only decode with BFDecode1 and it's methods.

-


-

s=Server.local.boot;

-

// You'll only hear the first two channels on a stereo setup.

-

({ 

-

#w, x, y, z = BFEncode2.ar(WhiteNoise.ar, MouseX.kr(-20, 20), MouseY.kr(20, -20), 0, 0.3);

-

//decode for 4 channels

-

BFDecode1.ar(w, x, y, z, [-0.25pi, 0.25pi, 0.75pi, 1.25pi], 0);

-

}.scope(4));

- - diff --git a/source/JoshUGens/sc/help/BFEncodeSter.html b/source/JoshUGens/sc/help/BFEncodeSter.html deleted file mode 100644 index 15d6909dad..0000000000 --- a/source/JoshUGens/sc/help/BFEncodeSter.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - -

BFEncodeSter Ambisonic B format encoder for stereo signals

-


-

BFEncodeSter.ar(l, r, azimuth, width elevation, rho, gain, wComp)

-


-

l - left side of the input signal

-

r - right side of the input signal

-

azimuth -  in radians, -pi to pi

-

width - in radians, width of stereo image

-

elevation -  in radians, -0.5pi to +0.5pi

-

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).

-

gain - a control rate level input.

-

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 and Z channels. 1 is the default.

-


-

Output channels are in order W,X,Y,Z.

-

Because of the way the W component is scaled, it is recommended that you only decode with BFDecode1 and it's methods.

-


-

s=Server.internal.boot;

-

s.scope;

-

// You'll only hear the first two channels on a stereo setup.

-


-

SynthDef(\testster, {

-

var w, x, y, z;

-

#w, x, y, z = BFEncodeSter.ar(

-

PinkNoise.ar(Decay.ar(Impulse.ar(2, 0, 0.25))),

-

SinOsc.ar(440, 0, Decay.ar(Impulse.ar(2, 0.5, 0.25))),

-

MouseY.kr(0, pi), // center position of image

-

MouseX.kr(0, pi) // width

-

);

-

Out.ar(0, B2Ster.ar(w, x, y))

-

}).load(s);

-

-

s.sendMsg(\s_new, \testster, a=s.nextNodeID, 0, 1);

-

 

-

s.sendMsg(\n_free, a);

- - diff --git a/source/JoshUGens/sc/help/BFManipulate.html b/source/JoshUGens/sc/help/BFManipulate.html deleted file mode 100644 index 642e10265d..0000000000 --- a/source/JoshUGens/sc/help/BFManipulate.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - -

BFManipulate BFormat sound manipulation

-


-

BFManipulate.ar(w, x, y, z, rotate, tilt, tumble)

-


-

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

-

w, x, y, z - the B-format signals. 

-

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

-

tilt - rotate about the x- axis (clock-wise and counter-clock-wise) in radians

-

tumble - rotate about the y axis (up and down) in radians

-


-

s=Server.internal.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);

-

)

- - diff --git a/source/JoshUGens/sc/help/Balance.html b/source/JoshUGens/sc/help/Balance.html deleted file mode 100644 index e3c415ab43..0000000000 --- a/source/JoshUGens/sc/help/Balance.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - -

Balance -    balances two signals with each other

-


-

Balance(in, test, numperiods, mul, add)

-


-

Usage

-


-

in - the signal you want to balance

-

test - the signal that should be used to balance in. If test is a k-rate sig, it will represent a target RMS.

-


-

Balance will try to match the RMS levels of in to the RMS of test

-


-


-

s = Server.internal.boot;

-

s.scope(2);

-


-

SynthDef(\noise, {arg noiseout = 1;

-

var noise, filt;

-

noise = WhiteNoise.ar(MouseX.kr(0, 1));

-

filt = BPF.ar(noise, LFNoise2.kr(0.2, 440, 880), 0.001);

-

// comment out to compare without balance

-

filt = Balance.ar(filt, Amplitude.kr(noise, 0.01, 0.2).max(0.01));

-

// filt = filt * 1000;

-

Out.ar(0, [filt, noise * noiseout]);

-

}).load(s);

-

-

s.sendMsg(\s_new, \noise, a = s.nextNodeID, 0, 1);

-

s.sendMsg(\n_set, a, \noiseout, 0);

-

s.sendMsg(\n_free, a);

-


-

SynthDef(\test, {

-

var src, sig;

-

src = SinOsc.ar(440, 0, MouseX.kr(0, 1));

-

sig = SinOsc.ar(440, 0, 0.1);

-

// comment out to compare without balance

-

sig = Balance.ar(sig, src);

-

Out.ar(0, [src, sig]);

-

}).load(s);

-

-

s.sendMsg(\s_new, \test, a = s.nextNodeID, 0, 1);

-


-

s.sendMsg(\n_free, a);

- - diff --git a/source/JoshUGens/sc/help/BufGrain.htm b/source/JoshUGens/sc/help/BufGrain.htm deleted file mode 100644 index 4431b4c05d..0000000000 --- a/source/JoshUGens/sc/help/BufGrain.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - -

BufGrain granular synthesis with sound sampled in a buffer

-


-

 *ar(trigger, dur, sndbuf, rate, pos, interp, mul, add) 

-


-

trigger - a kr or ar trigger to start a new grain. If ar, grains after the start of the synth are sample accurate.

-

The following args are polled at grain creation time

-

dur - size of the grain.

-

sndbuf - the buffer holding an audio signal

-

rate - the playback rate of the sampled sound

-

pos - the playback position for the grain to start with (0 is beginning, 1 is end of file)

-

interp - the kind of interpolation for the sampled sound in the grain (1 - none, 2 - linear, 4 - cubic)

-

-

Examples:

-


-

s.boot;

-


-

SynthDef(\buf_grain_test, {arg gate = 1, sndbuf, amp = 1;

-

Out.ar(0,

-

BufGrain.ar(Impulse.kr(10), 0.2, sndbuf, MouseX.kr(0.5, 8), PinkNoise.kr.range(0, 1), 2,

-

EnvGen.kr(

-

Env([0, 1, 0], [1, 1], \sin, 1),

-

gate,

-

levelScale: amp,

-

doneAction: 2)

-

)

-

)

-

}).load(s);

-

-

s.sendMsg(\b_allocRead, z = s.bufferAllocator.alloc(1), "sounds/a11wlk01-44_1.aiff");

-


-

s.sendMsg(\s_new, \buf_grain_test, a=s.nextNodeID, 0, 1, \amp, 0.2, \sndbuf, z);

-

s.sendMsg(\n_set, a, \gate, 0);

-

s.sendMsg(\b_free, z);

- - diff --git a/source/JoshUGens/sc/help/BufGrainB.htm b/source/JoshUGens/sc/help/BufGrainB.htm deleted file mode 100644 index 2ca8c1a5ab..0000000000 --- a/source/JoshUGens/sc/help/BufGrainB.htm +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - -

BufGrainB granular synthesis with sound sampled in a buffer and user supplied envelope

-


-

 *ar(trigger, dur, sndbuf, rate, pos, envbuf, interp, mul, add) 

-


-

trigger - a kr or ar trigger to start a new grain. If ar, grains after the start of the synth are sample accurate.

-

The following args are polled at grain creation time

-

dur - size of the grain.

-

sndbuf - the buffer holding an audio signal

-

rate - the playback rate of the sampled sound

-

pos - the playback position for the grain to start with (0 is beginning, 1 is end of file)

-

envbuf - a buffer with a stored signal to be used for the envelope of the grain

-

interp - the kind of interpolation for the sampled sound in the grain (1 - none, 2 - linear, 4 - cubic)

-

-

Examples:

-


-

s.boot;

-


-

SynthDef(\buf_grain_test, {arg gate = 1, sndbuf, amp = 1, envbuf;

-

Out.ar(0,

-

BufGrainB.ar(Impulse.kr(10), 0.2, sndbuf, MouseX.kr(0.5, 8), PinkNoise.kr.range(0, 1),

-

envbuf, 2,

-

EnvGen.kr(

-

Env([0, 1, 0], [1, 1], \sin, 1),

-

gate,

-

levelScale: amp,

-

doneAction: 2)

-

)

-

)

-

}).load(s);

-

-

s.sendMsg(\b_allocRead, x = s.bufferAllocator.alloc(1), "sounds/a11wlk01-44_1.aiff");

-

z = Env([0, 1, 0], [1, 1], [10, -10]).asSignal(1024);

-

s.sendMsg(\b_alloc, b = s.bufferAllocator.alloc(1), 1024, 1, [\b_setn, b, 0, 1024] ++ z)

-

s.sendMsg(\s_new, \buf_grain_test, a=s.nextNodeID, 0, 1, \amp, 0.2, \sndbuf, x, \envbuf, b);

-

s.sendMsg(\n_set, a, \gate, 0);

-

s.sendMsg(\b_free, b);

-

s.sendMsg(\b_free, x);

-


- - diff --git a/source/JoshUGens/sc/help/BufGrainI.htm b/source/JoshUGens/sc/help/BufGrainI.htm deleted file mode 100644 index a0316ca720..0000000000 --- a/source/JoshUGens/sc/help/BufGrainI.htm +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - -

BufGrainI granular synthesis with sound sampled in a buffer and user supplied envelopes

-


-

 *ar(trigger, dur, sndbuf, rate, pos, envbuf1, envbuf2, ifac, interp, mul, add) 

-


-

trigger - a kr or ar trigger to start a new grain. If ar, grains after the start of the synth are sample accurate.

-

The following args are polled at grain creation time

-

dur - size of the grain.

-

sndbuf - the buffer holding an audio signal

-

rate - the playback rate of the sampled sound

-

pos - the playback position for the grain to start with (0 is beginning, 1 is end of file)

-

envbuf1 - a buffer with a stored signal to be used for the envelope of the grain

-

envbuf2 - a buffer with a stored signal to be used for the envelope of the grain

-

ifac - an interpolation factor. interpolates between the two envelopes where 0 is all envbuf1, and 1 is all

-

envbuf2

-

interp - the kind of interpolation for the sampled sound in the grain (1 - none, 2 - linear, 4 - cubic)

-

-

Examples:

-


-

s.boot;

-


-

SynthDef(\buf_grain_test, {arg gate = 1, sndbuf, amp = 1, envbuf1, envbuf2;

-

Out.ar(0,

-

BufGrainI.ar(Impulse.kr(10), 0.2, sndbuf, MouseX.kr(0.5, 8), PinkNoise.kr.range(0, 1),

-

envbuf1, envbuf2, MouseY.kr(0, 1), 2,

-

EnvGen.kr(

-

Env([0, 1, 0], [1, 1], \sin, 1),

-

gate,

-

levelScale: amp,

-

doneAction: 2)

-

)

-

)

-

}).load(s);

-

-

s.sendMsg(\b_allocRead, x = s.bufferAllocator.alloc(1), "sounds/a11wlk01-44_1.aiff");

-

y = Env([0, 1, 0], [1, 1], \sin).asSignal(1024);

-

z = Env([0, 1, 0], [1, 1], [10, -10]).asSignal(1024);

-

s.sendMsg(\b_alloc, b = s.bufferAllocator.alloc(1), 1024, 1, [\b_setn, b, 0, 1024] ++ y)

-

s.sendMsg(\b_alloc, c = s.bufferAllocator.alloc(1), 1024, 1, [\b_setn, c, 0, 1024] ++ z)

-

s.sendMsg(\s_new, \buf_grain_test, a=s.nextNodeID, 0, 1, \amp, 0.2, \sndbuf, x, \envbuf1, b, 

-

\envbuf2, c);

-

s.sendMsg(\n_set, a, \gate, 0);

-

s.sendMsg(\b_free, b);

-

s.sendMsg(\b_free, c);

-

s.sendMsg(\b_free, x);

-


- - diff --git a/source/JoshUGens/sc/help/FMGrain.htm b/source/JoshUGens/sc/help/FMGrain.htm deleted file mode 100644 index 40072ca6d3..0000000000 --- a/source/JoshUGens/sc/help/FMGrain.htm +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - -

FMGrain granular synthesis with FM grains

-


-

 *ar(trigger, dur, carfreq, modfreq, index, mul, add) 

-


-

trigger - a kr or ar trigger to start a new grain. If ar, grains after the start of the synth are sample accurate.

-

The following args are polled at grain creation time

-

dur - size of the grain.

-

carfreq - the carrier freq of the grain generators internal oscillator

-

modfreq - the modulating freq of the grain generators internal oscillator

-

index - the index of modulation

-

-

Examples:

-


-

s.boot;

-


-

SynthDef(\fm_grain_test, {arg gate = 1, amp = 1;

-

Out.ar(0,

-

FMGrain.ar(Impulse.ar(20), 0.2, 440, 200, 

-

LFNoise1.kr(1).range(1, 10),

-

EnvGen.kr(

-

Env([0, 1, 0], [1, 1], \sin, 1),

-

gate,

-

levelScale: amp,

-

doneAction: 2)

-

)

-

)

-

}).load(s);

-

-

s.sendMsg(\s_new, \fm_grain_test, a=s.nextNodeID, 0, 1, \amp, 0.1);

-

s.sendMsg(\n_set, a, \gate, 0);

- - diff --git a/source/JoshUGens/sc/help/FMGrainB.htm b/source/JoshUGens/sc/help/FMGrainB.htm deleted file mode 100644 index a7cce92ca4..0000000000 --- a/source/JoshUGens/sc/help/FMGrainB.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - -

FMGrainB granular synthesis with FM grains and user supplied envelope

-


-

 *ar(trigger, dur, carfreq, modfreq, index, envbuf, mul, add) 

-


-

trigger - a kr or ar trigger to start a new grain. If ar, grains after the start of the synth are sample accurate.

-

The following args are polled at grain creation time

-

dur - size of the grain.

-

carfreq - the carrier freq of the grain generators internal oscillator

-

modfreq - the modulating freq of the grain generators internal oscillator

-

index - the index of modulation

-

envbuf - a buffer with a stored signal to be used for the envelope of the grain

-

-

Examples:

-


-

s.boot;

-


-

SynthDef(\fm_grain_test, {arg gate = 1, amp = 1, envbuf;

-

Out.ar(0,

-

FMGrainB.ar(Impulse.kr(10), 0.2, WhiteNoise.kr.range(440, 880), 200, 

-

LFNoise1.kr(1).range(1, 10), envbuf,

-

EnvGen.kr(

-

Env([0, 1, 0], [1, 1], \sin, 1),

-

gate,

-

levelScale: amp,

-

doneAction: 2)

-

)

-

)

-

}).load(s);

-

-

z = Env([0, 1, 0], [1, 1], [10, -10]).asSignal(1024);

-

s.sendMsg(\b_alloc, b = s.bufferAllocator.alloc(1), 1024, 1, [\b_setn, b, 0, 1024] ++ z)

-

s.sendMsg(\s_new, \fm_grain_test, a=s.nextNodeID, 0, 1, \amp, 0.2, \envbuf, b);

-

s.sendMsg(\n_set, a, \gate, 0);

-

s.sendMsg(\b_free, b);

- - diff --git a/source/JoshUGens/sc/help/FMGrainI.htm b/source/JoshUGens/sc/help/FMGrainI.htm deleted file mode 100644 index 7e33849bc1..0000000000 --- a/source/JoshUGens/sc/help/FMGrainI.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - -

FMGrainI granular synthesis with FM grains and user supplied envelopes

-


-

 *ar(trigger, dur, carfreq, modfreq, index, envbuf1, envbuf2, ifac, mul, add) 

-


-

trigger - a kr or ar trigger to start a new grain. If ar, grains after the start of the synth are sample accurate.

-

The following args are polled at grain creation time

-

dur - size of the grain.

-

carfreq - the carrier freq of the grain generators internal oscillator

-

modfreq - the modulating freq of the grain generators internal oscillator

-

index - the index of modulation

-

envbuf1 - a buffer with a stored signal to be used for the envelope of the grain

-

envbuf2 - a buffer with a stored signal to be used for the envelope of the grain

-

ifac - an interpolation factor. interpolates between the two envelopes where 0 is all envbuf1, and 1 is all

-

envbuf2

-

-

Examples:

-


-

s.boot;

-


-

SynthDef(\fm_grain_test, {arg gate = 1, amp = 1, envbuf1, envbuf2;

-

Out.ar(0,

-

FMGrainI.ar(Impulse.kr(10), 0.2, WhiteNoise.kr.range(440, 880), 200, 

-

LFNoise1.kr(1).range(1, 10), envbuf1, envbuf2, MouseX.kr(0, 1),

-

EnvGen.kr(

-

Env([0, 1, 0], [1, 1], \sin, 1),

-

gate,

-

levelScale: amp,

-

doneAction: 2)

-

)

-

)

-

}).load(s);

-

-

y = Env([0, 1, 0], [1, 1], \sin).asSignal(1024);

-

z = Env([0, 1, 0], [1, 1], [10, -10]).asSignal(1024);

-

s.sendMsg(\b_alloc, b = s.bufferAllocator.alloc(1), 1024, 1, [\b_setn, b, 0, 1024] ++ y)

-

s.sendMsg(\b_alloc, c = s.bufferAllocator.alloc(1), 1024, 1, [\b_setn, c, 0, 1024] ++ z)

-

s.sendMsg(\s_new, \fm_grain_test, a=s.nextNodeID, 0, 1, \amp, 0.2, \envbuf1, b, \envbuf2, c);

-

s.sendMsg(\n_set, a, \gate, 0);

-

s.sendMsg(\b_free, b);

-

s.sendMsg(\b_free, c);

- - diff --git a/source/JoshUGens/sc/help/FMHDecode1.html b/source/JoshUGens/sc/help/FMHDecode1.html deleted file mode 100644 index 8eca1a55c2..0000000000 --- a/source/JoshUGens/sc/help/FMHDecode1.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - -

FMHDecode1 decode an FMH signal for a specific speaker

-


-

FMHDecode1.ar(w, x, y, z, r, s, t, u, v, azimuth, elevation, mul, add )

-


-

w, x, y, z, r, s, t, u , v - the components of a second order ambisonic signal

-

azimuth - Speaker angle in radians. 0 is front, values should be anti-clockwise (-0.5pi is right, 0.5pi is left)

-

elevation - Speaker elevation in radians. 0 to 0.5pi is up, 0 to -0.5pi is down.

-


-

WARNINGS - Second-order encoding and decoding has some quirks. Decoding for arbitrary arrays will probably not result in the cleanest results. Often, components need to be discarded depending on the kind of speaker array. See: http://www.muse.demon.co.uk/ref/speakers.html for more information. Some of the more common speaker rigs are pre-done for you according to the specifications from Richard Furse's site. 

-


-

In addition, after a number of conversations with Miguel Negrao (and his contacts with Fons Adriaensen), it is fairly clear that for Second Order decoding to really work well, filtering should be done on the output... for a later date! 

-


-

(

-

{

-

var w, x, y, z, r, s, t, u, v, p, a, b, c, d;

-

-

p = PinkNoise.ar;

-

-

// second order B-format encode

-

#w, x, y, z, r, s, t, u, v = FMHEncode1.ar(p, MouseX.kr(-pi, pi), 

-

MouseY.kr(0.25pi, -0.25pi), 1); 

-

-

// B-format decode to cube / quad ([lfh, rfh, rrh, lrh, lfl, rfl, rrl, lrl])

-

// lfl = left front high, lfl = left front low etc...

-

-

FMHDecode1.ar(w, x, y, z, r, s, t, u, v,

-

[-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);

-

)

-


-

ar1(w, x, y, z, r, s, t, u, v, azimuth, elevation, maxDist, distance, scaleflag, mul, add)

-


-

maxDist - the distance (in meters) to the furthest speaker from center (this allocates the delay size)

-

distance - the distance (in meteres) to each speaker.

-

scaleflag - if 1, apply amplitude scaling to the closest signals to match more distant speakers

-


-

The following are some common speaker rigs, with the appropriate components zeroed out

-


-

stereo(w, y, mul, add)

-


-

square(w, x, y, v, mul, add) - stereo pairs - lf, rf, lr, rr

-

quad(w, x, y, v, mul, add) - clockwise - lf, rf, rr, lr

-

pentagon(w, x, y, u, v, mul, add) - center front, rf, rr, lr, lf

-

hexagon(w, x, y, u, v, mul, add) - lf, rf, r, rr, lr, l

-

ocatogon1(w, x, y, u, v, mul, add) - lf, rf, rfs, rrs, rr, lr, lrs, lfs

-

ocatogon1(w, x, y, u, v, mul, add) - f, rf, r, rr, rear, lr, l, lf

-

cube(w, x, y, z, s, t, v, mul, add) - lfu, rfu, rru, lru, lfd, rfd, rrd, lrd

-

doubleHex(w, x, y, z, s, t, u, v, mul, add) - lfu, rfu, ru, rru, lru, lu, lfd, rfd, rd, rrd, lrd, ld

-

dodecahedron(w, x, y, z, r, s, t, u, v, mul, add) - top, fu, rfu, rru, lru, lfu, fd, rfd, rrd, lrd, lfd, bottom

-


-


-


-

s=Server.internal.boot;

-


-

(

-

{ 

-

var w, x, y, z, r, s, t, u, v;

-

#w, x, y, z, r, s, t, u, v = 

-

FMHEncode1.ar(WhiteNoise.ar,MouseX.kr(0, 2pi), MouseY.kr(-0.5pi, 0.5pi), 1, 0.3);

-

FMHDecode1.stereo(w, y);

-

}.scope(5));

-


-

(

-

{ 

-

var w, x, y, z, r, s, t, u, v;

-

#w, x, y, z, r, s, t, u, v = 

-

FMHEncode1.ar(SinOsc.ar,MouseX.kr(0, 2pi), MouseY.kr(-0.5pi, 0.5pi), 1, 0.3);

-

FMHDecode1.pentagon(w, x, y, u, v);

-

}.scope(5));

-


-

(

-

{ 

-

var w, x, y, z, r, s, t, u, v;

-

#w, x, y, z, r, s, t, u, v = 

-

FMHEncode1.ar(WhiteNoise.ar,MouseX.kr(0, 2pi), MouseY.kr(-0.5pi, 0.5pi), 1, 0.3);

-

FMHDecode1.cube(w, x, y, z, s, t, v);

-

}.scope(8));

-


-


-

(

-

{ 

-

var w, x, y, z, r, s, t, u, v;

-

#w, x, y, z, r, s, t, u, v = 

-

FMHEncode1.ar(SinOsc.ar,MouseX.kr(0, 2pi), MouseY.kr(-0.5pi, 0.5pi), 1, 0.3);

-

FMHDecode1.doubleHex(w, x, y, z, s, t, u, v);

-

}.scope(12));

-


-

(

-

{ 

-

var w, x, y, z, r, s, t, u, v;

-

#w, x, y, z, r, s, t, u, v = 

-

FMHEncode1.ar(WhiteNoise.ar,MouseX.kr(0, 2pi), MouseY.kr(-0.5pi, 0.5pi), 1, 0.3);

-

FMHDecode1.dodecahedron(w, x, y, z, r, s, t, u, v);

-

}.scope(12));

-


- - diff --git a/source/JoshUGens/sc/help/FMHEncode1.html b/source/JoshUGens/sc/help/FMHEncode1.html deleted file mode 100644 index 25ba6b0cc7..0000000000 --- a/source/JoshUGens/sc/help/FMHEncode1.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - -

FMHEncode1 Second Order Ambisonic encoder

-


-

FMHEncode1.ar(in, azimuth, elevation, rho, gain, wComp)

-


-

in - input signal

-

azimuth -  in radians, -pi to pi

-

elevation -  in radians, -0.5pi to +0.5pi

-

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).

-

gain - a control rate level input.

-

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.

-


-

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.

-


-

s=Server.internal.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));

- - diff --git a/source/JoshUGens/sc/help/FMHEncode2.html b/source/JoshUGens/sc/help/FMHEncode2.html deleted file mode 100644 index 0393c3b15c..0000000000 --- a/source/JoshUGens/sc/help/FMHEncode2.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - -

FMHEncode2 Second Order Ambisonic encoder

-


-

FMHEncode2.ar(in, point_x, point_y, elevation, gain, wComp)

-


-

in - input signal

-

point_x - a point in the x axis

-

point_y - a point in the y axis

-

elevation -  in radians, -0.5pi to +0.5pi

-

gain - a control rate level input.

-

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.

-


-


-

x, y positions-

-

0 -1 behind

-

0 1 in front 

-

-1 0 right

-

1 0 left

-


-

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.

-


-

s=Server.internal.boot;

-

// You'll only hear the first two channels on a stereo setup.

-

(

-

{ 

-

var w, x, y, z, r, s, t, u, v;

-

#w, x, y, z, r, s, t, u, v = FMHEncode2.ar(WhiteNoise.ar,MouseX.kr(-1, 1), 

-

MouseY.kr(-1.0, 1.0), 0);

-

}.scope(9));

- - diff --git a/source/JoshUGens/sc/help/LPCAna.html b/source/JoshUGens/sc/help/LPCAna.html deleted file mode 100644 index ec23d2dbcb..0000000000 --- a/source/JoshUGens/sc/help/LPCAna.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - -

LPCAna creates LPC analysis file (adapted and expanded from R. Moore's LPC 

-

analysis code from 'Computer Music' ...

-


-

See also: LPCFile, LPCSynth, LPCVals

-


-

Class Methods

-

-

*new(path)

-

path - the path for a mono sound file to analyze

-


-

Instance Methods

-


-

ana(nPoles, frameSize, hop, channel, minFreq, maxFreq, check, conditionSignal, completion)

-

nPoles - the number of poles for the all-pole filter (default: 35, must be less the 200)

-

frameSize - the number of samples to use for each from of analysis (default: 400)

-

hop - a percentage of the frameSize to skip for the next window (default: 0.5)

-

channel - the channel to analyze if the file at 'path' is multi-channel (default: 0)

-

minFreq - a minFreq to search for in pitch tracking (defautl: 70)

-

maxFreq - a maxFreq to search for in pitch tracking (default: 200)

-

check - attempts to check poles for stability. WARNING: Somewhere in this code, I've made 

-

a terrible mistake. It actually CAUSES instabilities rather then getting rid of them... but

-

I can't, for the life of me, see where the error is. Don't use it. Moore's basic algorithm is 

-

pretty good, and the filters seems fairly stable. If you have problems, try increasing the 

-

number of poles (default: 0)

-

conditionSignal - if 0, does nothing, if 1, applies a simple low pass filter to each window

-

before doing the analysis (which helps avoid instabilities), or 2, apply a DRASTIC low pass

-

filter to the signal that I saw in some of CSounds LPC code. This REALLY smoothes out

-

the signal, and usually causes some pretty crazy instabilities because the output of the

-

filter is SO resonant. (default: 0, 1 works well, choose 2 if you want exploding filters that

-

might (?) be interesting.

-

completion - a function to evaluate when the analysis is finished. Handy for bulk analyzing files, 

-

and auto saving them.

-


-

lperr(numTurns) - low pass the error signal numTurns times

-

lprms(numTurns) - low pass the overall rms signal numTurns times

-

lppch(numTurns) - low pass the pchcps signal numTurns times

-

-

saveToLPCFile(path) - save file to an LPC file usable by LPCFile, LPCSynth and LPCVals.

-

saveToFiles(path) - save file to an LPC file usable by LPCFile, LPCSynth and LPCVals, as well as a 

-

floating point .aif data file for use in NRT.

-

-

Usage:

-


-

a = LPCAna.new("sounds/a11wlk01.wav");

-

a.ana(50, 400, 0.5, 0, 70, 300);

-

-

// low pass an aspect of the analysis

-

a.err.plot

-

a.lperr;

-

a.err.plot;

-

-

a.pchcps.plot;

-

a.lppch;

-

a.pchcps.plot;

- - diff --git a/source/JoshUGens/sc/help/LPCFile.html b/source/JoshUGens/sc/help/LPCFile.html deleted file mode 100644 index 38278a9f7c..0000000000 --- a/source/JoshUGens/sc/help/LPCFile.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - -

LPCFile For working with CSounds LPC file data

-


-


-

Working with LPC files

-


-

This class acts as a bridge between CSound's LPC analysis files created with the lpanal command line tool. 

-


-

Class Methods

-


-

Loading an LPC file with LPCFile

-


-

*new(path, buffer, server) - load an LPC file into memory at path with buffer number bufnum.  server defaults to Server.default. If bufnum is left empty, one will be allocated for you.

-


-

a = LPCFile.new("sounds/fate.lpc");

-

-

Instance Methods

-


-

loadToBuffer - loads the information of the LPC file into a buffer for use by the LPCSynth UGens

-


-

a.loadToBuffer;

-

-

buffer -  returns the buffer number LPC data is stored in.

-


-

freeBuffer - releases the LPC buffer.

-


- - diff --git a/source/JoshUGens/sc/help/LPCSynth.html b/source/JoshUGens/sc/help/LPCSynth.html deleted file mode 100644 index 11f77f16fa..0000000000 --- a/source/JoshUGens/sc/help/LPCSynth.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - -

LPCSynth

-

LPCVals -    utilize LPC data

-


-

LPCSynth(buffer, signal, pointer, mul, add)

-

#cps, rmso, err = LPCVals(buffer, pointer)

-


-

- LPCSynth uses data from a LPC data file to filter a signal

-

- LPCVals returns pitch, rms and error data from the LPC data file

-


-

buffer - the buffer where data is stored from LPCFile (see LPCFile).

-

pointer - a pointer into the LPC data file, where 0 is the begining and 1 is the end.

-

signal - the signal to filter.

-


-

Usage

-


-

This uses the fate.lpc file, created with the following command:

-


-

lpanal -p 50 -h 300 fate.aiff fate.lpc

-


-

-p = num poles

-

-h = hop size in samples 

-


-

analysis window are 2X the hop size

-


-


-

s = Server.local.boot;

-


-

// this file came with the JoshUGens... Leonard Bernstein talking about Beethoven.

-

// Place it in your SC3/sounds directory.

-

a = LPCFile.new("sounds/fate.lpc", server: s).loadToBuffer;

-


-

(

-

z = {

-

var cps, rmso, err, voc, noise, timepoint, dur;

-

timepoint = LFSaw.ar(0.4/a.sndDur, 1, 0.5, 0.5);

-


-

# cps, rmso, err = LPCVals.ar(a.buffer, timepoint);

-

// a periodic Blip to filter, amplitude is 1 - error

-

noise = WhiteNoise.ar(err); // a noise source

-


-

voc = Blip.ar(cps, 100);

-

// the rms values tend to be high... scale them back quite a bit!

-

Out.ar(0, LPCSynth.ar(a.buffer, voc + noise, timepoint, rmso)); 

-

}.play(s)

-

)

-

z.free;

-

// clean up

-

s.sendBundle(0.1, [\b_free, a.buffer]);

-


-


- - diff --git a/source/JoshUGens/sc/help/LPCVals.html b/source/JoshUGens/sc/help/LPCVals.html deleted file mode 100644 index a4bfef0af2..0000000000 --- a/source/JoshUGens/sc/help/LPCVals.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - -

LPCSynth

-

LPCVals -    utilize LPC data

-


-

LPCSynth(buffer, signal, pointer, mul, add)

-

#cps, rmso, err = LPCVals(buffer, pointer)

-


-

- LPCSynth uses data from a LPC data file to filter a signal

-

- LPCVals returns pitch, rms and error data from the LPC data file

-


-

buffer - the buffer where data is stored from LPCFile (see LPCFile).

-

pointer - a pointer into the LPC data file, where 0 is the begining and 1 is the end.

-

signal - the signal to filter.

-


-

Usage

-


-

This uses the fate.lpc file, created with the following command:

-


-

lpanal -p 50 -h 300 fate.aiff fate.lpc

-


-

-p = num poles

-

-h = hop size in samples 

-


-

analysis window are 2X the hop size

-


-


-

s = Server.local.boot;

-


-

// this file came with the JoshUGens... Leonard Bernstein talking about Beethoven.

-

// Place it in your SC3/sounds directory.

-

a = LPCFile.new("sounds/fate.lpc", server: s).loadToBuffer;

-


-

(

-

{

-

var cps, rmso, err, voc, noise, timepoint, dur;

-

timepoint = LFSaw.ar(0.8/a.sndDur, 1, 0.5, 0.5);

-

# cps, rmso, err = LPCVals.ar(a.buffer, timepoint);

-

// a periodic Blip to filter, amplitude is 1 - error

-

voc = Blip.ar(cps, (22000 / cps).floor, 1-err);

-

noise = PinkNoise.ar(err) * 20; // a noise source

-

// the rms values tend to be high... scale them back quite a bit!

-

Out.ar(0, LPCSynth.ar(a.buffer, voc + noise, timepoint, 0.00001 * rmso)); 

-

}.play(s)

-

)

-


-

// clean up

-

s.sendBundle(0.1, [\b_free, a.buffer]);

-


- - diff --git a/source/JoshUGens/sc/help/Maxamp.html b/source/JoshUGens/sc/help/Maxamp.html deleted file mode 100644 index aed84409c8..0000000000 --- a/source/JoshUGens/sc/help/Maxamp.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - -

Maxamp tracks and prints amplitudes

-


-

Warning!!! Printing from the server is very expensive on the client side (lang).  This CPU usage will not show up in your CPU usage on the server side. 

-


-

Maxamp.ar(in, numSamples)

-


-

in - the input you would like to track

-

numSamples - the period in which Maxamp will post amp information

-

-

Usage

-


-

(

-


-

SynthDef(\sample, {|dur|

-

Out.ar(0, SinOsc.ar(440, 0, LFNoise1.ar(0.5)) * 

-

EnvGen.kr(Env([0.01, 1, 1, 0.01], [0.01, dur - 0.02, 0.01]), doneAction: 2))

-

}).load(s);

-

-

-

SynthDef(\maxamptest, {|inbus|

-

Maxamp.ar(In.ar(inbus, 1), SampleRate.ir / 10)

-

}).load(s);

-

-

)

-


-

s.boot;

-


-

s.sendBundle(0.1, [\s_new, \sample, -1, 0, 1, \dur, 4],

-

// run maxamp test at the tail of group 1

-

[\s_new, \maxamptest, -1, 1, 1, \inbus, 0]);

-

-

// run a couple more synths

-


-

s.sendBundle(0.1, [\s_new, \sample, -1, 0, 1, \dur, 2],

-

[\s_new, \sample, -1, 0, 1, \dur, 3],

-

[\s_new, \sample, -1, 0, 1, \dur, 4]);

-

-

// kill maxamptest

-


-

s.sendBundle(0.1, [\g_freeAll, 1]);

-


-

Here is a sample of what prints:

-


-

Maxamp from 1.8 to 1.9: 0.87646, Overall Maxamp at 1.89903: 0.87646

-

Maxamp from 1.9 to 2: 0.930082, Overall Maxamp at 1.999: 0.930082

-

Maxamp from 2 to 2.1: 0.930123, Overall Maxamp at 2.00011: 0.930123

-

Maxamp from 2.1 to 2.2: 0.88386, Overall Maxamp at 2.00011: 0.930123

-

Maxamp from 2.2 to 2.3: 0.837598, Overall Maxamp at 2.00011: 0.930123

-

Maxamp from 2.3 to 2.4: 0.791335, Overall Maxamp at 2.00011: 0.930123

-


-

The last line shows that the Maxamp from 2.3 - 2.4 seconds was 0.791335.  The overall Maxamp occurred at 2.00011 seconds, with a value of 0.930123.

-


-

For NRT

-


-

This UGen can be particularly useful during NRT synthesis:

-


-

a = [

-

[0, [\g_new, 1], [\s_new, \sample, -1, 0, 1, \dur, 4], [\s_new, \maxamptest, -1, 1, 1]],

-

[6, [\s_new, \sample, -1, 0, 1, \dur, 2]],

-

[8, [\s_new, \sample, -1, 0, 1, \dur, 3]],

-

[11, [\c_set, 0, 0]]

-

]

-


-

// make sure the local server is not booted

-

-

Score.recordNRT(a, "/tmp/sc.sc", "test.aiff");

-


-

- - diff --git a/source/JoshUGens/sc/help/Metro.html b/source/JoshUGens/sc/help/Metro.html deleted file mode 100644 index 20a7909643..0000000000 --- a/source/JoshUGens/sc/help/Metro.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - -

Metro metronome - outputs a single sample impulse according to bpm and numBeats

-


-

*ar(bpm, numBeats, mul, add)

-

*kr(bpm, numBeats, mul, add)

-

-

bpm beats per minute

-

numBeats number of beats before the next pulse

-

-

bpm and numBeats are polled on every impulse of output. These can be scalers, audio rate, control rate

-

or Demand UGens

-

-

// examples

-

-

a = {Metro.ar(60, 1)}.play

-

a.free;

-


-

a = {Decay.kr(Metro.kr(XLine.kr(60, 120, 5), 1)) * SinOsc.ar(440, 0, 0.1)}.play;

-

a.free;

-

-

(

-

a = {

-

Decay.kr(

-

Metro.kr(

-

LFNoise2.kr(0.2).range(30, 240), 

-

Dseq([1, 0.25, 0.5, 0.25], inf))) * 

-

SinOsc.ar(440, 0, 0.1)

-

}.play;

-

)

-

-

a.free;

-

- - diff --git a/source/JoshUGens/sc/help/MonoGrain.html b/source/JoshUGens/sc/help/MonoGrain.html deleted file mode 100644 index 82b66ed39f..0000000000 --- a/source/JoshUGens/sc/help/MonoGrain.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - -

MonoGrain granulates real-time input

-


-

MonoGrain.ar(in, winsize, grainrate, winrandpct, mul, add)

-


-

in - a mono input

-

winsize - the window size in seconds

-

grainrate - the rate of which new grains are created (in Hz)

-

winrandpct - a randomness factor for window size (as a percentage of the winsize)

-


-

Examples:

-


-

s.boot;

-


-

(

-

s.sendMsg(\b_allocRead, 0, "sounds/a11wlk01-44_1.aiff", 0, -1);

-


-

SynthDef(\monograin, {arg buffer = 0;

-

var out, winsize, grainrate;

-

winsize = MouseX.kr(0.1, 0.01);

-

grainrate = MouseY.kr(10, 4);

-

out = MonoGrain.ar(PlayBuf.ar(1, buffer, loop: 1), winsize, grainrate, 0); 

-

Out.ar(0, out);

-

}).send(s);

-


-

)

-


-


-

s.sendMsg(\s_new, \monograin, 1000, 0, 0, \buffer, 0);

-


-

s.sendMsg(\n_free, 1000)

- - diff --git a/source/JoshUGens/sc/help/MonoGrainBF.html b/source/JoshUGens/sc/help/MonoGrainBF.html deleted file mode 100644 index 54d8e3aa3d..0000000000 --- a/source/JoshUGens/sc/help/MonoGrainBF.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - -

MonoGrainBF granulates real-time input with Ambisonic panning

-


-

MonoGrainBF.ar(in, winsize, grainrate, winrandpct, azimuth, azrand, elevation, elrand, rho, mul, add)

-


-

in - a mono input

-

winsize - the window size in seconds

-

grainrate - the rate of which new grains are created (in Hz)

-

winrandpct - a randomness factor for window size (as a percentage of the winsize)

-

azimuth - in radians, -pi to pi

-

azrand - percentage of deviation from the azimuth

-

elevation - in radians, -0.5pi to 0.5pi

-

elrand - percentage of deviation from the elevation

-

rho - the speaker radius.  (1 places shound at the radius, <1 within the radius, >1 is outside the radius)

-

beyond the radius, this mostly acts as an amplitude scaler (no filtering is done).

-


-

Examples:

-


-

s.boot;

-


-

(

-

s.sendMsg(\b_allocRead, 0, "sounds/a11wlk01-44_1.aiff", 0, -1);

-


-

SynthDef(\monograinbf, {arg buffer = 0;

-

var w, x, y, z, out, winsize, grainrate, azimuth, azrand;

-

winsize = 0.04;

-

grainrate = 100;

-

azimuth = MouseX.kr(-pi, pi); // move around the radius

-

azrand = MouseY.kr(0, 1); // 0 = no randomness, 1 = totally random

-

#w, x, y, z = MonoGrainBF.ar(PlayBuf.ar(1, buffer, loop: 1), winsize, grainrate, 0, azimuth, azrand);

-

out = DecodeB2.ar(2, w, x, y, 0.5);

-

Out.ar(0, out);

-

}).send(s);

-


-

)

-


-


-

s.sendMsg(\s_new, \monograinbf, 1000, 0, 0, \buffer, 0);

-


-

s.sendMsg(\n_free, 1000);

-

s.sendMsg(\b_free, 0);

- - diff --git a/source/JoshUGens/sc/help/MoogVCF.html b/source/JoshUGens/sc/help/MoogVCF.html deleted file mode 100644 index f59919b994..0000000000 --- a/source/JoshUGens/sc/help/MoogVCF.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - -

MoogVCF Moog Filter Emulation

-


-

MoogVCF.ar(input, ffreq, res, mul, add)

-


-

MoogVCF is a port of the CSound opcode moogvcf written by Josep Comajuncosas and Hans Mikelson.  This UGen is a digital emulation of the Moog diode ladder filter configuration.  It is based loosely on the paper "Analyzing the Moog VCF with Considerations for Digital Implemnetation" by Stilson and Smith (CCRMA).

-


-

input - audio input

-

ffreq - cutoff freq

-

res - resonance (0-1)

-


-

{ MoogVCF.ar(

-

Pulse.ar([40,121],[0.3,0.7]),SinOsc.kr(LFNoise0.kr(0.42).range(0.001,2.2)).range(30,4200), 

-

0.83)}.play(s);

- - diff --git a/source/JoshUGens/sc/help/OverlapTexture.html b/source/JoshUGens/sc/help/OverlapTexture.html deleted file mode 100644 index 19bb12c9f3..0000000000 --- a/source/JoshUGens/sc/help/OverlapTexture.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - -

OverlapTexture overlap events

-


-

OverlapTexture.new(synthdef, server)

-


-

synthdef - a valid synthdef (or an array of synthdefs). If the synthdef is an array of 

-

synthdefs, OverlapTexture will randomly choose which synthdef to play on each

-

new synth creation.

-

server - if not specified, will will use the default server

-

-

Usage

-


-

Where OverlapTexture in SC2 was a Spawn wrapper, in SC3 OverlapTexture is a Task wrapper. To work properly, your synthdef MUST have arguments for \susdur and \transdur which control an envelope's attack, sustain and decay portions (e.g.  Env([0, 1, 1, 0], [transdur, susdur, transdur], \sin) ). Values for these arguments will be passed into the Synth from the OverlapTexture class, and do not need to be included with the arguments.

-


-

*play(overlaps, susdur, transdur, maxRepeats, addaction, target, args)

-


-

overlaps - the number of events that should occur at one time

-

susdur - the sustain portion of the synths envelope

-

transdur - the attack and decay portions of the the synths envelopes

-

maxRepeats - if an integer is specified here, then the function will create no more

-

then this number of synths.  Defaults to inf.

-

addaction  - 

-

0 - add the new node to the the head of the group specified by the add target ID.

-

1 - add the new node to the the tail of the group specified by the add target ID.

-

2 - add the new node just before the node specified by the add target ID.

-

3 - add the new node just after the node specified by the add target ID.

-

4 - the new node replaces the node specified by the add target ID. 

-

target  - a target ID

-

args - an array containing arguments to be passed to the synth (transdur 

-

and susdur should be excluded). arg values can also be functions that

-

will be evaluated when the synth is called. Can also be an array of args

-

that correspond with the array of synthdefs.

-


-

(

-

SynthDef(\sinetest, {arg freq, amp = 0.2, susdur = 4, transdur = 1;

-

var env, sound;

-

env = EnvGen.kr(

-

Env([0, 1, 1, 0], [transdur, susdur, transdur], \sin),

-

doneAction: 2);

-

sound = SinOsc.ar(freq, 0, amp) * env;

-

Out.ar(0, sound);

-

}).load(s);

-

)

-


-

s.boot;

-


-

a = OverlapTexture.new(\sinetest, s);

-


-

a.play(60, 1, 1, 200, args: [\freq, {440.rrand(880)}, \amp, 60.reciprocal])

-


-

a.stop;

-


-


-

// with a array of synthdefs

-


-

(

-

SynthDef(\sinetest, {arg freq, amp = 0.2, susdur = 4, transdur = 1;

-

var env, sound;

-

env = EnvGen.kr(

-

Env([0, 1, 1, 0], [transdur, susdur, transdur], \sin),

-

doneAction: 2);

-

sound = SinOsc.ar(freq, 0, amp) * env;

-

Out.ar(0, Pan2.ar(sound, Rand.new(-1.0, 1.0)));

-

}).load(s);

-


-

SynthDef(\noisetest, {arg amp = 0.2, susdur = 4, transdur = 1;

-

var env, sound, freq;

-

env = EnvGen.kr(

-

Env([0, 1, 1, 0], [transdur, susdur, transdur], \sin),

-

doneAction: 2);

-

freq = 440.0.rrand(110.0).dup + [0, 5.0.rrand(50.0)];

-

sound = BPF.ar(PinkNoise.ar(amp), freq, 0.01.rrand(0.1)) * env ;

-

Out.ar(0, sound);

-

}).load(s);

-

)

-


-

s.boot;

-


-

a = OverlapTexture.new([\sinetest, \noisetest], s);

-


-

a.play(60, 1, 1, 200, args: [[\freq, {440.rrand(880)}, \amp, 60.reciprocal], [\amp, 10.reciprocal]])

-


-

a.stop;

-


-

a.isPlaying

- - diff --git a/source/JoshUGens/sc/help/WarpOverlap.html b/source/JoshUGens/sc/help/WarpOverlap.html deleted file mode 100644 index b5bd3d35d6..0000000000 --- a/source/JoshUGens/sc/help/WarpOverlap.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - -

WarpOverlap Create a texture of Warps

-


-

Inspired by Chad Kirby's SuperCollider2 Warp1 class, which was inspired by Richard Karpen's sndwarp for CSound. A granular time strecher and pitchshifter. See the [Warp1] helpfile for more information about Warp1's specifics. This texture will create a series of Warp1s that keep up with the current time.

-


-

WarpOverlap.ar(numChans = 1, buffer, overlaps = 4, starttime = 0, stretch = 1, harm = 1, windowsize = 6, 

-

step = 1, warpwindowsize = 0.11, warpwindowoverlaps = 8, warpwindowran = 0.1, mul = 1,

-

add = 0)

-


-

buffer - the buffer number of a mono soundfile.

-

overlaps - the number of overlapping warps to create (should be equal to or greater then 3).

-

this must be a fixed integer. The architechture of the SynthDef

-

cannot change after it is compiled.

-

starttime - an initial starttime for the warp pointer (in the total buffer)

-

stretch - a stretch factor for the individual Warps.

-

harm - a float, or an instance of a Ref. If a Ref is used, its values are sequentially distributed among the 

-

larger overlapping windows.

-

windowsize - the windowsize in seconds of the larger overlapping windows.

-

step - a control on the pointer increment. 1 keeps the pointer up with the current time, 0 will halt time.

-

warpwindowsize - a float, or an instance of a Ref. The size of the individual warp windows.

-

warpwindowoverlaps - a float, or an instance of a Ref. The number of window overlaps for each warp. 

-

warpwindowran - a float, or an instance of a Ref. The amount of randomness in each warp's windows.

-

-


-


-

Examples:

-


-

s.boot;

-


-

(

-

s.sendMsg(\b_allocRead, 0, "sounds/a11wlk01.wav", 0, -1);

-


-

SynthDef(\warpoverlap, {arg buffer = 0, stretch = 1, windowsize = 6, mul = 1, gate = 1;

-

var out, env, overlaps, harm, wwinsize, wwinoverlap, wwinran;

-

overlaps = 8;

-

harm = [3, 7, 5, -12].midiratio.asRef;

-

wwinsize = `[0.11, 0.11, 0.11, 0.2];

-

wwinsize = 0.11;

-

wwinoverlap = 8;

-

wwinran = 0.1;

-

env = EnvGen.kr(Env([0.01, 1, 0.01], [0.1, 0.1], 'exp', 1), gate, doneAction: 2);

-

out = WarpOverlap.ar(1, buffer, overlaps, 0, stretch, harm, windowsize, wwinsize, wwinoverlap, wwinran, mul);

-

Out.ar(0, out * env);

-

}).send(s);

-


-

)

-


-

s.sendMsg(\s_new, \warpoverlap, a=s.nextNodeID, 0, 1, \buffer, 0, \stretch, 30, \mul, 0.1)

-


-

s.sendMsg(\n_free, a);

-


-


- - diff --git a/source/JoshUGens/sc/help/WarpZ.html b/source/JoshUGens/sc/help/WarpZ.html deleted file mode 100644 index 62b8cc7110..0000000000 --- a/source/JoshUGens/sc/help/WarpZ.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - -

WarpZ Warp a buffer with a time pointer

-


-

Inspired by Chad Kirby's SuperCollider2 Warp1 class, which was inspired by Richard Karpen's sndwarp for CSound. A granular time strecher and pitchshifter.

-


-

WarpZ.ar(numChannels, bufnum, pointer, freqScale, windowSize, envbufnum, overlaps, 

-

windowRandRatio, interp, zeroSearch, zeroStart, mul, add)

-


-

numChannels - the number of channels in the soundfile used in bufnum.

-

bufnum - the buffer number of a mono soundfile.

-

pointer - the position in the buffer.  The value should be between 0 and 1, with 0 being the begining

-

of the buffer, and 1 the end.

-

freqScale- the amount of frequency shift. 1.0 is normal, 0.5 is one octave down, 2.0 is one octave up.

-

Negative values play the soundfile backwards.

-

windowSIze - the size of each grain window.

-

envbufnum - the buffer number containing a singal to use for the grain envelope. -1 uses a built-in 

-

Hanning envelope.

-

overlaps - the number of overlaping windows.

-

windowRandRatio - the amount of randomness to the windowing function.  Must be between 0 (no

-

randomness) to 1.0 (probably to random actually)

-

interp - the interpolation method used for pitchshifting grains. 1 = no interpolation. 2 = linear. 

-

4 = cubic interpolation (more computationally intensive).

-

zeroSearch - if > 0.0, the UGen will search through the buffer from the current 'pointer' looking for a 

-

zero crossing in the signal to start the grain with. The search is limitied to zeroSearch seconds 

-

(i.e., if zeroSearch is 0.01, the UGen will only try to find a zero crossing within 0.01 seconds of 

-

the pointer).

-

zeroStart - if > 0.0, an attempt will be made to scuedule the next grain according to a zero crossing

-

in the current grain. This value limits the search to zeroStart as a percentage of the current grain's

-

duration (i.e., if the current grain's duration is 0.2, and zeroStart is 0.1, the algorithm will attempt to 

-

find the closest zero crossing in the current grain +/- 0.02 seconds from when the next grain was 

-

originally scheduled according to windowSize / overlaps).

-


-


-

Examples:

-


-

s.boot;

-


-

(

-

var winenv;

-

// a custom envelope - not a very good one, but you can hear the difference between this 

-

// and the default

-

winenv = Env([0, 1, 0], [0.5, 0.5], [8, -8]);

-

b = Buffer.read(s, "sounds/a11wlk01-44_1.aiff");

-

z = Buffer.sendCollection(s, winenv.discretize, 1);

-


-

SynthDef(\warp, {arg buffer = 0, envbuf = -1;

-

var out, pointer, filelength, pitch, env, dir;

-

// pointer - move from beginning to end of soundfile over 15 seconds

-

pointer = Line.kr(0, 1, 15);

-

// control pitch with MouseX

-

pitch = MouseX.kr(0.5, 2);

-

env = EnvGen.kr(Env([0.001, 1, 1, 0.001], [0.1, 14, 0.9], 'exp'), doneAction: 2);

-

out = WarpZ.ar(1, buffer, pointer, pitch, 0.1, envbuf, 8, 0.1, 2, 0.01, 0.1);

-

Out.ar(0, out * env);

-

}).send(s);

-


-

)

-


-

// use built-in env

-

x = Synth(\warp, [\buffer, b, \envbuf, -1])

-


-

// switch to the custom env

-

x.set(\envbuf, z)

-

x.set(\envbuf, -1);

-


-

x.free;

-


-

b.free;

-

z.free;

- -