summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.5.2/lib/rouge/demos/supercollider
blob: 23a8e4b70b7aa69a5e4963b828692adddaa72544 (plain)
1
2
3
4
5
6
7
8
9
10
11
// modulate a sine frequency and a noise amplitude with another sine
// whose frequency depends on the horizontal mouse pointer position
~myFunction = {
        var x = SinOsc.ar(MouseX.kr(1, 100));
        SinOsc.ar(300 * x + 800, 0, 0.1)
        +
        PinkNoise.ar(0.1 * x + 0.1)
};

~myFunction.play;
"that's all, folks!".postln;