Skip to content

Instantly share code, notes, and snippets.

@iani
Created May 27, 2016 12:59
Show Gist options
  • Select an option

  • Save iani/2ad669a628d0debbfba3617e2f5e0cc5 to your computer and use it in GitHub Desktop.

Select an option

Save iani/2ad669a628d0debbfba3617e2f5e0cc5 to your computer and use it in GitHub Desktop.
Short example from a session with Vangelis
// Wind
//:
~wind = { | freq = 1000 |
// Alternative:
// freq = \freq.kr (1000);
LPF.ar (
WhiteNoise.ar (0.2),
freq
)
}.play
//:
~wind = { | freq = 1000 |
// Alternative:
// freq = \freq.kr (1000);
Resonz.ar (
WhiteNoise.ar (2.2),
freq,
0.01
)
}.play
//:
~wind.set (\freq, 2500);
//:
~player = {
loop {
~wind.set (\freq, 400 exprand: 2000);
0.1.wait;
}
}.fork;
//: adding sequences of time and frequency
~player = {
var dt, freq;
dt = Pseq ([0.1, 0.2, 0.5, 0.1, 1], inf).asStream;
freq = Pseq ([60, 63, 65, 67, 70].midicps * 2, inf).asStream;
loop {
~wind.set (\freq, freq.next);
dt.next.wait;
}
}.fork;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment