[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] Guess the melody
- To: sc-users <sc-users@xxxxxxxxxxxxxxxx>
- Subject: [sc-users] Guess the melody
- From: Lucas Samaruga <samarugalucas@xxxxxxxxx>
- Date: Mon, 27 Jul 2009 19:12:23 -0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=5Eul3r/aXX2VWAF0wxM6JAg894C0JclVv3d4DK6ql3w=; b=pPfcXdJwTW/83Z5NRAIo8lMxqS77VSWqUutJ8JHerAsUmcxJfwUnbRouDfiN0gFZMJ M6wxb1s1Ysemt1d9WVX0MJ5w/fPLANya8delwuG6m2f6W5LwlkfkOxkML9cNYP60f71v aGPPMlsYEbVptWTut+XpACfvDJlSSsequtb6w=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=iKCyb07FOzRwmJIWXudjUIFAOOKl11rhUhaPF4mLCsykXQLSTEgR0yhJLbfL/WY8u7 zB+zNO7zMhfCrQGEQTbsIkiI/bR1RZ6JtgjbjtNm7So3o1ZbB/jVzLbn/l+rWKlTiwis od7d1stIbgnbZV73vtTG+1NlhMfPnNrU5F41E=
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
Hi
The game is "guess the melody"
(old guessing game)
(
SynthDef(\diffalea, { arg freq = 220, gate = 1, amp = 1, lowFreq =
1000, hiFreq = 1500;
var freq1 = Rand(lowFreq, hiFreq);
var freq2 = freq1 - freq;
var env = EnvGen.kr(Env.asr(0.01, 1, 0.01, 1, 'linear'), gate, doneAction: 2);
Out.ar(0, SinOsc.ar([freq1, freq2], 0.5pi.rand, mul:amp*env));
//Out.ar(1, Mix(SinOsc.ar([freq1, freq2], 0.5pi.rand, mul:amp*env)));
}).memStore;
~freqs = [130.8127826503, 146.8323839587, 164.81377845643,
130.8127826503, 130.8127826503, 146.8323839587, 164.81377845643,
130.8127826503, 164.81377845643, 174.6141157165, 195.99771799087,
164.81377845643, 174.6141157165, 195.99771799087, 195.99771799087,
220, 195.99771799087, 174.6141157165, 164.81377845643, 130.8127826503,
195.99771799087, 220, 195.99771799087, 174.6141157165,
164.81377845643, 130.8127826503, 146.8323839587, 97.998858995437,
130.8127826503, 146.8323839587, 97.998858995437, 130.8127826503];
~duras = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 0.5, 0.5, 0.5,
0.5, 1, 1, 0.5, 0.5, 0.5, 0.5, 1, 1, 1, 1, 2, 1, 1, 2];
)
(
~tempo = TempoClock(80/60);
Task {
Pbind(
\instrument, \diffalea,
\lowFreq, 4200, \hiFreq, 4400,
\freq, Pseq(~freqs, 1),
\dur, Pseq(~duras, 1)
).play(~tempo);
8.wait;
Pbind(
\instrument, \diffalea,
\lowFreq, 1200, \hiFreq, 1400,
\freq, Pseq(~freqs, 1),
\dur, Pseq(~duras, 1)
).play(~tempo);
8.wait;
Pbind(
\instrument, \diffalea,
\lowFreq, 2200, \hiFreq, 2400,
\freq, Pseq(~freqs, 1),
\dur, Pseq(~duras, 1)
).play(~tempo);
}.play(~tempo);
)
Warning it's loud!
Is there other way to make a canon with Pbind?
Saludos
Lucas
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/