Skip to content

Latest commit

 

History

History
299 lines (205 loc) · 5.67 KB

File metadata and controls

299 lines (205 loc) · 5.67 KB

Basics

Playing functions

Start playing a function:

{ SinOsc.arps(400) } ++> \mysound;

Replace it with another function:

{ PinkNoise.arps.perc(0.5) } ++> \mysound;

Replay the previously stored function:

\mysound.play;

Playing synthdefs

"default" ++> \mysound;

QUOTE Set play source without actually playing

Replace the play function without playing the synth:

{ SinOsc.arps(Rand(400, 800)) } +> \mysound;

Trigger manually at any point:

\mysound.play;

Releasing

Release with default time:

\mysound.release;

Release with custom time:

(First, start the sound again:)

\mysound.play;

Now release:

\mysound release: 5;

Setting fade time (for cross fade)

\mysound.fadeTime = 1;

Try several different sounds with cross fade, one after the other:

{ Blip.arps(Line.kr(Rand(400, 500), Rand(500, 800), 0.2), 3) } ++> \mysound;
{ WhiteNoise.arps } ++> \mysound;
{ PinkNoise.arps } ++> \mysound;

Setting function/synth arguments (parameters)

Set a parameter to use in the synth’s arguments:

600 +>.freq \mysound;

Test it:

{ SinOsc.arps(\freq.kr(400)) } +> \mysound;

Setting a new parameter value immediately sends it to the synth:

800 +>.freq \mysound;

UGen shortcuts

(Incomplete)

sine

Multiply UGen or UGen array output with EnvGen.kr(Env.sine(\dur.kr(dur), level)). This provides a sine-shaped envelope, whose duration is controlled by the value of dur in arguments.

Set the function to play.

{ SinOsc.arps(Rand(400, 800)).sine } ++> \envtest;

Test using default duration value:

\envtest.play;

Observe changing duration of envelope according to value of dur from timing pattern:

[0.05, 0.1, 0.5, 1].collect(_.pn(8)).pseq |> \envtest;

Alternatively:

[1, 0.1, 0.5, 2, 0.1.pn(4)].prand |> \envtest;

perc

Like sine but with Env.perc.

arp

Create control name amp with default value 0.1 and multiply it with the receiver UGen or UGen array.

arps

Like arp, but send the output to an array of 2 channels. Can be used to quickly convert a UGen functions output to stereo ouput + provide amplitude control.

***

Linking output to input of other SynthPlayers

Create a SynthPlayer to be the source:

{ PinkNoise.arp() } ++> \source;

Create an effect to play the source with:

{ Resonz.ar(In.ar(\in.ar(0)) * 10, LFNoise0.ar(30).range(300, 8000), 0.01) } ++> \effect1;

Send source to effect:

\source +> \effect1;

Second effect:

{ In.ar(\in.ar(0)) * 2 * Decay2.kr(Dust.kr(1.dup, 3), 0.05, 1) } ++> \effect2;

Send first effect to second effect, creating chain source -> effect1 -> effect2

\effect1 +> \effect2;

Unlink output and send to root channel output (Channel 0):

Example 1: Send effect1 directly to output, bypassing effect2:

\effect1.toRoot;

Example 2: Send source directly to output, bypassing effect1:

\source.toRoot;

Playing patterns

Playing patterns in parameters

Set a function to play the pattern with

{ SinOsc.arps(\freq.kr(400)) } +> \patsound;

Obtain successive values of parameter freq from a pattern:

[60, 65, 67].midicps.pseq +>.freq \patsound;

Try playing patsound repeatedly, to hear the sequence of values:

\patsound.play; // run this several times in sequence

Operator Combinations

\taskname *> pattern

\synthPlayername *> <number or pattern>;
  1. Get TaskPlayer of same name as SynthPlayer
  2. Set its duration pattern
  3. Connect SynthPlayer to TaskPlayer
  4. Start TaskPlayer
\pock *> 0.3;

{ function } +> \synthPlayername

{ SinOsc.arps(Rand(200, 400)).perc } +> \pock;

{ } +> \name *> pattern

{ Resonz.arps(PinkNoise.ar(200), Rand(1500, 2500), 0.001) } +> \whistle *> 0.1;

\synthPlayername *> \taskname

\pock *> \whistle;

{ } +> \synthPlayername *> \taskname

{ SinOsc.arps(\freq.kr(800)).sine } +> \sine *> \whistle;
[70, 75, 79, 80, 82, 63].midicps.prand +>.freq \sine;
\sine *> 0.2;
"default" +> \sine;
{ f = \freq.kr(500); Blip.arps(Line.kr(f * 0.95, f, 0.1), Rand(3, 10)).perc } +> \sine *> [0.1, 0.2].prand;
\sine *> \whistle;
\sine *> \pock;