From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #37 Reply-To: sc-users Sender: owner-sc-users-digest@lists.io.com Errors-To: owner-sc-users-digest@lists.io.com Precedence: bulk sc-users-digest Tuesday, May 4 1999 Volume 01 : Number 037 ---------------------------------------------------------------------- Date: Fri, 23 Apr 1999 20:13:36 -0600 From: antiorp@tezcat.com Subject: Re: video in >The guts of the project are centered around Eric Singer's VideoIn object >in MAX, which is freely distributed at his website which is oddly >enough: > >www.ericsinger.com really busy rezultat. >There aren't many books under the subject heading. I know there were >people around doing it a few years ago with dancers, infrared sensors >and laser beams etc., but what I saw of it wasn't too compelling. | | | a n a l ! z a | | | ;400 after kopernicus moved humankind off the center stage of the physical universe descartes filled the void in two steps ;400 ________________________________________ error is the mark of the higher organism ;100 takemu stanju stvari _.. nato _ smrt za smrt - zlobni propagandi cari amici soldati i tempi della pace sono passati unsere geschichte ist eine geschichte der kaempfen zwischen die klassen by all means. a wonderful [american] world. http://www.m9ndfukc.com/kouboi ------------------------------ Date: Sat, 24 Apr 1999 16:54:29 -0400 From: Mic Berends <---@---.---> Subject: the mice take over. i need a mac program which takes over the cursor/mousein of the OS using 2 MIDI controllers for X & Y positioning and maybe a pedal message for the button. does this exist, or is anyone up to this simple coding challenge? ideally this would work via freemidi or freemidi-emulated OMS. Cheers, Mic. - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v ^ Mic Berends : in the end, : Tomorrow Maximum v ^ MINDESIGN limited : there can be : Heaven Kissing EP v ^ http://www.mindesign.com/ : only one. : available now. v ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Mon, 26 Apr 1999 08:49:01 +1000 From: Garth Paine <---@---.---> Subject: Re: the mice take over. Hi Mic >i need a mac program which takes over the cursor/mousein of the OS using >2 MIDI controllers for X & Y positioning and maybe a pedal message for >the button. does this exist, or is anyone up to this simple coding >challenge? ideally this would work via freemidi or freemidi-emulated OMS. You can do that easily in MAX - and save it as an application. However you can do it in SC as well using ( // mouse x controls xxxxx // mouse y controls xxxxxxx { var n, mx, my; n = 4; // number of simultaneous events mx = MIDIMostRecentNote.krHelvetica(1, 100, 6000, 'exponential'); my = MIDIMostRecentVelocity.Helveticakr(Helvetica1, 0, 2); xxxxxxxx }xxxxxx) }.play ) Cheers, Garth See information about my immersive interactive sound installations http://www.activatedspace.com.au ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. Activated Space . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant - ------------ ......http://www.activatedspace.com.au .......garth@activatedspace.com.au .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., ------------------------------ Date: Sun, 25 Apr 1999 18:15:45 -0600 From: antiorp@tezcat.com Subject: Re: the mice take over. >You can do that easily in MAX - and save it as an application. However >you can do it in SC as well using + dze button +? ------------------------------ Date: Mon, 26 Apr 1999 00:28:41 -0400 From: Mic Berends <---@---.---> Subject: Re: the mice take over. garth, thanks but i need something that does this @ the OS level, not for max or sc. it is so that i can control soundlab's clusterworks etc with a buchla lightning 2 (infrared midi wands). sc is running on the same powerbook but it understands midi already. steim's image/ine and arkaos xpose run on another powerbook for video processing/triggering & a pc laptop does scans/strobes control (yuk!). electronic dance music with triggered sounds+sequences and midi tap shoes. if i pull this off the way it is in my head it will be the ++coolest thing you've ever seen in popmusik! vnice artstuff & thought on your site (!) but i'm going for dancing and physicality here, with training on the (my) motion & gesture. the space is in the mind for a concert audience & in varied venues too, you know what i mean. cheers mate. Un-encumberedly yours, Mic. PeeEss: love to hear some of your thoughts on tracking the audience with coloureflective cards and methods of mapping for (their) identifiable interaction maybe with bigeye or some sgi proggy i've got. apologies for ~incoherent email! bye again! PeePeeEss: was that the shortest post we've *ever* seen from antiorp or what??? what up, droid! - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v ^ Mic Berends : in the end, : Tomorrow Maximum v ^ MINDESIGN limited : there can be : Heaven Kissing EP v ^ http://www.mindesign.com/ : only one. : available now. v ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Tue, 27 Apr 1999 10:20:34 -0700 (PDT) From: Richard Karpen <---@---.---> Subject: MOTU 2048 James, Does SC work by chance with the Mark of the Unicorn 2048 system for multi-channel I/O? We're about to buy a board to connect up to our ADAT and trying to decide between KORG and MOTU. The MOTU has some features that make it seem preferable, but if it doesn't or is not likely in the near future to work with SuperC. then that might sway our decision towards the Korg. Thanks for any info, advice. Richard Karpen =============================================================== Professor Richard Karpen, Music Composition and Computer Music Director, Center for Advanced Research Technology in the Arts and Humanities (CARTAH) Box 353680 University of Washington Seattle, WA 98195 Phone: (206) 543-7130 FAX: (206) 685-9499 email: karpen@u.washington.edu www: http://faculty.washington.edu/~karpen =============================================================== ------------------------------ Date: Thu, 29 Apr 1999 00:51:18 +0200 From: julian rohrhuber <---@---.---> Subject: !xosa#1 here is a little demo for a sequencer, but it has a strange little bug. who finds it? little bit like malaria- sometimes there, sometimes not. maybe you also know how to optimize it a bit so it doesn´t eat so much cpu ? //////////////////////////////////////////////////////////////////////////// /// ( var n, m, empty, beat, speed, arrays, frequencies, w, sound ; n = 16; m = 15; empty = 40; beat = 28; speed = 0.12; w = GUIWindow.new("!Xosa #1", Rect.newBy(40,80,200,600)); // make some empty control views for no-beats: empty.do({SliderView.new( w, Rect.newBy( 0, 0, 0, 0 ), "nil", 0, 0, 1, 0, 'linear')}); n.do({ arg i; SliderView.new(w, Rect.newBy(20, 24 * i + 20, 160, 14), nil, 0,0,0.1,0).mapToController(i+1,7)}); // define a function that gets its volume level from the Sliders (z) sound = { arg ort, f; var e; e = Env.perc(0.01, 0.03, 1, -4); EnvGen.ar(e, FSinOsc.ar(f, f.log/100), 0, z@@ort) }; // array of arrays, each representing a line arrays = Array.fill(m, { Array.fill( beat.rand, { (n+empty).rand } ) }); frequencies = Array.fill(m, { 1000.100.rand +100 }); Synth.play({ var a; a = Spawn.ar({ z = Array.fill(n+empty, { arg i; Plug.kr(w@i).value} ); Spawn.ar({ arg spawn, i, synth; Mix.arFill(m, { arg jeder; sound.value(arrays@@jeder@@i, frequencies@@jeder) }); }, 1, speed, n) }, 1, n*speed, nil, 88); Pan2.ar(a, LFPulse.kr(1/speed, 0.5, 2, -1)); }); w.close; ) ////Julian Rohrhuber/Hamburg :-------/ julian rohrhuber ------------------------------ Date: Wed, 28 Apr 1999 19:09:06 -0500 (CDT) From: "AUDIOSYNTH.COM" <---@---.---> Subject: Re: MOTU 2048 I hope to have the MOTU supported via ASIO in the near future. On Tue, 27 Apr 1999, Richard Karpen wrote: > > > James, > > Does SC work by chance with the Mark of the Unicorn 2048 system for > multi-channel I/O? We're about to buy a board to connect up to our > ADAT and trying to decide between KORG and MOTU. The MOTU has some > features that make it seem preferable, but if it doesn't or is not > likely in the near future to work with SuperC. then that might sway > our decision towards the Korg. > > Thanks for any info, advice. > > Richard Karpen > > =============================================================== > Professor Richard Karpen, Music Composition and Computer Music > Director, Center for Advanced Research Technology > in the Arts and Humanities (CARTAH) > Box 353680 > University of Washington > Seattle, WA 98195 > > Phone: (206) 543-7130 FAX: (206) 685-9499 > email: karpen@u.washington.edu > www: http://faculty.washington.edu/~karpen > =============================================================== > > > > > ------------------------------ Date: Wed, 28 Apr 1999 22:40:14 -0400 From: Mic Berends <---@---.---> Subject: Re: MOTU 2048 "AUDIOSYNTH.COM" wrote: > > I hope to have the MOTU supported via ASIO in the near future. yay! that means digigram VXpocket on the powerbook as well, then! hey smart guys: would it be terribly difficult to get MP3s playing in sc? is there an available lib to link to on the mac platform or such? i have a few applications for this if possible. also, james: i believe this was asked some time ago, but could there be upcoming a "player-module" or "save as app" function for sc like a max-play? Cheers, Mic. - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v ^ Mic Berends : in the end, : Tomorrow Maximum v ^ MINDESIGN limited : there can be : Heaven Kissing EP v ^ http://www.mindesign.com/ : only one. : available now. v ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Thu, 29 Apr 1999 20:59:40 -0400 From: Mark Ballora <---@---.---> Subject: Screen background color From someone who sometimes stares too long at the screen: Would it be practicable to implement a way to set the screen background and text color? ------------------------------ Date: 01 May 1999 19:29:11 EDT From: Taehong.Park@Dartmouth.EDU (Taehong Park) Subject: spawn next time hi, how can i control the spawn time using ControlIn.kr, it does not seem to let me do it... Thanks ( var w, a, b, c, d; var freq, amp = 0.25; w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), "SliderView", 400, 200, 600, 1, 'linear'); d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), "NumericalView", 400, 200, 600, 1, 'linear'); a.action = {b.value = a.value}; b.action = {a.value = b.value}; c.action = {d.value = c.value}; d.action = {c.value = d.value}; Synth.play({ var duration = 1; // starting duration value var cc; Spawn.ar({ arg spawn, i, synth; spawn.nextTime = ControlIn.kr(a); SinOsc.ar(ControlIn.kr(c),0,0.25) }, 1) }); w.close; ) ------------------------------ Date: Sat, 01 May 1999 21:45:56 +0000 From: Colby Leider <---@---.---> Subject: Re: spawn next time Hi, You can set up a Plug outside of the Spawn event loop, and just poll it within the Spawn. Colby ( var w, a, b, c, d; var freq, amp = 0.25; w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), "SliderView", 400, 200, 600, 0, 'exponential'); d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), "NumericalView", 400, 200, 600, 0, 'exponential'); a.action = {b.value = a.value}; b.action = {a.value = b.value}; c.action = {d.value = c.value}; d.action = {c.value = d.value}; Synth.play({ var duration = 1; // starting duration value var freq, nextTime; e = Env.triangle(1, 0.25); nextTime = Plug.kr(a); Spawn.ar({ arg spawn, i, synth; freq = Plug.kr(c); spawn.nextTime = {nextTime.poll}; SinOsc.ar(freq,0,0.25) * EnvGen.kr(e); }, 1, 1) }); w.close; ) Taehong Park wrote: > > hi, how can i control the spawn time using ControlIn.kr, it does not seem to let me do it... > Thanks > > ( > var w, a, b, c, d; > var freq, amp = 0.25; > w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); > a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); > b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); > > c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), "SliderView", 400, 200, 600, 1, 'linear'); > d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), "NumericalView", 400, 200, 600, 1, 'linear'); > > a.action = {b.value = a.value}; > b.action = {a.value = b.value}; > > c.action = {d.value = c.value}; > d.action = {c.value = d.value}; > > Synth.play({ > var duration = 1; // starting duration value > var cc; > Spawn.ar({ arg spawn, i, synth; > spawn.nextTime = ControlIn.kr(a); > SinOsc.ar(ControlIn.kr(c),0,0.25) > }, 1) > }); > w.close; > ) - -- Colby Leider Assistant Editor, Computer Music Journal Department of Music Princeton University Princeton NJ 08544 USA ------------------------------ Date: 02 May 1999 02:33:35 EDT From: Taehong.Park@Dartmouth.EDU (Taehong Park) Subject: Re: spawn next time Hi Colby, How are you doing? How is marriage life? Dartmouth is busy as always... Is that what you meant? It does not seem to work... Kevin seems to have gotten a gig in Korea... Good for him. Later, Tae Hong ( var w, a, b, c, d; var freq, amp = 0.25; w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), "SliderView", 400, 200, 600, 1, 'linear'); d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), "NumericalView", 400, 200, 600, 1, 'linear'); a.action = {b.value = a.value}; b.action = {a.value = b.value}; c.action = {d.value = c.value}; d.action = {c.value = d.value}; Synth.play({ var duration = 1; // starting duration value var cc, insert; insert = ControlIn.kr(a); Spawn.ar({ arg spawn, i, synth; spawn.nextTime = insert; //ControlIn.kr(a); SinOsc.ar(ControlIn.kr(c),0,0.25) }, 1) }); w.close; ) - --- You wrote: Hi, You can set up a Plug outside of the Spawn event loop, and just poll it within the Spawn. Colby ( var w, a, b, c, d; var freq, amp = 0.25; w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), "SliderView", 400, 200, 600, 0, 'exponential'); d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), "NumericalView", 400, 200, 600, 0, 'exponential'); a.action = {b.value = a.value}; b.action = {a.value = b.value}; c.action = {d.value = c.value}; d.action = {c.value = d.value}; Synth.play({ var duration = 1; // starting duration value var freq, nextTime; e = Env.triangle(1, 0.25); nextTime = Plug.kr(a); Spawn.ar({ arg spawn, i, synth; freq = Plug.kr(c); spawn.nextTime = {nextTime.poll}; SinOsc.ar(freq,0,0.25) * EnvGen.kr(e); }, 1, 1) }); w.close; ) Taehong Park wrote: > > hi, how can i control the spawn time using ControlIn.kr, it does not seem to let me do it... > Thanks > > ( > var w, a, b, c, d; > var freq, amp = 0.25; > w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); > a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); > b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); > > c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), "SliderView", 400, 200, 600, 1, 'linear'); > d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), "NumericalView", 400, 200, 600, 1, 'linear'); > > a.action = {b.value = a.value}; > b.action = {a.value = b.value}; > > c.action = {d.value = c.value}; > d.action = {c.value = d.value}; > > Synth.play({ > var duration = 1; // starting duration value > var cc; > Spawn.ar({ arg spawn, i, synth; > spawn.nextTime = ControlIn.kr(a); > SinOsc.ar(ControlIn.kr(c),0,0.25) > }, 1) > }); > w.close; > ) - -- Colby Leider Assistant Editor, Computer Music Journal Department of Music Princeton University Princeton NJ 08544 USA - --- end of quote --- ------------------------------ Date: Sun, 02 May 1999 10:36:52 +0000 From: Colby Leider <---@---.---> Subject: Re: spawn next time Hi Taehong, Things are going well here... Typical end-of-the-year craziness at school, as I know Dartmouth is as well. Married life is well. Kristine is driving up here in two weeks, so we'll be together all summer. The code I sent works on my machine. Are you using SC2.1.3? The Plug class has replaced the ControlIn class. Best, Colby Taehong Park wrote: > > Hi Colby, > How are you doing? How is marriage life? Dartmouth is busy as always... > > Is that what you meant? It does not seem to work... > Kevin seems to have gotten a gig in Korea... Good for him. > > Later, > Tae Hong > ( > var w, a, b, c, d; > var freq, amp = 0.25; > w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); > a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); > b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); > > c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), "SliderView", 400, 200, 600, 1, 'linear'); > d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), "NumericalView", 400, 200, 600, 1, 'linear'); > > a.action = {b.value = a.value}; > b.action = {a.value = b.value}; > > c.action = {d.value = c.value}; > d.action = {c.value = d.value}; > > Synth.play({ > var duration = 1; // starting duration value > var cc, insert; > insert = ControlIn.kr(a); > > Spawn.ar({ arg spawn, i, synth; > spawn.nextTime = insert; //ControlIn.kr(a); > SinOsc.ar(ControlIn.kr(c),0,0.25) > }, 1) > }); > w.close; > ) > > --- You wrote: > > Hi, > > You can set up a Plug outside of the Spawn event loop, and just poll it > within the Spawn. > > Colby > > ( > var w, a, b, c, d; > var freq, amp = 0.25; > w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); > a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), > "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); > b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), > "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); > > c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), > "SliderView", 400, 200, 600, 0, 'exponential'); > d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), > "NumericalView", 400, 200, 600, 0, 'exponential'); > > a.action = {b.value = a.value}; > b.action = {a.value = b.value}; > > c.action = {d.value = c.value}; > d.action = {c.value = d.value}; > > Synth.play({ > var duration = 1; // starting duration value > var freq, nextTime; > e = Env.triangle(1, 0.25); > nextTime = Plug.kr(a); > Spawn.ar({ arg spawn, i, synth; > freq = Plug.kr(c); > spawn.nextTime = {nextTime.poll}; > SinOsc.ar(freq,0,0.25) * EnvGen.kr(e); > }, 1, 1) > }); > w.close; > ) > > Taehong Park wrote: > > > > hi, how can i control the spawn time using ControlIn.kr, it does not seem to let me do it... > > Thanks > > > > ( > > var w, a, b, c, d; > > var freq, amp = 0.25; > > w = GUIWindow.new("panel", Rect.newBy( 128, 64, 313, 168 )); > > a = SliderView.new( w, Rect.newBy( 93, 37, 128, 20 ), "SliderView", 1.1, 1.0, 5.0, 0.01, 'linear'); > > b = NumericalView.new( w, Rect.newBy( 95, 70, 126, 19 ), "NumericalView", 1.1, 1.0, 5.0, 0.01, 'linear'); > > > > c = SliderView.new( w, Rect.newBy( 93, 102, 128, 20 ), "SliderView", 400, 200, 600, 1, 'linear'); > > d = NumericalView.new( w, Rect.newBy( 95, 135, 126, 19 ), "NumericalView", 400, 200, 600, 1, 'linear'); > > > > a.action = {b.value = a.value}; > > b.action = {a.value = b.value}; > > > > c.action = {d.value = c.value}; > > d.action = {c.value = d.value}; > > > > Synth.play({ > > var duration = 1; // starting duration value > > var cc; > > Spawn.ar({ arg spawn, i, synth; > > spawn.nextTime = ControlIn.kr(a); > > SinOsc.ar(ControlIn.kr(c),0,0.25) > > }, 1) > > }); > > w.close; > > ) > > -- > Colby Leider > Assistant Editor, Computer Music Journal > Department of Music > Princeton University > Princeton NJ 08544 > USA > --- end of quote --- - -- Colby Leider Assistant Editor, Computer Music Journal Department of Music Princeton University Princeton NJ 08544 USA ------------------------------ Date: Sun, 02 May 1999 11:03:11 +0000 From: Colby Leider <---@---.---> Subject: Re: spawn next time Whoa, that was embarrassing! Apologies... ------------------------------ Date: Sun, 02 May 1999 16:01:44 -0400 From: "crucial" <---@---.---> Subject: New Help Files 2.1.3 / SeqCollections James, Thanks for the Pattern Examples, that helps. I'll have to fiddle more. Plug ! Excellant ! Numerous help files in 2.1.3 and 2.1.2 distributions are aliases pointing to other unrelated help files. eg. True and False both point to ZeroCrossing. I'm still trying to get familiar with Streams and SequenceableCollections. Things I don't get............. ///////////////////// SequenceableCollection Superclass: Collection SequenceableCollection is a class of Collections whose elements can be indexed by an Integer. { var s; s=SequenceableCollection.new([16,4,3,5]); s.at(2).postln; } Integer 2 ERROR: Primitive '_BasicAt' failed. Not an indexable object. RECEIVER: Instance of SequenceableCollection /////////////////////// var s; s=SequenceableCollection.series(1,2,3); ERROR: 'add' should have been implemented by SequenceableCollection. CALL STACK: Object : subclassResponsibility arg this = ///////////////////////// Sorted Lists: var s; s=SortedList.new(4); s.addAll([0,1,2,3,5,4,3,2]); ERROR: Message 'addLast' not understood. RECEIVER: List's array: Instance of Array { (03394E0C, gc=00, fmt=01, flg=00, set=02) } ARGS: Instance of Array { (03393A94, gc=00, fmt=01, flg=00, set=00) indexed slots [1] 0 : Integer 0 } CALL STACK: Object : doesNotUnderstand arg this = __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Sun, 2 May 1999 18:25:56 -0700 (PDT) From: Richard Karpen <---@---.---> Subject: Pause I'm working on a piece for electric violin and computer using supercollider and need to be able turn different signal processing "instruments" on and off at various point during the performance. Each effect is in a Pause block with a GUI panel with buttons for each of the code blocks. Here's an idea of what I'm talking about in shorthand: Synth.scope({ Pause.ar({ process #1 goes here } b1.kr(2) ) + Pause.ar({ process #2goes here } b2.kr(2) ) + and so on with up to 40 different processes. So this works but not exactly as I need. Pause seems to do what its name suggests when you use it to stop a process. After starting and stopping a process using the gui box, when you restart that process again, it picks up where it left off. Many of my blocks of code have a specific trajectory (gets louder, softer, higher, lower, whatever) although the time frame is not fixed. I want it to start the same way each time but I do not want to give each process a fixed amount of time; I want to be able to stop it manually. So the question is, how can I make each Pause block reset itself to the initial state everytime I choose the box that turns it on. If this makes sense to anyone who knows how to do what I'm suggesting, please do let me know! Thanks very much! Richard Karpen ------------------------------ Date: Mon, 3 May 1999 08:43:56 -0500 (CDT) From: "AUDIOSYNTH.COM" <---@---.---> Subject: Re: Pause On Sun, 2 May 1999, Richard Karpen wrote: > So the question is, how can I make each Pause block reset itself to the > initial state everytime I choose the box that turns it on. You want to use TSpawn not Pause. You can use the check box as a trigger input to TSpawn that will trigger a new event. ------------------------------ Date: Mon, 3 May 1999 07:12:54 -0700 (PDT) From: Richard Karpen <---@---.---> Subject: Re: Pause Right, I had thought of that, but it's not clear to me how to turn it off without an envelope of some specific duration. Advice? Thanks. RK On Mon, 3 May 1999, AUDIOSYNTH.COM wrote: > > > On Sun, 2 May 1999, Richard Karpen wrote: > > > So the question is, how can I make each Pause block reset itself to the > > initial state everytime I choose the box that turns it on. > > You want to use TSpawn not Pause. You can use the check box as a trigger > input to TSpawn that will trigger a new event. > > > > ------------------------------ Date: Mon, 3 May 1999 09:47:02 -0500 (CDT) From: "AUDIOSYNTH.COM" <---@---.---> Subject: Re: Pause On Mon, 3 May 1999, Richard Karpen wrote: > > Right, I had thought of that, but it's not clear to me how to > turn it off without an envelope of some specific duration. > You can send the TSpawn a releaseAll message. THis will require that your sound have an EnvGen to release. Use 1 TSpawn per process that you want to kill. In order to send the message you'll need to get the pointer to TSpawn. One way to do this is as follows. outs = TSpawn.ar(...); //outs is an array of OutputProxys. // to get the TSpawn do this: tspawn = outs.source; mycheckbox.action = { if (mycheckbox.value == 0, { tspawn.releaseAll }); }; - --- ------------------------------ Date: Mon, 3 May 1999 09:48:08 -0700 (PDT) From: Richard Karpen <---@---.---> Subject: Re: Pause Hmmm. So now using mybox.kr as the trigger argument to the TSpawn I can start the process and using tpawn.releaseAll, I can kill it. But now I can't restart it. I tried doing: mybox.action = {if(mybox.value > 0, {tspawn.trigger}); }; but that didn't work to start or re-start the process. ? RK On Mon, 3 May 1999, AUDIOSYNTH.COM wrote: > > > On Mon, 3 May 1999, Richard Karpen wrote: > > > > > Right, I had thought of that, but it's not clear to me how to > > turn it off without an envelope of some specific duration. > > > > > You can send the TSpawn a releaseAll message. THis will require that your > sound have an EnvGen to release. Use 1 TSpawn per process that you want to > kill. > > In order to send the message you'll need to get the pointer to > TSpawn. One way to do this is as follows. > > outs = TSpawn.ar(...); > > //outs is an array of OutputProxys. > // to get the TSpawn do this: > > tspawn = outs.source; > > mycheckbox.action = { > if (mycheckbox.value == 0, { tspawn.releaseAll }); > }; > > > > --- > > > > ------------------------------ Date: Mon, 03 May 1999 22:15:41 +0200 From: julian rohrhuber <---@---.---> Subject: triggered synth.trepeat James, wouldn´t it be nice to have a trig input into a trepeat, like synth.trepeat(3, Impulse.kr(LFSaw.kr(0.1, 0.5, 2)), { x.source = 1.0.rand }) or something like this.? I was looking for something like MIDISync , something to receive a synchronizing signal from other devices. at the moment i would use Voicer plus this to get the speed: a = PulseCounter.kr(Voicer.ar({ Impulse.ar(0) }, ); b = PulseCounter.kr(Impulse.kr(1)); speed = a/b; cheers, Julian ------------------------------ Date: Mon, 3 May 1999 16:51:54 -0500 (CDT) From: "AUDIOSYNTH.COM" <---@---.---> Subject: Re: triggered synth.trepeat On Mon, 3 May 1999, julian rohrhuber wrote: > James, > > wouldn´t it be nice to have a trig input into a trepeat, like > synth.trepeat(3, Impulse.kr(LFSaw.kr(0.1, 0.5, 2)), { x.source = 1.0.rand }) > or something like this.? > trepeat cannot take a trigger input because it is a method not a unit generator. You can use Sequencer to trigger any action. Sequencer.kr({ x.source = 1.0.rand; 0.0 }, Impulse.kr(...) ); (The 0.0 is just to emphasize that the Sequencer function must return a Float.) Sequencer provides a count as the argument to its function. { Sequencer.kr({ arg a; a.postln; 0.0 }, Impulse.kr(2)); }.play; ------------------------------ Date: Mon, 3 May 1999 15:06:05 -0700 (PDT) From: Richard Karpen <---@---.---> Subject: Re: triggered synth.trepeat Actually I did get it to work and was just about to write. I had the MaxRepeats arg to TSpawn set to 1 instead of nil. So using box.kr to start and tspawn.releaseAll to stop works exactly as I wanted. Thanks for the help! RK On Mon, 3 May 1999, AUDIOSYNTH.COM wrote: > > > > On Mon, 3 May 1999, julian rohrhuber wrote: > > > James, > > > > wouldn´t it be nice to have a trig input into a trepeat, like > > synth.trepeat(3, Impulse.kr(LFSaw.kr(0.1, 0.5, 2)), { x.source = 1.0.rand }) > > or something like this.? > > > > > trepeat cannot take a trigger input because it is a method not a unit > generator. > > > You can use Sequencer to trigger any action. > > Sequencer.kr({ x.source = 1.0.rand; 0.0 }, Impulse.kr(...) ); > > (The 0.0 is just to emphasize that the Sequencer function must return a > Float.) > > Sequencer provides a count as the argument to its function. > > { Sequencer.kr({ arg a; a.postln; 0.0 }, Impulse.kr(2)); }.play; > > > > ------------------------------ Date: Mon, 3 May 1999 17:20:43 -0500 (CDT) From: "AUDIOSYNTH.COM" <---@---.---> Subject: Re: Pause On Mon, 3 May 1999, Richard Karpen wrote: > > Hmmm. So now using mybox.kr as the trigger argument to the TSpawn > I can start the process and using tpawn.releaseAll, I can kill it. > But now I can't restart it. I tried doing: > > mybox.action = {if(mybox.value > 0, {tspawn.trigger}); }; > > but that didn't work to start or re-start the process. > > ? ( var w, env, out, tspawn; w = GUIWindow.new("panel", Rect.newBy( 128, 64, 244, 118 )); CheckBoxView.new( w, Rect.newBy( 18, 20, 128, 20 ), "CheckBoxView", 0, 0, 1, 0, 'linear'); env = Env.new(#[1,1,0],[0.2, 0], 'linear', 1); Synth.play({ out = TSpawn.ar({ EnvGen.kr(env) * LFNoise2.ar(XLine.kr(800, 8000, 12), 0.2); }, 1, nil, w.at(0).kr); tspawn = out.source; w.at(0).action = { if (w.at(0).value == 0, { tspawn.releaseAll; }); }; out; }); ) ------------------------------ Date: Tue, 04 May 1999 01:47:58 +0200 From: julian rohrhuber <---@---.---> Subject: Re: triggered synth.trepeat James, thanks, I think I like Sequencer :) there was a request for variable random distribution by David Cottle (05.04.99) I tried to use a more general (geometric) approach, but my code is too buggy. anyway, I throw it in, maybe you can use it. /////////////??/?arrarand////// ( var levels, corners, a, b, x, y, z, w, index, out, max, yscale; index = 0; levels = #[ 7.2, 1.3, 3, 0]; corners = #[ 0, 1.20, 3.8, 4.8]; yscale = 10; max = levels.maxItem; x = 0 z = 0 y = max+1; //offset y so function starts a = corners.at(0); b = corners.at(corners.size-1); // check whether the point(x,y) falls below or above the line while({y > (z * x + levels.at(index)), { // get new coordinates x = 1.0.rand * (b - a) + a ; y = 1.0.rand * yscale ; // check between which of the corners the point has fallen corners.do({ arg item, i; if( x>=item && (x Subject: TSpawn vs. Pause The code below is something I created in response to a request to create "something Arabic." I started with S. Liljegren's Pluck1 and the "Native Algorhythms" example and came up with the following. It works, but I suspect it could be more efficient. - high Ugen/CPU - creating sound files - synth.record produces bad files synth.write works fine I took interest in yesterday's discussion about using TSpawns instead of Pauses. I can see that TSpawns are more efficient. But since I'm using the i argument of each Spawn as a beat marker, and therefore do not want initialization with each Spawned event, I kept everything in Pauses. I'm not sure this configuration is optimal -- I suspect this might be a case for Patterns. It starts with a canned intro of three phrases, followed by a drone and drumbeat, then a series of phrases chosen at random from a library, to a melody generated by a little order 1 Markov chain, back to the phrases and then back to the Markov. It takes about 2:00 to go through those steps, and then it continues until stopped. // PSEUDO ARABIE ( var pat, freq, excitation, resonator, lowdrum, hidrum, length, markov, seq; var env, persec; var fundamental, scale; env = Env.new(#[1, 1, 0],#[1, 0.001]); fundamental=220; // TONIC TONE persec=6; // TEMPO // Markov function, weighted output based on input integers -1 to 12, integers used as scale index markov={ arg index; var output; if ((index == (-1)), { output=#[0, 7, -1, -1, -1 ].choose; }, { if ( (index == 0), { output=#[ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9 ].choose; }, { if ( (index == 1 ), { output=#[ 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6 ].choose; }, { if ( (index == 2), { output=#[ -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 10, 10, 10, 11, 11 ].choose; }, { if ( (index == 3), { output=#[ 1, 5, 5, 6, 7, 7, 7, 7, 7, 8, 8, 8, 10, 10, 10, 10, 11 ].choose; }, { if ( (index == 4), { output=#[ -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 6, 7, 7, 8, 8, 8, 9, 10, 10, 10, 11, 12 ].choose; }, { if ( (index == 5), { output=#[ -1, -1, -1, -1, -1, -1, 4, 4, 4, 3, 2, 2, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 12, 12 ].choose; }, { if ( (index == 6 ), { output=#[ -1, -1, -1, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 4, 2, 8, 8, 9, 10, 11 ].choose; }, { if ( (index == 7 ), { output=#[ 7, -1, -1, -1, -1, -1, -1, 2, 9, 9, 10, 10, 5, 5 ].choose; }, { if ( (index == 8 ), { output=#[ 6, 10, 9, 9, 9, 9, 9, 4, 4, 4, 11, 11 ].choose; }, { if ( (index == 9 ), { output=#[ 7, 7, 7, 6, 5, 2, 11, 11, 11, 11, 11, 12, 12, 12 ].choose; }, { if ( (index == 10 ), { output=#[ 12, 12, 12, 12, 12, 9, 8, 8, 6, 6 ].choose; }, { if ( (index == 11 ), { output=#[ 12, 12, 12, 12, 12, 7, 4 ].choose; }, { if ( (index == 12 ), { output=#[ -1, -1, - -1, -1, -1, -1, -1, -1, 12, 10, 9, 0, 0, 0, 7 ].choose; } )} )} )} )} )} )} )} )} )} )} )} )} )} ); }; // DEFINE AN ARAB SCALE, WITH ALTERED m2, M3, M6, M7: scale=[1, 1.09, 1.12, 1.19, 1.22, 1.33, 1.41, 1.5, 1.54, 1.68, 1.78, 1.83, 2].collect({ arg item, i; item*fundamental }); // SEQUENCES FOR HIGH DRUM (a la "NATIVE ALGORHYTHMS" EXAMPLE) pat = Prand.new([ Pseq.new(#[0.0, 0.0, 0.0, 0.7, 0.0, 0.0, 0.0, 0.7, 0.0, 0.0]), Pseq.new(#[0.0, 0.2, 0.0, 0.7, 0.0, 0.0, 0.0, 0.7, 0.0, 0.0]), Pseq.new(#[0.0, 0.0, 0.0, 0.7, 0.0, 0.0, 0.0, 0.7, 0.0, 0.2]), Pseq.new(#[0.0, 0.0, 0.0, 0.7, 0.2, 0.2, 0.0, 0.7, 0.0, 0.0]), Pseq.new(#[0.0, 0.0, 0.0, 0.7, 0.0, 0.0, 0.2, 0.7, 0.2, 0.0]), Pseq.new(#[0.0, 0.0, 0.2, 0.7, 0.0, 0.0, 0.0, 0.7, 0.0, 0.0]) ], inf); Synth.play({ arg synth; var ldfreq, hdfreq, ldvol, hdvol, envlev; var motifspawner, drumbeat, drone, intro, chain, measure; var nextindex; measure = 10/persec; nextindex=Plug.kr(0); intro=Plug.kr(1); drone=Plug.kr(0); drumbeat=Plug.kr(0); motifspawner=Plug.kr(0); ldfreq=Plug.kr(150); hdfreq=Plug.kr(200); ldvol=Plug.kr(0); hdvol=Plug.kr(0); chain=Plug.kr(0); t = LFPulse.ar(persec); lowdrum=FSinOsc.ar(ldfreq, 0.65); hidrum=Resonz.ar(WhiteNoise.ar(14), hdfreq, 0.008, 4); synth.repeat(0, 1/persec, { var newldfreq, newhdfreq; // ALTER PITCHES OF DRUMS EACH TEMPO INCREMENT: newldfreq=125+25.rand; newhdfreq=200+100.rand; ldfreq.source=newldfreq; hdfreq.source=newhdfreq; // SYNTH.TIME CONTROLS WHICH PAUSE UNITS ARE SOUNDING if ( synth.time > 15, { intro.source=0; }); // Start with intro, turn off after 15 sec. if ( synth.time > (measure*8), // Meas 9 - start tonic drone { drone.source=1; }); if ( synth.time > (measure*10), // Meas 10 - - start drums { drumbeat.source=1; }); if ( synth.time > (measure*12), // Meas 12 - - start choosing from a set of motifs { motifspawner.source=1 }); if (synth.time > (measure*29), // Meas 29 - - stop playing the motifs { motifspawner.source=0; }); if (synth.time > (measure*30), // Meas 30 - - stop droning tonic, use Markov to generate melody { drone.source=0; chain.source=1; }); if (synth.time > (measure*50), // Meas 50 - - stop Markov melody, start tonic drone { chain.source=0; drone.source=1; }); if (synth.time > (measure*52), // Meas 52 - - start playing from motifs { motifspawner.source=1; }); if (synth.time > (measure*70), // Meas 70 - - stop playing the motifs { motifspawner.source=0; }); if (synth.time > (measure*71), // Meas 71 - - start Markov melody, (this time with the tonic drone) { chain.source=1; }); }); // ALL INSTRUMENTS ARE WITHIN PAUSE.AR() UNIT GENERATORS. // THUS THEY ARE CONTROLLED BY THE BOOLEAN VARIABLES. // THREE INTRO PHRASES (for 15 sec.) Pause.ar( Cycle.ar([{ // Cycle Phrase 1 Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[0, 0, 0, 0, 0, 0, 2, 0, 0, 8, 9, 0, 0, 9, 0, 9, 9, 0, 9, 0, 0, 0, 0, 0, 0 ]; amplist= #[0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0.9, 1.0, 0, 0, 1.0, 0, 0.7, 0.6, 0, 0.9, 0, 0, 0, 0, 0, 0 ]; // STAFFAN LILJEGREN'S PLUCK1 INSTRUMENT x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*0.8), 25); }, // Cycle Phrase 2 { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[0, 0, 9, 0, 10, 0, 9, 8, 9, 0, 0, 0, 0, 0, 0 ]; amplist= #[0, 0, 1.0, 0, 0.9, 0, 1.1, 1.0, 1.0, 0, 0, 0, 0, 0, 0 ]; x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*0.8), 15); }, // Cycle Phrase 3 { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[ 2, 0, 3, 6, 0, 6, 0, 6, 6, 0, 0, 4, 0, 2, 0, 0, 0, 1, 0, 0 ]; amplist= #[0.9, 0, 1.0, 0.9, 0, 0.9, 0, 1.1, 0.8, 0, 0, 0.7, 0, 1.1, 0, 0, 0, 0.9, 0, 0 ]; x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*0.7), 20); }], 1, nil, 1), intro) + // PLUCKED INSTRUMENT DRONES THE TONIC (starting at beat 80) Pause.ar( Spawn.ar({ arg spawn, i, synth; var index, xamp; index=0; if ( (( i % 10) == 0), // strongest on downbeat; { xamp = 0.9 }, // medium strong on beat 6; { if ( (( i % 10) == 6), // all others soft or silent { xamp = 0.7 }, { xamp = 0.3.rand } )} ); x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(xamp)); x = CombL.ar(x, 0.05, 1/scale.at(index), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/persec), drone) + // LOW AND HIGH DRUMS ALTERNATE IN 10/8 METER (starting at beat 100) Pause.ar({ Decay2.ar( // noise drum ImpulseSequencer.ar(pat.asStream, t), 0.002, 0.3, hidrum) + Decay2.ar( // bass drum 1 2 3 4 5 6 7 8 9 10 ImpulseSequencer.ar(`[0.8, 0.0, 0.0, 0.0, 0.0, 0.6, 0.4, 0.0, 0.0, 0.0], t), 0.01, 0.5, lowdrum) }, drumbeat) + // MELODIC FRAGMENTS (OR SILENCE OR HARMONIC DRONES), CHOSEN RANDOMLY (starting at beat 110) Pause.ar( RandomEvent.ar([{ Spawn.ar({ arg spawn, i, synth; var xamp, indexlist; indexlist=Array.fill(20, 3); /* FOR DEBUGGING, display motif id during playback; all commented out if (i == 0, { "A".postln; }); */ if ( (( i % 10) == 0), { xamp = 0.9 }, { if ( (( i % 10) == 6), { xamp = 0.7 }, { xamp = 0.3.rand } )} ); x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(xamp)); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/persec, 20); }, { Spawn.ar({ arg spawn, i, synth; var xamp, indexlist; indexlist=Array.fill(20, 8); /* if (i == 0, { "B".postln; }); */ if ( (( i % 10) == 0), { xamp = 0.9 }, { if ( (( i % 10) == 6), { xamp = 0.7 }, { xamp = 0.3.rand } )} ); x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(xamp)); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/persec, 20); }, { Spawn.ar({ arg spawn, i, synth; var xamp, indexlist; indexlist=Array.fill(30, 9); /* if (i == 0, { "new".postln; }); */ if ( (( i % 10) == 0), { xamp = 0.9 }, { if ( (( i % 10) == 6), { xamp = 0.7 }, { xamp = 0.3.rand } )} ); x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(xamp)); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/persec, 30); }, { Spawn.ar({ arg spawn, i, synth; var xamp, indexlist; indexlist=Array.fill(20, 4); /* if (i == 0, { "C".postln; }); */ if ( (( i % 10) == 0), { xamp = 0.9 }, { if ( (( i % 10) == 6), { xamp = 0.7 }, { xamp = 0.3.rand } )} ); x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(xamp)); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/persec, 20); }, { Spawn.ar({ arg spawn, i, synth; var xamp, indexlist; indexlist=Array.fill(20, 7); /* if (i == 0, { "D".postln; }); */ if ( (( i % 10) == 0), { xamp = 0.9 }, { if ( (( i % 10) == 6), { xamp = 0.7 }, { xamp = 0.3.rand } )} ); x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(xamp)); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/persec, 20); }, { Spawn.ar({ nil }, 1, 1/persec, 10); }, { Spawn.ar({ nil }, 1, 1/persec, 20); }, { Spawn.ar({ nil }, 1, 1/persec, 10); }, { Spawn.ar({ nil }, 1, 1/persec, 20); }, { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[ 0, 0, 0, 0, 5, 0, 6, 0, 11, 0, 10, 11, 9, 0, 8, 0, 6, 0, 4, 0, 12, 0, 10, 11, 9, 0, 8, 0, 6, 0, 4, 0, 5, 0, 0, 0, 0, 0, 0, 0 ]; amplist= #[ 0, 0, 0, 0, 0.8, 0, 0.6, 0, 0.9, 0, 0.4, 0.5, 0.7, 0, 0.8, 0, 0.8, 0, 0, 0, 0.9, 0, 0.4, 0.5, 0.7, 0, 0.8, 0, 0.9, 0, 0.7, 0, 0.9, 0, 0, 0, 0, 0, 0, 0 ]; /* if ( i == 0, { "G".postln; }); */ x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*2), 40); }, { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[ 0, 0, 5, 0, 3, 4, 2, 0, 4, 0, 4, 0, 0, 0, 4, 0, 4, 0, 4, 3, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0 ]; amplist= #[ 0, 0, 0.7, 0, 0.5, 0.5, 0.8, 0, 0.7, 0, 0.8, 0, 0, 0, 0.7, 0, 0.6, 0, 0.8, 0.6, 0.7, 0, 0, 0, 0, 0, 0.8, 0, 0, 0 ]; /* if ( i == 0, { "H".postln; }); */ x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*2), 30); }, { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[ 8, 0, 0, 9, 0, 0, 0, 0, 0, 0 ]; amplist= #[ 0.9, 0, 0, 1.3, 0, 0, 0, 0, 0, 0 ]; /* if ( i == 0, { "I".postln; }); */ x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec), 10); }, { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[ 6, 0, 7, 0, 7, 0, 4, 5, 3, 0, 2, 0, 6, 0, 7, 0, 7, 0, 4, 5, 3, 0, 2, 0, 7, 0, 0, 0, 0, 0 ]; amplist= #[ 0.8, 0, 0.7, 0, 0.8, 0, 0.5, 0.6, 0.8, 0, 0.9, 0, 0.8, 0, 0.7, 0, 0.8, 0, 0.5, 0.6, 0.8, 0, 0.9, 0, 1.0, 0, 0, 0, 0, 0 ]; /* if ( i == 0, { "J".postln; }); */ x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*2), 30); }, { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[ 11, 0, 10, 11, 10, 0, 7, 0, 10, 0, 0, 0, 10, 0, 10, 0, 0, 0, 0, 0]; amplist= #[ 0.8, 0, 0.6, 0.5, 0.7, 0, 0.7, 0, 1.0, 0, 0, 0, 1.1, 0, 0.8, 0, 0, 0, 0, 0]; /* if ( i == 0, { "K".postln; }); */ x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*2), 20); }, { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 8, 0, 7, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 8, 0, 7, 6, 7, 0, 0, 0, 0, 0 ]; amplist= #[0, 0, 0, 0, 0, 0, 0.7, 0, 0.7, 0, 0.9, 0, 0.5, 0.4, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.7, 0, 0.7, 0, 0.9, 0, 0.5, 0.4, 0.8, 0, 0, 0, 0, 0 ]; /* if ( i == 0, { "L".postln; }); */ x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*2), 40); }, { Spawn.ar({ arg spawn, i, synth; var amplist, indexlist; indexlist=#[12, 0, 10, 11, 7, 8, 5, 0, 3, 0, 1, 0, 12, 0, 10, 11, 7, 8, 5, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0 ]; amplist= #[0.8, 0, 0.7, 0.6, 0.7, 0.6, 0.8, 0, 0.9, 0, 0.8, 0, 0.8, 0, 0.7, 0.6, 0.7, 0.6, 0.8, 0, 0.9, 0, 0.8, 0, 0.9, 0, 0, 0, 0, 0 ]; /* if ( i == 0, { "M".postln; }); */ x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(amplist.at(i))); x = CombL.ar(x, 0.05, 1/scale.at(indexlist.at(i)), 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec*2), 30); } ], 1, nil, nil), motifspawner) + // 1ST ORDER MARKOV CHAIN Pause.ar( Spawn.ar({ arg spawn, i, synth; var interim, nextval, freq, xamp; // Index value stored in variable external to the Spawn, nextindex. // The local variable interim polls nextindex, and feeds the value into // the Markov function. // Because nextindex sometimes was a float, I specify that interim // is either -1 or the ceiling of the polled value if ( isNegative(nextindex.poll), { interim = -1; }, { interim=nextindex.poll.ceil;}); // Markov function nextval=markov.value(interim); // nextval.postln; // Update global variable nextindex.source=nextval.ceil; if ( isNegative(nextval), { freq=1; xamp=0; }, { freq=scale.at(nextval); xamp = 0.3.rand + 0.4 } ); // freq.postln; x = Decay.ar(Impulse.ar(0, 0.1+0.1.rand), 0.1+0.2.rand, BrownNoise.ar(xamp)); x = CombL.ar(x, 0.05, 1/freq, 2+1.0.rand, EnvGen.ar(env)); }, 1, 1/(persec) ), chain); }) ) ------------------------------ End of sc-users-digest V1 #37 *****************************