repo.or.cz
/
chuck-blob.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
*** empty log message ***
[chuck-blob.git]
/
v2
/
examples
/
basic
/
whole.ck
blob
e81be1c69af48b6415f3c8214cde153963ee1b9b
1
// another candidate for lamest demo
2
3
// patch
4
SinOsc s => JCRev r => dac;
5
.5 => r.gain;
6
.075 => r.mix;
7
8
// note number
9
20 => float note;
10
11
// go up to 127
12
while( note < 128 )
13
{
14
// convert MIDI note to hz
15
Std.mtof( note ) => s.freq;
16
// turn down the volume gradually
17
.5 - (note/256.0) => s.gain;
18
19
// move up by whole step
20
note + 2 => note;
21
22
// advance time
23
.125::second => now;
24
}
25
26
// turn off s
27
0 => s.gain;
28
// wait a bit
29
2::second => now;
30