[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Guess the melody
- To: sc-users@xxxxxxxxxxxxxxxx
- Subject: Re: [sc-users] Guess the melody
- From: Stathis <stathis.portaritis@xxxxxxxxxxxxxx>
- Date: Mon, 27 Jul 2009 23:34:42 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=h4VQrn8dFOyW956mPigrxV993xHWSOqEwMhxbImdahQ=; b=uTGsjPhvusneu86Vh100TVW6AikWgJ4A/PIfA8HK4rc2pGqPBJJA95/L8MKb1QXSiB xqITmYCLgfUax/cGSDPD9RFOL49yrmwtK0Jp3rdIOWEK9yemBDhk+qJxEoM2wvhtNdAz RfHs9pVK8CVP07Ab2nMB5wHVdpgtUpDz6xYHY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=lr6kZd2E+IROAG7rB8AXO2wZndPo8KLcbQd6WqxVHeBKvgayebno0nSC4VTsZF24Yw uofddubBZ83hgo5+/O7H3ik59Hx8+gdPus3MbCtS83MQvf1MePh3jAA+WmhOZAxV+XwW pHu9KKDHjOJKyfFkQqfC2LitL//o1NOW5aJdI=
- In-reply-to: <ad6bb4fe0907271512i4f8e8aa9pbfd85d221211740f@xxxxxxxxxxxxxx>
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- References: <ad6bb4fe0907271512i4f8e8aa9pbfd85d221211740f@xxxxxxxxxxxxxx>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
Frere Jacques
Didn't even have to play it.
St.
2009/7/27 Lucas Samaruga
<samarugalucas@xxxxxxxxx>
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/