From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #30 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 Friday, March 12 1999 Volume 01 : Number 030 ---------------------------------------------------------------------- Date: Thu, 04 Mar 1999 12:35:08 -0800 From: Mark Polishook <---@---.---> Subject: Patterns and Streams Could someone recommend a resource/introduction to Patterns and Streams...Is there a specific Smalltalk text, for example, that covers this? Thanks, Mark ------------------------------ Date: Fri, 5 Mar 1999 14:12:28 +1100 From: Garth Paine <---@---.---> Subject: OMS, IAC? Hi all, I am wondering if anyone can shed some light on how SC addresses OMS. I see it come up in the opening page as present, but I can't find any documentation on how I address individual ports. I want to be able to address the IAC bus so that I can run MAX and SC on the same machine and send MIDI from Max to SC internally. I realise I could use 2 MIDI interfaces, one on each port (modem + printer), but it seems very cumbersome. So How do I address the IAC bus, or any other bus within OMS. Cheers, Garth See information about my new immersive interactive sound installations http://creativeaccess.com.au/~garth/ ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., ------------------------------ Date: Fri, 05 Mar 1999 00:17:57 -0500 From: "crucial" <---@---.---> Subject: hitting the unhittable Talking with my father, who is a Professor of Mathematics, the idea came up that it is possible to model drums that consist of a surface that is not possible in 3d, but its still possible to compute the Eigen (sp. ?) values, model the system in the computer and hit the thing. Anyone thought or heard of this idea ? What is the model called (drum type modelling, enharmonic) ? Starts with a B___ __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Fri, 5 Mar 1999 07:19:50 -0600 From: James McCartney <---@---.---> Subject: Re: OMS, IAC? Subject: BOUNCE sc-users@lists.io.com: Non-member submission from [mmacpherson@garbo.nepean.uws.EDU.AU (Macciza Macpherson)] From: mmacpherson@garbo.nepean.uws.EDU.AU (Macciza Macpherson) Subject: Re: OMS, IAC? Greetings from a Long-time Lurker, I have finally returned to studies, and will hopefully engage in further discussions where possible. (Have to get SC installed on one of the Uni computers ASAP.) Anyway Garth ( a fellow Aussie, I'm in good company), asked about OMS >I am wondering if anyone can shed some light on how SC addresses OMS. >So How do I address the IAC bus, or any other bus within OMS. > So heres my contribution. G'day Mate, It may not be exactly SC specific but you can download the OMS SDK from Opcode and check out the info it provides. At the least it would point you in the right direction and make for some interesting reading. Cheers, Macca. Macciza Macpherson, UWS NEPEAN, NSW, AUSTRALIA. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 5 Mar 1999 16:09:48 +0000 From: finer@easynet.co.uk Subject: SignalView selection Hello, The following code works : ( var w2,signal,bounds,vw,zoom,filename,sound; filename = ":Sounds:floating_1"; sound = SoundFile.new; sound.read(filename); signal = sound.data.at(0); w2 = GUIWindow.new("sample", Rect.new( 15, 376, 396, 586 )); bounds = Rect.new( 25, 33, 357, 157 ); zoom = ceil(signal.size / bounds.width); vw = SignalView.new( w2,bounds, signal,-1,1,0,zoom); {arg synth; var dummy; dummy = ControlIn.kr(1800, 0); synth.repeat(0,1,{ dummy.source = 15000.rand + 100; }); vw.setSelection(0,signal.size - 2); // here I want vw.setSelection(0,dummy) PlayBuf.ar(signal,Synth.sampleRate,1,0,0,dummy) }.play ) BUT only because it's not doing what I want which is : The selected area in the SignalView to be reset each second. ie vw.setSelection(0,dummy) Ultimatley I'd like to be able to set selections via sliders - whatever I try setSelection doesn't seem to like being called within a synth. Thanks Jem ------------------------------ Date: Fri, 5 Mar 1999 16:28:47 +0000 From: finer@easynet.co.uk Subject: click in grain Just in case this is of interest : I've had a problem for ages with a horrible intermittent click in a grain patch - James thought it might be to do with Osc1 so I replaced that with a simple Env.sine. So far so good - no click. ( // simple grain var filename, sound, signal,l,tbl,w; var env1; w = GUIWindow.new("panel", Rect.newBy( 482, 495, 322, 111)); NumericalView.new( w, Rect.newBy( 15, 16, 64, 20 ), "NumericalView", 0.1, 0.01, 1, 0.01, 'linear'); NumericalView.new( w, Rect.newBy( 15, 40, 64, 20 ), "NumericalView", 0.08, 0.01, 1, 0.01, 'linear'); NumericalView.new( w, Rect.newBy( 15, 64, 64, 20 ), "NumericalView", 300, 50, 1000, 1, 'linear'); NumericalView.new( w, Rect.newBy( 15, 88, 64, 20 ), "NumericalView", 1, -2, 2, 0.05, 'linear'); StringView.new( w, Rect.newBy( 92, 16, 128, 20 ), "grain duration"); StringView.new( w, Rect.newBy( 92, 40, 128, 20 ), "grain density"); StringView.new( w, Rect.newBy( 92, 64, 128, 20 ), "speed"); StringView.new( w, Rect.newBy( 92, 88, 128, 20 ), "pitch"); env1 = Env.sine(1,1); filename = ":Sounds:floating_1"; sound = SoundFile.new; sound.read(filename); signal = sound.data.at(0); l = signal.size; tbl = Signal.welchWindow(512); Synth.scope( {Spawn.ar({arg spawn,i,synth; var dur,start; dur = w.at(0).value; start = (w.at(2).value*i).floor%l; spawn.nextTime = w.at(1).value; Pan2.ar( PlayBuf.ar(signal, sound.sampleRate, w.at(3).value, start, 0, l, //Osc1.ar(tbl,dur) EnvGen.ar(env1,1,0,1,0,dur)), SinOsc.ar(1/dur,0,0.5,0.5)) },2) }); w.close; ) Jem Jem Finer finer@easynet.co.uk Longplayer : http://easyweb.easynet.co.uk/artangel/finer.html Autodestruct/Marseille en Juin : http://www.chez.com/immedias ------------------------------ Date: Fri, 5 Mar 1999 12:16:48 -0600 From: James McCartney <---@---.---> Subject: Re: SignalView selection At 10:09 AM -0600 3/5/99, finer@easynet.co.uk wrote: >{arg synth; > var dummy; > dummy = ControlIn.kr(1800, 0); > synth.repeat(0,1,{ > dummy.source = 15000.rand + 100; > }); > vw.setSelection(0,signal.size - 2); // here I want >vw.setSelection(0,dummy) > PlayBuf.ar(signal,Synth.sampleRate,1,0,0,dummy) > >}.play > >) > >BUT only because it's not doing what I want which is : > >The selected area in the SignalView to be reset each second. ie >vw.setSelection(0,dummy) > >Ultimatley I'd like to be able to set selections via sliders - whatever I >try setSelection doesn't seem to like being called within a synth. dummy is a UGen, not a number. setSelection requires a number. Also you are putting your setSelection call in the graph creation function where it will only be called only once, when the synth is created. Put it in the synth task so it gets called periodically. {arg synth; var dummy; dummy = ControlIn.kr(1800, 0); synth.repeat(0,1,{ var selend; selend = 15000.rand + 100; dummy.source = selend; vw.setSelection(0, selend); }); PlayBuf.ar(signal,Synth.sampleRate,1,0,0,dummy) }.play --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 6 Mar 1999 10:10:30 +1100 From: Garth Paine <---@---.---> Subject: Re: OMS, IAC? 2 Thanks to those who responded to my questions about the OMS IAC bus, but unfortunately they didn't answer my question. I have OMS already, as it is needed for MAX, and I have established an IAC bus, but I can't find any documentation in SC2 that indicated how to nominate the MIDI input for SC2. Usually, as in MAX one can specify for a multi-port interface, like a MIDI Time Piece II, which port you are looking at on the interface. This functionality is important when running multiple applications on the same machine. So my question still stands - how do I specify the IAC bus as the MIDI input in SC2. Cheers, Garth See information about my new immersive interactive sound installations http://creativeaccess.com.au/~garth/ ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., ------------------------------ Date: Fri, 05 Mar 1999 21:25:20 -0500 From: "crucial" <---@---.---> Subject: Mandelbrot.sc Here for anyone that wants it is a Mandelbrot generator, useful constant procurer, all mod cons. Put this in your default library, recompile the classes. on successive iterations it returns a new value usually between -2 and 2. It works great except that it seems to nearly but not always return negative constants. A constant is given to it, wherupon the return value.. quickly or not so quickly goes to infinity, (escapes) locks into a fixed value (or orbits it tightly) settles into a fixed pattern settles into a semi-fixed pattern wanders chaotically Or it can be asked to find a non-escape constant; Usage : m = Mandelbrot.new(constant, seed) or just m=Mandelbrot.new(1.4) then value=m.iterate seed is usually 0 and defaults to that Also : m = Mandelbrot.newFromSet(minLength, iterations,infinity,precision) or just m = Mandelbrot.newFromSet the constant is accessible as the variable 'c' as in m.c this returns an instance of Mandelbrot with a constant chosen that is inside the Mandelbrot set, those that don't escape to infinity. actually it also ensures that.... in minLength iterations, no value will repeat itself (considered with precision "precision"). It is very common to get patterns that just have two values or one, and for some applications this isn't too interesting. the default is 5. It may return with a constant that results in endlessly non-repeating values. iterations is the number of iterations to check the constant. usually a constant will result in escape to infinity in less than 100 if its going to go, but there are plenty of exceptions. Checking it for 10000 is sometimes appropriate. infinity allows you to set how far is too far. I couldn't think of another way to check this. it defaults to 10000000. precision is used to round off the values for checking. for instance it is common for a pattern to alternate 0.345657 0.345656 for quite a while. for most purposes, it is more direct just to set the minLength and let the method find a suitable constant, it works very well ! ////////////////// Mandelbrot { // crucial_systems var x, infinity).or( trail.any({arg it; curround == it})), // { ^false }) }); ^true } } //////////////////////////// an simple example : { var m, freq; m=Mandelbrot.newFromSet(4); ("/" ++"/" ++ m.c).postln; Spawn.ar({ freq=m.iterate * 1400 + 700; PSinGrain.ar( freq,0.2,0.015) },1,0.01) }.play ///////////////////////////// a less simple example Synth.play({ var m; var speed=0.05; // precompute the mandelbrots m=Array.fill(20,{Mandelbrot.newFromSet(6,50)}); OverlapTexture.ar( //eventFunc, sustainTime, transitionTime, overlap, numChannels, mul, add { arg spawner,otEvent; var myM, dose; myM=m.wrapAt(otEvent); speed=(speed*[0.5,2,1.7].choose).wrap(0,2); Spawn.ar({arg spawn,ev; dose=myM.iterate; dose.postln; //(ev.fold(0,10) / 5 - 1).postln; Pan2.ar( PSinGrain.ar(dose * 900 + 700,speed,0.045) ,dose / 2) }, 2, speed * 0.5) },10,0.5,2,2) } ) i suppose i will do the other popular fractals soon. I'd like to try using the set of non-escape constant, because they themselves form an interesting pattern. Also, complex numbers can be passed as the constant input and I patterns of complex numbers can come out the other side and then we shove it down the throat of the ifft, right ? __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Fri, 05 Mar 1999 21:27:49 -0500 From: "crucial" <---@---.---> Subject: Re: click in grain Jem : nice ! I messed with it some more : ( // simple grain jem finer var filename, sound, signal,l,tbl,w; var env1; var mod; w = GUIWindow.new("panel", Rect.newBy( 482, 495, 322, 111)); NumericalView.new( w, Rect.newBy( 15, 16, 64, 20 ), "duration", 0.54, 0.01, 1, 0.01, 'linear'); NumericalView.new( w, Rect.newBy( 15, 40, 64, 20 ), "density", 0.16, 0.01, 1, 0.01, 'linear'); NumericalView.new( w, Rect.newBy( 15, 64, 64, 20 ), "speed", 119, 50, 1000, 1, 'linear'); NumericalView.new( w, Rect.newBy( 15, 88, 64, 20 ), "pitch", 1, -3, 3, 0.05, 'linear'); StringView.new( w, Rect.newBy( 92, 16, 128, 20 ), "grain duration"); StringView.new( w, Rect.newBy( 92, 40, 128, 20 ), "grain density"); StringView.new( w, Rect.newBy( 92, 64, 128, 20 ), "speed"); StringView.new( w, Rect.newBy( 92, 88, 128, 20 ), "pitch"); // sounds fuller I think // you can play with the times too ! env1 = Env.new([0,1,0],[1,0.2],'welch'); filename = ":Sounds:floating_1"; sound = SoundFile.new; sound.read(filename); signal = sound.data.at(0); l = signal.size - 1; // !! stops the end click Synth.play( { // original mod = w.at(2).kr; // modulating speed // depends on the sample used, a soft obscuring of the loop points. // so it doesn't settle into that rattling loop // mod = SinOsc.kr(0.1, 0, w.at(2).kr, 300); //mod = MouseX.kr(100,400,'linear',0.9); Spawn.ar({arg spawn,i,synth; var dur,start; dur = w.at(0).value; start = (mod.poll * i).floor%(l * 0.80); spawn.nextTime = w.at(1).value; Pan2.ar( PlayBuf.ar(signal, sound.sampleRate, w.at(3).value, start, 0, l, //Osc1.ar(tbl,dur) EnvGen.ar(env1,0.7,0,1,0,dur)), // ^^ multiplied down a bit less distortion on my samples SinOsc.ar(1/dur,0,0.5,0.5) // nice ! //1.0.rand ) },2) } ); w.close; ) __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Fri, 5 Mar 1999 21:50:09 -0600 From: James McCartney <---@---.---> Subject: Re: click in grain Just a couple of notes. At 8:27 PM -0600 3/5/99, crucial wrote: > Pan2.ar( > PlayBuf.ar(signal, sound.sampleRate, > w.at(3).value, > start, > 0, > l, > //Osc1.ar(tbl,dur) > EnvGen.ar(env1,0.7,0,1,0,dur)), > SinOsc.ar(1/dur,0,0.5,0.5) // nice ! > //1.0.rand legal Pan2 values range from -1 to +1, so if you want the full range on those to modulators, you should use the following: SinOsc.kr(1/dur) or 1.0.rand2 Also Pan2 only responds at control rate, not audio rate so the SinOsc uses kr. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 6 Mar 1999 11:20:58 +0000 From: finer@easynet.co.uk Subject: Re: OMS, IAC? 2 SC treats the IAC bus as a MIDI input - whether it defaults or not, I don't know, but if you send something from Max on IAC 1 then SC should pick it up on midi ch. 1. From Logic I know that you can give IAC bus different midi channels so if you have all 4 going you can give tham different numbers - these will relate to the midi channels you set in your voicers in Sc Can't remember if you can det specific channels for the IAC in Max - I'm sure you can - anyway try sending some notes from Max out of the bus and you should find SC picks them up. I'd have a look at this but my Max has stopped working - some key disc fuck up out of the blue. Jem >Thanks to those who responded to my questions about the OMS IAC bus, but >unfortunately they didn't answer my question. > >I have OMS already, as it is needed for MAX, and I have established an IAC >bus, but I can't find any documentation in SC2 that indicated how to >nominate the MIDI input for SC2. Usually, as in MAX one can specify for a >multi-port interface, like a MIDI Time Piece II, which port you are looking >at on the interface. This functionality is important when running multiple >applications on the same machine. So my question still stands - how do I >specify the IAC bus as the MIDI input in SC2. > >Cheers, > >Garth > >See information about my new immersive interactive sound installations >http://creativeaccess.com.au/~garth/ > >,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. >. Composer, Sound Designer >.. Interactives Designer >... Interactive Installation Artist >.... Exhibition Consultant >.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., Jem Finer finer@easynet.co.uk Longplayer : http://easyweb.easynet.co.uk/artangel/finer.html Autodestruct/Marseille en Juin : http://www.chez.com/immedias ------------------------------ Date: Sat, 6 Mar 1999 18:31:39 +0000 From: finer@easynet.co.uk Subject: ? SignalView ? Why does this patch not select in the SignalView ? vw.setSelection is getting numbers. (//start and end point set by GUI var w2,signal,bounds,vw,zoom,filename,sound,l; filename = ":Sounds:floating_1"; sound = SoundFile.new; sound.read(filename); signal = sound.data.at(0); w2 = GUIWindow.new("sample", Rect.new( 15, 376, 396, 586 )); bounds = Rect.new( 25, 33, 357, 157 ); zoom = ceil(signal.size / bounds.width); vw = SignalView.new( w2,bounds, signal,-1,1,0,zoom); l = signal.size; w = GUIWindow.new("panel", Rect.newBy( 128, 64, 347, 96 )); SliderView.new( w, Rect.newBy( 18, 20, 307, 22 ), "SliderView", 0, 0, l, 1); SliderView.new( w, Rect.newBy( 18, 46, 307, 22 ), "SliderView", l, 0, l, 1); {arg synth; var dummy,dummy2; dummy = ControlIn.kr(0, 0); //start point dummy2 = ControlIn.kr(l, 0);//end point synth.repeat(0,0.25,{ var selst,selend; selst = w.at(0).value; selend = w.at(1).value; dummy.source = selst; dummy2.source = selend; vw.setSelection(selst, selend); }); PlayBuf.ar(signal,Synth.sampleRate,1,dummy,dummy,dummy2) }.play; GUIWindow.closeAll ) Thanks, Jem ------------------------------ Date: Mon, 8 Mar 1999 03:16:05 -0600 From: James McCartney <---@---.---> Subject: coroutines.. Just got this working. This is going to be very powerful. Coroutines are functions that can be suspended in the middle and resumed where they left off. They are like Streams, except that Streams require you to write your algorithms inside out whereas a coroutine allows you to write the algorithm in a more natural way. Routines will be very useful in synth sched tasks. I am also planning a new Pattern library that exploits them. Coroutines can be also be found in the Scheme programming language. r = Routine.new({ 6.yield; // yield a value and control back to caller. // second time routine is called, control resumes here. 7.yield; // third time routine is called, control resumes here, etc. 4.do({ arg i; (i * 10 + 500).yield; 2.do({ arg j; (j + 10).yield; }); }); }); 16.do({ arg k; [k, r.next].postln; }); [ 0, 6 ] [ 1, 7 ] [ 2, 500 ] [ 3, 10 ] [ 4, 11 ] [ 5, 510 ] [ 6, 10 ] [ 7, 11 ] [ 8, 520 ] [ 9, 10 ] [ 10, 11 ] [ 11, 530 ] [ 12, 10 ] [ 13, 11 ] [ 14, nil ] [ 15, nil ] The above example only shows one way data flow, but coroutines can pass values both ways. inval = outval.yield; 'yield' always yields to the parent thread, but routines can be called explicitly: gotval = aRoutine.next(putval); Here's a URL that explains coroutines in Scheme: http://www.cs.indiana.edu/eip/workshop1/lab11/lab112.html#_l2 --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 8 Mar 1999 11:38:08 +0100 From: staffan@medialab.ericsson.se (Staffan Liljegren) Subject: Re: coroutines.. James, Can You talk a little more about the general strategy for Streams, Patterns etc in future releases in SC2 ? - -Staffan | From owner-sc-users@lists.io.com Mon Mar 8 10:26 MET 1999 | | | Just got this working. This is going to be very powerful. | Coroutines are functions that can be suspended in the middle | and resumed where they left off. They are like Streams, except | that Streams require you to write your algorithms inside out | whereas a coroutine allows you to write the algorithm in | a more natural way. Routines will be very useful in synth sched | tasks. I am also planning a new Pattern library that exploits them. | Coroutines can be also be found in the Scheme programming language. | | r = Routine.new({ | 6.yield; // yield a value and control back to caller. | // second time routine is called, control resumes here. | 7.yield; | // third time routine is called, control resumes here, etc. | 4.do({ arg i; | (i * 10 + 500).yield; | | 2.do({ arg j; | (j + 10).yield; | }); | }); | }); | | 16.do({ arg k; [k, r.next].postln; }); | | | [ 0, 6 ] | [ 1, 7 ] | [ 2, 500 ] | [ 3, 10 ] | [ 4, 11 ] | [ 5, 510 ] | [ 6, 10 ] | [ 7, 11 ] | [ 8, 520 ] | [ 9, 10 ] | [ 10, 11 ] | [ 11, 530 ] | [ 12, 10 ] | [ 13, 11 ] | [ 14, nil ] | [ 15, nil ] | | The above example only shows one way data flow, but coroutines | can pass values both ways. | | inval = outval.yield; | | 'yield' always yields to the parent thread, but routines can be | called explicitly: | | gotval = aRoutine.next(putval); | | Here's a URL that explains coroutines in Scheme: | | http://www.cs.indiana.edu/eip/workshop1/lab11/lab112.html#_l2 | | | | --- james mccartney james@audiosynth.com http://www.audiosynth.com | If you have a PowerMac check out SuperCollider2, a real time synth program: | | | | | | ------------------------------ Date: Mon, 8 Mar 1999 09:17:35 -0600 From: James McCartney <---@---.---> Subject: Re: coroutines.. At 4:38 AM -0600 3/8/99, Staffan Liljegren wrote: >James, > >Can You talk a little more about the general strategy for >Streams, Patterns etc in future releases in SC2 ? > The Pattern library will provide a means of dynamic structural transformation of musical processes. It will provide similar capabilities as one finds in Elody, Kyma, Siren, Patchwork, HMSL, DMix, Nyquist. By using coroutines and streams rather than eager functional methods it is able to work in a lazy event by event method instead of the all at once method of Elody and Siren. It will provide the kind of dynamic live control found in HMSL but with the more general event models of the others. In Nyquist and Siren certain transformation like Stretch and Transpose are specially coded into the framework, in SC Patterns, any parameter may have transformations applied to it. The only one treated specially is time so that parallel streams can be merged. A Pattern is a template from which a Stream can be created. A Pattern is a specification for a process. A Stream is an iterator on that process. Multiple Streams can be created from the same Pattern. Patterns may be linked into a graph. Each node in the graph represents some specification or ordering on its descendants in the graph. A single most general event is passed down the chain of active streams and transformed by each node on the way down and/or back up. Each node may override or transform properties of events or reorder the events as they pass through. Events are IdentityDictionaries which map symbols for property names to their values. A pattern Stream can be evaluated in a synth sched task to provide events to any TSpawns in the Synth. Or a pattern stream can be evaluated in a Spawn's event function to provide events. The new library will be a rewrite of the current one. Many things like Pseq which is very hairy to get right with Streams becomes simple to write with coroutines. This will allow many more to be written. Here's a list of some possible Patterns : Transforming properties: Pmtranspose - modal transpose of scale degree Pctranspose - chromatic transpose in current tuning (can be non-12) Pdetune - detune in hertz Pstretch - stretch durations Pgain - add dB to amplitudes Ordering: Pseq - play children in sequence Pshuf - play children in shuffled order Prand - play children at random Ppar - play children in parallel Peswitch - play one of the children as currently chosen by a user controlled variable. only changes children when they are completed Piswitch - switch between children on an event by event basis. Pstutter - repeat events. Ppyr1 - 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, ... Ppyr2 - 1, 2, 1, 3, 2, 1, 4, 3, 2, 1, ... Ppyr3 - 1, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 4, 3, 2, 1, ... Pslide - sliding window, for example: 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6 Place - interlace events from children Pcaprep - capture some number events from child and repeat them Pcapfwdrev - capture some number events from child play them forward and reverse. Pchain - combine events from children into one event. Allows parallel processes to generate for example the pitch and durations independantly. Filtering : Pfilt - apply a function to events Pfiltseq - apply a sequence of filters to a single child pattern. Pfiltswitch - dynamically switch filters applied to a pattern Successive transformation: Paccel - stretch durations of successive events Pswing - exchange some duration between pairs of events. Pstrum - offset simultaneous events Limiting extent: Pfin - stop after a finite number of child events. Pfindur - stop after a finite duration. - --- In the new library, the Pattern classes themselves are much easier to write. There no longer needs to be a separate parallel hierarchy of Stream classes for each Pattern class. Here's a couple: Pdetune : FilterPattern { var detune; *new { arg pattern, detune; ^super.new(pattern).detune_(detune) } makeStream { var stream; stream = pattern.makeStream; ^FuncStream.new({ arg event; event.detune = event.detune + detune; // change the detune stream.next(event); // return result of the child's application }); } } Pseq : ListPattern { makeStream { ^Routine.new({ arg inval; onStart.value; repeats.do({ list.size.do({ arg i; inval = list.at(i).embedInStream(inval); }); onRepeat.value; }); onStop.value; }); } } --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 9 Mar 1999 00:45:59 -0500 (EST) From: "Ronald J. Kuivila" <---@---.---> Subject: Re: coroutines.. Co-routines! Yay! Where is the update to enable using them? RJK ------------------------------ Date: Tue, 9 Mar 1999 07:37:18 -0600 From: James McCartney <---@---.---> Subject: Re: coroutines.. At 11:45 PM -0600 3/8/99, Ronald J. Kuivila wrote: >Co-routines! >Yay! >Where is the update to enable using them? > >RJK It's coming. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Wed, 10 Mar 1999 15:51:35 +0100 From: Staffan Liljegren <---@---.---> Subject: Re: coroutines.. This sounds very promising and especially getting rid of the parallel class hierarchy of Streams and Patterns will make things a bit more intuitive and completely (?) orthogonal to synth.sched, TSpawn and Spawn. Great. - -Staffan James McCartney wrote: > At 4:38 AM -0600 3/8/99, Staffan Liljegren wrote: > >James, > > > >Can You talk a little more about the general strategy for > >Streams, Patterns etc in future releases in SC2 ? > > > > The Pattern library will provide a means of dynamic structural > transformation of musical processes. It will provide similar > capabilities as one finds in Elody, Kyma, Siren, Patchwork, HMSL, DMix, > Nyquist. By using coroutines and streams rather than eager functional > methods it is able to work in a lazy event by event method > instead of the all at once method of Elody and Siren. > It will provide the kind of dynamic live control found in HMSL but > with the more general event models of the others. In Nyquist and > Siren certain transformation like Stretch and Transpose are specially > coded into the framework, in SC Patterns, any parameter may have > transformations applied to it. The only one treated specially is time > so that parallel streams can be merged. > > A Pattern is a template from which a Stream can be created. > A Pattern is a specification for a process. A Stream is an iterator > on that process. Multiple Streams can be created from the same Pattern. > Patterns may be linked into a graph. Each node in the graph represents > some specification or ordering on its descendants in the graph. > A single most general event is passed down the chain of active streams > and transformed by each node on the way down and/or back up. > Each node may override or transform properties of events or reorder > the events as they pass through. > > Events are IdentityDictionaries which map symbols for property names > to their values. > > A pattern Stream can be evaluated in a synth sched task to provide > events to any TSpawns in the Synth. Or a pattern stream can be > evaluated in a Spawn's event function to provide events. > > The new library will be a rewrite of the current one. > Many things like Pseq which is very hairy to get right with Streams > becomes simple to write with coroutines. This will allow many more to > be written. > > Here's a list of some possible Patterns : > > Transforming properties: > > Pmtranspose - modal transpose of scale degree > Pctranspose - chromatic transpose in current tuning (can be non-12) > Pdetune - detune in hertz > Pstretch - stretch durations > Pgain - add dB to amplitudes > > Ordering: > > Pseq - play children in sequence > Pshuf - play children in shuffled order > Prand - play children at random > Ppar - play children in parallel > Peswitch - play one of the children as currently chosen by a user > controlled variable. only changes children when they are completed > Piswitch - switch between children on an event by event basis. > Pstutter - repeat events. > Ppyr1 - 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, ... > Ppyr2 - 1, 2, 1, 3, 2, 1, 4, 3, 2, 1, ... > Ppyr3 - 1, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 4, 3, 2, 1, ... > Pslide - sliding window, for example: 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6 > Place - interlace events from children > Pcaprep - capture some number events from child and repeat them > Pcapfwdrev - capture some number events from child play them forward and reverse. > Pchain - combine events from children into one event. Allows parallel > processes to generate for example the pitch and durations independantly. > > Filtering : > > Pfilt - apply a function to events > Pfiltseq - apply a sequence of filters to a single child pattern. > Pfiltswitch - dynamically switch filters applied to a pattern > > Successive transformation: > > Paccel - stretch durations of successive events > Pswing - exchange some duration between pairs of events. > Pstrum - offset simultaneous events > > Limiting extent: > > Pfin - stop after a finite number of child events. > Pfindur - stop after a finite duration. > > --- > > In the new library, the Pattern classes themselves are much easier > to write. There no longer needs to be a separate parallel hierarchy of > Stream classes for each Pattern class. > > Here's a couple: > > Pdetune : FilterPattern { > var detune; > *new { arg pattern, detune; > ^super.new(pattern).detune_(detune) > } > makeStream { > var stream; > > stream = pattern.makeStream; > > ^FuncStream.new({ arg event; > event.detune = event.detune + detune; // change the detune > stream.next(event); // return result of the child's application > }); > } > } > > Pseq : ListPattern { > makeStream { > ^Routine.new({ arg inval; > onStart.value; > repeats.do({ > list.size.do({ arg i; > inval = list.at(i).embedInStream(inval); > }); > onRepeat.value; > }); > onStop.value; > }); > } > } > > --- james mccartney james@audiosynth.com http://www.audiosynth.com > If you have a PowerMac check out SuperCollider2, a real time synth program: > ------------------------------ Date: Thu, 11 Mar 1999 18:16:03 -0500 From: Mark Ballora <---@---.---> Subject: Using "count" as an array index I've been using OrcScore to read abusively large data files and audify them. Now I'd like to try a procedure wherein each data does not spawn a new synth, but rather updates an existing one. I'm working with the trepeatN scheduler, and am trying to use the count argument to read each value from my list. But apparently I'm not using count correctly. ( var mylist, maxie; mylist = [ 220, 440, 880, 1000.rand, 1000.rand ]; maxie = mylist.size-1; { arg synth; var freqCtl; freqCtl = ControlIn.kr(110,0); synth.trepeatN(1, 1, maxie, { arg synth, now, count; freqCtl.source = mylist.at(count) } ); SinOsc.ar(freqCtl, 0, 0.2); }.play ) Ultimately, the "mylist" definition will be replaced with mylist = thisProcess.interpreter.executeFile("myLargeFileName"); ------------------------------ Date: Thu, 11 Mar 1999 18:21:14 -0600 From: James McCartney <---@---.---> Subject: Re: Using "count" as an array index At 5:16 PM -0600 3/11/99, Mark Ballora wrote: >I've been using OrcScore to read abusively large data files and audify them. > >Now I'd like to try a procedure wherein each data does not spawn a new >synth, but rather updates an existing one. > >I'm working with the trepeatN scheduler, and am trying to use the count >argument to read each value from my list. But apparently I'm not using >count correctly. There is nothing wrong with your code. You've found a code generation bug in the compiler. For a workaround for now, replace the Synth trepeatN method with the following: trepeatN { arg start, period, maxRepeats, userTask, completionFunc; var count = 0; if (maxRepeats > 0, { this.tsched(start.value, { arg synth, now, repeatTask; var z; z = now; userTask.value(synth, z, count); count = count + 1; if (count << maxRepeats, { this.tsched(period.value, repeatTask); },{ if (completionFunc.notNil, { this.tsched(period.value, { completionFunc.value(synth, now) }); }); }); }); }); } The same problem affects the other sched routines. The count variable is getting the wrong value pushed. The compiler is inserting an optimized byte code where it shouldn't be. This same workaround will fix the others as well: var z; z = now; userTask.value(synth, z, count); --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Thu, 11 Mar 1999 18:40:49 -0600 From: James McCartney <---@---.---> Subject: Re: Using "count" as an array index At 5:16 PM -0600 3/11/99, Mark Ballora wrote: >var mylist, maxie; >mylist = [ 220, 440, 880, 1000.rand, 1000.rand ]; >maxie = mylist.size-1; If you want it to play your entire list, that should be: maxie = mylist.size; --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Fri, 12 Mar 1999 10:24:44 +0100 From: joel ryan <---@---.---> Subject: wacom and serial ports James, Im considering adding a wacom for SC to my road gear. But two problems: As well as SC2, I have an older SC1 based instrument which is earning me a living. How likely is it I could get to interface a Wacom pad to SC1(ie beyond mousey vanilla)? maybe more important, if you have a G3Powerbook with one serial port (no USB) what happens to midi i/o? Are there any serial port PCM/CIA cards with real mac drivers ? Or maybe USB cards for older macs? Joel Ryan _____________________________________________ Joel Ryan Institute of Sonology :: Ballett Frankfurt STEIM [Stichting for Electro-Instrumental Music] Achtergracht 19, 1017 Amsterdam +31 (020) 624-3886 +31 (020) 626-4262 fax http://www.xs4all.nl/~steim http://www.frankfurt-ballett.de/joel.html _______________________ ------------------------------ End of sc-users-digest V1 #30 *****************************