From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #20 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 Sunday, December 13 1998 Volume 01 : Number 020 ---------------------------------------------------------------------- Date: Tue, 8 Dec 1998 01:52:56 +0100 (CET) From: Arie van Schutterhoef <---@---.---> Subject: [none] Dear people, Started recently hacking with SC; FFT-transformation sound great, so lets try some and read/write from/to disk... After several attempts, and with help from a collague it stubbornly refused to do what I want... What went wrong? Can someone illuminate me on this subject... My ignorance looks like this (frustating comments generously included): /////////////////////////////////////////////////////////////////////// //WriteFFT ( { var fftsize, numffts, fftoffsets, window, cosineTable; var input, mousex, mindelay, maxdelay, dur; var src1, fft1, fft2, ifft, file, out; numffts = 2; fftsize = 1024; fftoffsets = Array.series(numffts, 0, fftsize/numffts); window = Signal.welchWindow(fftsize); cosineTable = Signal.fftCosTable(fftsize); file = SoundFile.new; if (file.readHeader(":Sounds:gliss") and: { file.preloadData; }, src1 = DiskIn.ar(file, true) *0.9) ; fft1 = FFT.ar(fftsize, fftoffsets, cosineTable, window, nil, src1); dur = fftsize/Synth.sampleRate;file.readHeader(":Sounds:gliss") mindelay = 0.101.trunc(dur); maxdelay = mindelay + dur; mousex = MouseX.kr(mindelay, maxdelay); fft2 = Complex.new( CombN.ar(fft1.real, maxdelay, mousex, 4, 1, fft1.real), CombN.ar(fft1.imag, maxdelay, mousex, 4, 1, fft1.imag) ); ifft = IFFT.ar(fftsize, fftoffsets, cosineTable, nil, window, fft2.real, fft2.imag); out = Mix.ar(ifft.real); out/numffts }.scope(0.1); * ERROR: Parse error start 624 in file 'selected text' line 25 char 9 : mindelay* = 0.101.trunc(dur); maxdelay = mindelay + dur; - ----------------------------------- * ERROR: Command line parse failed ) /////////////////////////////////////////////////////////////////////////////// Awaiting some relieve in semi-cumbersome circumstances, Arie van Schutterhoef artistic director Schreck Ensemble Holland http://www.xs4all.nl/~schreck/ ------------------------------ Date: Mon, 7 Dec 1998 21:09:00 -0600 From: James McCartney <---@---.---> Subject: Re: subject? At 6:52 PM -0600 12/7/98, Arie van Schutterhoef wrote: > dur = fftsize/Synth.sampleRate;file.readHeader(":Sounds:gliss") >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> put a semicolon here ^ > mindelay = 0.101.trunc(dur); >* ERROR: Parse error >start 624 > in file 'selected text' > line 25 char 9 : > mindelay* = 0.101.trunc(dur); > maxdelay = mindelay + dur; >----------------------------------- >* ERROR: Command line parse failed >) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 8 Dec 1998 15:24:53 -0600 From: James McCartney <---@---.---> Subject: Re: subject? >At 6:52 PM -0600 12/7/98, Arie van Schutterhoef wrote: > >> dur = fftsize/Synth.sampleRate;file.readHeader(":Sounds:gliss") In fact why is that statement written like that? file.readHeader(":Sounds:gliss") is already called in the if statement above, so this is a major typo. The statement should just read: dur = fftsize/Synth.sampleRate; --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 8 Dec 1998 23:40:12 +0100 (CET) From: Arie van Schutterhoef <---@---.---> Subject: Re: subject? Hi James, Just started working on a more regular base with SC, which means making lots of mistakes and "typo's" (For the uninformed: what does a typo mean exactly?) So in the case this particular 'if-statement' if you mentioned it once, you don't have to do it again? Arie van Schutterhoef Schreck Ensemble laboratory for live electro-acoustic music Holland http://www.xs4all.nl/~schreck/ >>At 6:52 PM -0600 12/7/98, Arie van Schutterhoef wrote: >> >>> dur = fftsize/Synth.sampleRate;file.readHeader(":Sounds:gliss") > > >In fact why is that statement written like that? > > file.readHeader(":Sounds:gliss") > >is already called in the if statement above, so this is a major typo. >The statement should just read: > > dur = fftsize/Synth.sampleRate; > > > > --- james mccartney james@audiosynth.com http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth program: > ------------------------------ Date: Tue, 8 Dec 1998 17:41:51 -0600 From: James McCartney <---@---.---> Subject: Re: subject? At 4:40 PM -0600 12/8/98, Arie van Schutterhoef wrote: >Hi James, > >Just started working on a more regular base with SC, >which means making lots of mistakes and "typo's" >(For the uninformed: what does a typo mean exactly?) 'typographical error' >So in the case this particular 'if-statement' if you mentioned it once, you >don't have to do it again? This is a programming language so things are not 'mentioned', they get executed. And when you do something once, like putting on your socks, you generally don't have to do it again. This kind of thing I don't know how to begin to answer sometimes. I don't want anyone to not ask any question for any reason, but some questions like this make me worry that folks are copy/pasting code fragments as though they were incantations from magic spells without understanding what is going on. I will have a tutorial that focuses more on the programming language, so perhaps some of these things will become clearer to those who are not familiar with dynamic OO languages. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Wed, 9 Dec 1998 01:37:52 +0100 (CET) From: Arie van Schutterhoef <---@---.---> Subject: Re: subject? Hi James, Thanks again for your response. >This kind of thing I don't know how to begin to answer sometimes. >I don't want anyone to not ask any question for any reason, but >some questions like this make me worry that folks are copy/pasting >code fragments as though they were incantations from magic spells without >understanding what is going on. - -I think copy and pasting is very useful when you start programming in a complex environment like SC is, but that is where you start from. Subsequently one has to analyse and see if something went wrong, why it went wrong... It is a bit like learning to walk: you fall flat on your face and try anew. SC is worth falling often and getting up again. sometimes you need assistance and usually you can do it yourself. But you have to start somewhere... >I will have a tutorial that focuses more on the programming language, >so perhaps some of these things will become clearer to those who are >not familiar with dynamic OO languages. - - I do not know to what extend it is important to know more about Smalltalk, in order to become more proficient in programming SC? Arie van Schutterhoef Schreck Ensemble laboratory for live electro-acoustic music Holland http://www.xs4all.nl/~schreck/ ------------------------------ Date: Wed, 09 Dec 1998 17:15:44 -0500 From: "Chris Sattinger" <---@---.---> Subject: Hello, Refs and Synths First of all, let me say that I have just recently discovered, had my mind blown by, and set hard to work with SC. This is exactly to the letter the tool that I was craving ! I have written copious notes about how I wanted to work, but figured I wouldn't be able to do this stuff for another 5-10 years. I am 5-10 years into the future now ! As with any program language, still learning which 'typos' are going to creep up again and again, and grasping the layout. Currently ' ; ' is the main offender. Thank you James McCartney for many sleepless nights ! Some general questions to any that can help... One point of confusion : There is always one and only one Synth, correct ? For instance when I wish to create a Spawn or a Tspawn to do a process such as periodically assign new values to an Array or List, must it still be set up as though it were playing ? So even though it doesn't itself output any sound, I should Mix.ar or + it to what is playing ? Or is there another way to layout the structure ? I have dug out my C tutorials and tried to grok Refs a bit better. But I think their use is different here. In C a Ref is a good way to pass values in and out of functions (that have their own memory space). It is a reference to the actual memory location of a variable. In SC they are (in one case mentioned) used to 'protect against Multi-channel expansion'. Meaning that if a ugen encounters some kind of list [ thing, thing, thing] it copies itself and deals with each one. So how does a Ref change that ? And specifically why does a Klang require a Ref instead of a simple list ? { Klank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, 100)) }.play; Also, if you could, a very brief rundown of what some of the other shorthand things I see in the SC files : ^ as in ^this.primitiveFailed this is obviously like Bless in PERL, assigns the method or inherits it from the super class what do you call this ? * as in *kr *ar I can see what it does, but what do you refer to that as ? Thank you ! Incidentally I am using system 8.5 G3 300 Mhz. It is crashing occasionally, but usually I am purposely or accidentally setting something VERY wrong. It is crashing on various internet things I am doing too. Can't wait for protected memory ! 8.5.1 is out. And possibly for a good reason. The annoying thing about 8.5 is that many times it crashes and the front button will not reboot it ! You have to pull the plug. Should I give SC lots and lots of memory ? like 64 or even 96 meg ? Any problems or recommendations ? ___________________________________________________ http://crucial-systems.com ------------------------------ Date: Wed, 09 Dec 1998 19:11:55 +0000 From: Colby Leider <---@---.---> Subject: Re: Hello, Refs and Synths this is to protect against multi-channel expansion in Klank. c Chris Sattinger wrote: > And specifically why does a Klang require a Ref instead of a simple list ? > > { Klank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, > 100)) }.play; ------------------------------ Date: Thu, 10 Dec 1998 05:35:28 +0100 From: "Iannis Zannos" <---@---.---> Subject: Re: Hello, Refs and Synths >There is always one and only one Synth, correct ? There is one outermost synth closure. TSpawn and Spawn create new synth instances and pass something called "output proxy" to the outer synth which takes care of output. Corrections to the above explanation please? >For instance when I wish to create a Spawn or a Tspawn to do a process such >as periodically assign new values to an Array or List, must it still be set >up as though it were playing ? So even though it doesn't itself output any >sound, I should Mix.ar or + it to what is playing ? NO! Things like that happen for you in the background. Just write the sound producing (UGen-graph) closure that you need, in the TSpawn or the Spawn call, as first argument. HAVE A LOOK AT THE EXAMPLES AND HELP FILES AND GO ON FROM THERE. >Or is there another way to layout the structure ? What do you mean? Probably just look at the examples. In SC they are (in one case mentioned) used to 'protect against Multi-channel expansion'. Meaning that if a ugen encounters some kind of list [ thing, thing, thing] it copies itself and deals with each one. There are other uses. But most of the time you get along without having to use refs. So how does a Ref change that ? When SC encounters an array of UGens (or arguments to UGens) it expands it so that each one corresponds to an audio channel. If you pass a reference instead of an array to a Klang as argument, that's what SC sees: a ref, not an array. So it takes that as argument. array -> one Ugen-audio channel per element of the array ref -> one UGen only, ^ as in ^this.primitiveFailed this is obviously like Bless in PERL, assigns the method or inherits it from the super class what do you call this ? ^ is to make a method return a value. Closures { } return the result of the last statement. Methods return the receiver (the object that receives the message which corresponds to the method) UNLESS you explicitly declare that you want a specific value by putting ^ in front of the corresponding statement. By the way: ^ will also cause you to leave any enclosing executing block, but that is another chapter. James: May be a good idea to include this plus how ^ affects execution with examples in the tutorial. * as in *kr *ar I can see what it does, but what do you refer to that as ? * means that the defined method will belong to the class, not to instances of the class. So, *kr and plain kr address totally different objects *kr addresses a class. kr addresses objects which are instances of that class. Note that < and > are method constructors. HAVE A LOOK AT THE OO RELATED HELP FILES FOR ALL THIS. Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 - ---------- >From: "Chris Sattinger" <---@---.---> >To: sc-users@lists.io.com >Subject: Hello, Refs and Synths >Date: Wed, 9 Dec 1998 11:15 PM > >First of all, let me say that I have just recently discovered, had my mind >blown by, and set hard to work with SC. This is exactly to the letter the >tool that I was craving ! >I have written copious notes about how I wanted to work, but figured I >wouldn't be able to do this stuff for another 5-10 years. I am 5-10 years >into the future now ! > >As with any program language, still learning which 'typos' are going to >creep up again and again, and grasping the layout. Currently ' ; ' is the >main offender. > >Thank you James McCartney for many sleepless nights ! > >Some general questions to any that can help... >One point of confusion : >There is always one and only one Synth, correct ? > >For instance when I wish to create a Spawn or a Tspawn to do a process such >as periodically assign new values to an Array or List, must it still be set >up as though it were playing ? So even though it doesn't itself output any >sound, I should Mix.ar or + it to what is playing ? >Or is there another way to layout the structure ? > > >I have dug out my C tutorials and tried to grok Refs a bit better. But I >think their use is different here. In C a Ref is a good way to pass values >in and out of functions (that have their own memory space). It is a >reference to the actual memory location of a variable. > >In SC they are (in one case mentioned) used to 'protect against >Multi-channel expansion'. Meaning that if a ugen encounters some kind of >list [ thing, thing, thing] it copies itself and deals with each one. > >So how does a Ref change that ? > >And specifically why does a Klang require a Ref instead of a simple list ? > >{ Klank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, >100)) }.play; > > >Also, if you could, a very brief rundown of what some of the other >shorthand things I see in the >SC files : > >^ as in ^this.primitiveFailed > this is obviously like Bless in PERL, > assigns the method or inherits it from the super class > what do you call this ? > >* as in *kr *ar > I can see what it does, but what do you refer to that as ? > >Thank you ! > >Incidentally I am using system 8.5 G3 300 Mhz. It is crashing >occasionally, but usually I am purposely or accidentally setting something >VERY wrong. It is crashing on various internet things I am doing too. >Can't wait for protected memory ! >8.5.1 is out. And possibly for a good reason. >The annoying thing about 8.5 is that many times it crashes and the front >button will not reboot it ! You have to pull the plug. >Should I give SC lots and lots of memory ? like 64 or even 96 meg ? >Any problems or recommendations ? >___________________________________________________ > http://crucial-systems.com > ------------------------------ Date: Thu, 10 Dec 1998 09:26:23 -0500 From: Landon Rose <---@---.---> Subject: TSpawn triggers, PulseDivider James- given this: ( var e, specList, tring; tring = rrand(1,3); //ring decay in seconds for Klank spec specList = [ ` [ [32,43,54,89].midicps,nil,Array.fill(4,tring)], ` [ [10,34,80,120].midicps,nil,Array.fill(4,tring)], ` [ [67,88,90,100].midicps,nil,Array.fill(4,tring)], `[ [14,23,34,45].midicps,nil,Array.fill(4,tring)], ` [ [76,88,99,124].midicps,nil,Array.fill(4,tring)]] ; e = Env.sine(3,1); Synth.scope({ TSpawn.ar({ arg tspawn,index, synth; EnvGen.ar( e, Klank.ar( specList.wrapAt(index), AudioIn.ar([1,2],1.2) )) }, 2, // two channels nil, // each trigger to index next item in specList SinOsc.kr(Trig1.ar(Dust.ar(1), 0.2),0,0.5) ) }) ) here are some questions: for a fixed array of Klank specs- is the above the most succinct way to write it? what is the number limit of items (ie Klank specs) for such an array? TSpawn args- I assume that 'tspawn' in the above is simply a placeholder, otherwise unused- same with 'synth'? it works without 'synth', sometimes your examples include all three, sometimes not- just good programming technique to include all three? ********* triggers- given 'MouseX.kr(5,10) < 7.5' as trigger to TSpawn- triggers are described as a 'nonpositive to positve transition'- could you explain the workings of this? given 'Line.kr(0,1,2) > 0.5' as trigger to TSpawn- what makes this a 'signal'? the reason for these SC101 questions has to do with this block and why doesn't it( or something like it) work as a trigger? ({if (AudioIn.ar(1) > 0.3 , { Line.kr(0,1,1) > 0.3 })}).kr.value // tried just .kr without '.value' as well perhaps its that I need the '{false}' block, but to send what message? ( something like "don't stop now!" or "patience Tspawn, a trigger will arrive soon") AudioIn of course is all triggers- so the above 'if' expression if it worked would send thousands of triggers, actually only about 160 before '* ERROR: out of ugen buffer space.' occurs! is there a way to do this- AudioIn.ar(1) == 0.3 or 0.31 > AudioIn.ar(1) > 0.29 which would send a trigger each time amp == 0.3 , but no other time? What is tricky is using sustained tones rather than short percussive sounds, as in this snippet - SinOsc.ar(Trig.ar(AudioIn.ar(1) > 0.1, 0.2),0,0.1) inserted in the TSpawn example and sounding an audio tone with a long envelope creates overlapping Klanks( not necessarily bad) but with a short repeating spec series at some point the Klanks blowup. ******* on to PulseDivider: inserted at TriggerIn arg in the TSpawn example above this works - Impulse.ar(0.3) but this doesn't- PulseDivider.ar(Impulse.ar(8),8) yet ( Synth.plot({ a = Impulse.ar(300); b = PulseDivider.ar(Impulse.ar(800),4); [a,b] }) ) look like the same pulse. What's happening? Thanks. Hope I've been clear! Landon ------------------------------ Date: Thu, 10 Dec 1998 23:38:21 -0600 From: James McCartney <---@---.---> Subject: Re: Hello, Refs and Synths At 4:15 PM -0600 12/9/98, Chris Sattinger wrote: >Some general questions to any that can help... >One point of confusion : >There is always one and only one Synth, correct ? There is one top level Synth. Spawn, TSpawn spawn Synth instances, so you can have many Synths running at once.. > >For instance when I wish to create a Spawn or a Tspawn to do a process such >as periodically assign new values to an Array or List, must it still be set >up as though it were playing ? So even though it doesn't itself output any >sound, I should Mix.ar or + it to what is playing ? >Or is there another way to layout the structure ? If you want to do a periodic action then you should use a Synth task. Look at the Synth methods sched, repeat, repeatN. >I have dug out my C tutorials and tried to grok Refs a bit better. But I >think their use is different here. In C a Ref is a good way to pass values >in and out of functions (that have their own memory space). It is a >reference to the actual memory location of a variable. A Ref in SC is not really like a call-by-reference in C. In SC a Ref is an object with one slot named 'value'. Since it is not an Array then it does not get multichannel expanded. You can use a Ref to implement call-by-reference. >So how does a Ref change that ? Because multichannel expansion looks only for Arrays and a Ref is not an Array. > >And specifically why does a Klang require a Ref instead of a simple list ? So that Klang does not get multichannel expanded. If you want multiple Klangs then you can pass an Array of Refs (of Arrays). >Also, if you could, a very brief rundown of what some of the other >shorthand things I see in the >SC files : > >^ as in ^this.primitiveFailed ^ means to return a value. For methods that have primitives, the method code only executes if the primitive fails. Some methods execute some code here that implements the primitive in a less efficient but more general way than the primitive, but most just call the primitiveFailed method. >* as in *kr *ar > I can see what it does, but what do you refer to that as ? > * defines class methods. These are methods that have the class as the receiver, not the instance of the class. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 11 Dec 1998 00:22:06 -0600 From: James McCartney <---@---.---> Subject: Re: TSpawn triggers, PulseDivider At 8:26 AM -0600 12/10/98, Landon Rose wrote: >James- >given this: >( >var e, specList, tring; >tring = rrand(1,3); //ring decay in seconds for Klank spec > >specList = > [ ` [ [32,43,54,89].midicps,nil,Array.fill(4,tring)], > ` [ [10,34,80,120].midicps,nil,Array.fill(4,tring)], > ` [ [67,88,90,100].midicps,nil,Array.fill(4,tring)], > `[ [14,23,34,45].midicps,nil,Array.fill(4,tring)], > ` [ [76,88,99,124].midicps,nil,Array.fill(4,tring)]] ; OK you realize that tring is the same single value for all of the above specs and that it is an integer 1,2 or 3. (and thanks to a bug it is really only 1 or 2! This will be fixed.) If you want a different random value for each one then you need to write: >specList = > [ ` [ [32,43,54,89].midicps,nil,Array.fill(4,{rrand(1,3)})], > ` [ [10,34,80,120].midicps,nil,Array.fill(4, {rrand(1,3)})], > ` [ [67,88,90,100].midicps,nil,Array.fill(4, {rrand(1,3)})], > `[ [14,23,34,45].midicps,nil,Array.fill(4, {rrand(1,3)})], > ` [ [76,88,99,124].midicps,nil,Array.fill(4, {rrand(1,3)})]] ; and if you want it to be a floating point value you need to make either or both the 1 or the 3 be a floating point value 1.0 or 3.0. >what is the number limit of items (ie Klank specs) for such an array? The limit is RAM or execution time to build the structure. > >TSpawn args- I assume that 'tspawn' in the above is simply a placeholder, >otherwise >unused- same with 'synth'? it works without 'synth', sometimes your >examples include >all three, sometimes not- just good programming technique to include all >three? TSpawn passes at least three arguments to the function. You only need to declare those that you use. the arguments are always passed in order so if I only need index, I still need to declare tspawn. Note that I can name the arguments anything I want, but they will always be the same things: the TSpawn instance, the event count, and the Synth instance. If the event is triggered by the TSpawn trigger method and extra arguments are passed to that method, then the extra arguments are also passed to the TSpawn function. See the TSpawn help file. > > >********* > >triggers- >given >'MouseX.kr(5,10) < 7.5' as trigger to TSpawn- triggers are described as a >'nonpositive to positve transition'- >could you explain the workings of this? Any nonpositive to positive transition of the trigger signal is interpreted as a trigger.. What are you asking? > >given >'Line.kr(0,1,2) > 0.5' as trigger to TSpawn- what makes this a 'signal'? The greater than sign is a valid unit generator creating operator which will create an instance of BinaryOpUGen. So it is not a signal it is a UGen graph which will generate a control rate signal when executed. > >the reason for these SC101 questions has to do >with this block and why doesn't it( or something like it) work as a trigger? > > ({if (AudioIn.ar(1) > 0.3 , > { Line.kr(0,1,1) > 0.3 })}).kr.value 'if' is not a UGen and cannot be used where a UGen is needed. 'if' *can* be used to conditionally create UGen graphs at the time the event is spawned, but cannot be used as a UGen. The 'if' is evaluated at the event start time. > AudioIn.ar(1) == 0.3 or 0.31 > AudioIn.ar(1) > 0.29 > which would send a trigger > each time amp == 0.3 , but no other time? '==' is not a UGen creating binary operator. x = AudioIn.ar(1); // only create one AudioIn to save CPU trig = (x > 0.25) * (x < 0.35); // multiply the conditional signals together For example: ( { a = SinOsc.ar(400); b = (x > 0.25); c = (x < 0.35); d = b * c; [a, b, c, d] }.plot; ) There is a problem where the signal can pass from below 0.25 to above 0.35 without a sample between in which case there will be no trigger. It is better to trigger only on rising above some level or falling below it than trying to match it. > >What is tricky is using sustained tones rather than >short percussive sounds, as in this snippet - > >SinOsc.ar(Trig.ar(AudioIn.ar(1) > 0.1, 0.2),0,0.1) Why don't you use Amplitude to take the amplitude of the input signal? > > on to PulseDivider: > > inserted at TriggerIn arg in the TSpawn example above this works - > Impulse.ar(0.3) > but this doesn't- > PulseDivider.ar(Impulse.ar(8),8) This may be a bug. however: >( >Synth.plot({ > a = Impulse.ar(300); > b = PulseDivider.ar(Impulse.ar(800),4); > [a,b] > }) > ) > > look like the same pulse. What's happening? They look different to me. This looks correct. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 11 Dec 1998 13:06:57 -0500 (EST) From: "Ronald J. Kuivila" <---@---.---> Subject: audio hardware params, a GUIUtils question Hi James, Is there anyway of setting hardware audio IO parameters (i.e., minimum number of samples in IO FIFO buffers)? For example, is this inherited from the top-level synth? RJK Hi Zannos, Is there any easy way of having SoundManager tasks (i.e., blocks of code running as tasks in the top-level synth) alter values in a parameterwindow? RJK ------------------------------ Date: Fri, 11 Dec 1998 13:55:30 -0600 From: James McCartney <---@---.---> Subject: Re: audio hardware params, a GUIUtils question At 12:06 PM -0600 12/11/98, Ronald J. Kuivila wrote: >Hi James, > > Is there anyway of setting hardware audio IO parameters (i.e., >minimum number of samples in IO FIFO buffers)? > > For example, is this inherited from the top-level synth? I currently always use the minimum that the hardware allows. You can't change except by multiples in the Audio setup dialog. This doesn't always work on all machines or hardware. Different Mac models have different buffer sizes. If your Mac has an old Snd Mgr driver that does not report the buffer size then 4096 is used as a default. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 11 Dec 1998 17:29:13 -0500 From: johndu@world.std.com (John Duesenberry) Subject: Re: audio hardware params, a GUIUtils question Is this mailing list available in digest form? I sent a request to the server but received neither a digest not an error message. thanks... ------------------------------ Date: Fri, 11 Dec 1998 17:05:54 -0600 From: James McCartney <---@---.---> Subject: Re: audio hardware params, a GUIUtils question At 4:29 PM -0600 12/11/98, John Duesenberry wrote: >Is this mailing list available in digest form? I sent a request to the >server but received neither a digest not an error message. No, you sent those to list owner. To subscribe to the digest form send a message to majordomo@lists.io.com with a one line body: subscribe sc-users-digest --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 11 Dec 1998 18:26:39 -0600 From: James McCartney <---@---.---> Subject: sc-users-digest I'd just like to say that the digest is experimental at this point. My ISP is being unresponsive at solving some problems with it. It comes out irregularly, some times once a day, sometimes once a week. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 12 Dec 1998 16:48:02 -0500 From: johndu@world.std.com (John Duesenberry) Subject: SC 2.0d28 and S. Pope examples Please excuse a real dumb-ass newbie question, but I've never used SuperCollider before and have no clue about its version history. Is SC 2.0d28 code-compatible with previous versions? I can't get any of the examples from Stephen Pope's book (draft 3, downloaded from CREATE) to compile, let alone play. Syntactically they look quite different from the examples included with 2.0d28. All pointers to educational info re. SC would be welcomed. I think I'm going to really start to like this system... John D >I'd just like to say that the digest is experimental at this point. >My ISP is being unresponsive at solving some problems with it. >It comes out irregularly, some times once a day, sometimes >once a week. > > > --- james mccartney james@audiosynth.com http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth program: > ------------------------------ Date: Sat, 12 Dec 1998 20:06:25 +0000 From: Colby Leider <---@---.---> Subject: simple little app... here's a really simple metronome. i was trying to understand tempo based scheduling so i made this, and it helped. // metroGnome! // a goofy little SuperCollider program // colby leider ( var w, a, b, e, s1, s2, s3, s4; w = GUIWindow.new("metroGnome", Rect.newBy( 740, 191, 170, 223 )) .backColor_(rgb(76,121,166)); a = SliderView.new( w, Rect.newBy( 16, 20, 26, 179 ), "", 60, 30, 220, 1, 'linear') .backColor_(rgb(149,153,166)); c = CheckBoxView.new( w, Rect.newBy( 57, 23, 80, 20 ), "On/Off", 0, 0, 1, 0, 'linear'); s1 = RadioButtonView.new( w, Rect.newBy( 57, 113, 80, 20 ), "Sine", 1, 0, 1, 0, 'linear'); s2 = RadioButtonView.new( w, Rect.newBy( 57, 134, 80, 20 ), "Blip", 0, 0, 1, 0, 'linear'); s3 = RadioButtonView.new( w, Rect.newBy( 57, 157, 80, 20 ), "Saw", 0, 0, 1, 0, 'linear'); s4 = RadioButtonView.new( w, Rect.newBy( 57, 179, 80, 20 ), "Noise", 0, 0, 1, 0, 'linear'); b = NumericalView.new( w, Rect.newBy( 57, 68, 47, 21 ), "NumericalView", 60, 0, 1e+10, 0, 'linear'); e = Env.perc(0.005, 0.1, 1, -2); // percussive envelope { arg synth; var amp = 0.5; // output gain SetTempo.kr(nil, ControlIn.kr(w.at(0))); a.action = { // force the numeric entry to follow the slider b.value = a.value; SetTempo.kr(nil, a.value); }; b.action = { // force the slider to follow the numeric entry // i.e., click on entry and move mouse up/down a.value = b.value; SetTempo.kr(nil, b.value); }; Spawn.ar({ if(s1.value == 1, {EnvGen.ar(e, SinOsc.ar(440, 0, c.value * amp))}, if(s2.value == 1, {EnvGen.ar(e, Blip.ar(440, 7, c.value * amp))}, if(s3.value == 1, {EnvGen.ar(e, SyncSaw.ar(440, 440, c.value * amp))}, {EnvGen.ar(e, LFNoise1.ar(20000, c.value * amp))} ); ); ); }, 1, 60); }.play; ) ------------------------------ Date: Sun, 13 Dec 1998 11:07:47 +0200 From: Maurizio Giri <---@---.---> Subject: SC2 with Newer G3 cards? Anybody using a PPC 8100/110 with a Newertech G3 upgrade out there? How it works? It's Supercollider II compatible? TIA Maurizio Giri _____________________________________________ o Maurizio Giri o o ConTempo o o Italian Contemporary (and Early) Music o o http://www.axnet.it/contempo o o-------------------------------------------o o ConTempo e-mail: contempo@wmail.axnet.it o o Personal e-mail: m.giri@agora.stm.it o o o o Snail: Via Ostilia, 55 - 00184 Roma Italy o o Tel +39.6.70451885 o _____________________________________________ ------------------------------ Date: Sun, 13 Dec 1998 09:22:40 -0600 From: James McCartney <---@---.---> Subject: Re: SC 2.0d28 and S. Pope examples At 3:48 PM -0600 12/12/98, John Duesenberry wrote: >Please excuse a real dumb-ass newbie question, but I've never used >SuperCollider before and have no clue about its version history. > >Is SC 2.0d28 code-compatible with previous versions? The latest version is 2.0d29 and no, it is not compatible with version 1 code. Alberto de Campo at UCSB is working on a new tutorial to replace Stephen Pope's, I beleive. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sun, 13 Dec 1998 09:40:49 -0600 From: James McCartney <---@---.---> Subject: Re: simple little app... At 2:06 PM -0600 12/12/98, Colby Leider wrote: >here's a really simple metronome. i was trying to understand tempo >based scheduling so i made this, and it helped. Allocating UGens like SetTempo in a view action proc has no effect since the action proc is called outside of any Synth creation function, so the UGen never gets run. These lines can be deleted. In SC, tempo is specified in beats per SECOND. Since you are specifying in BPM and your Spawn has a nextTime of 60 beats then setting in BPM gives proper apparent tempo, but a more normal writing of this code would be as follows: // metroGnome! // a goofy little SuperCollider program // colby leider ( var w, a, b, e, s1, s2, s3, s4; w = GUIWindow.new("metroGnome", Rect.newBy( 740, 191, 170, 223 )) .backColor_(rgb(76,121,166)); a = SliderView.new( w, Rect.newBy( 16, 20, 26, 179 ), "", 60, 30, 220, 1, 'linear') .backColor_(rgb(149,153,166)); c = CheckBoxView.new( w, Rect.newBy( 57, 23, 80, 20 ), "On/Off", 0, 0, 1, 0, 'linear'); s1 = RadioButtonView.new( w, Rect.newBy( 57, 113, 80, 20 ), "Sine", 1, 0, 1, 0, 'linear'); s2 = RadioButtonView.new( w, Rect.newBy( 57, 134, 80, 20 ), "Blip", 0, 0, 1, 0, 'linear'); s3 = RadioButtonView.new( w, Rect.newBy( 57, 157, 80, 20 ), "Saw", 0, 0, 1, 0, 'linear'); s4 = RadioButtonView.new( w, Rect.newBy( 57, 179, 80, 20 ), "Noise", 0, 0, 1, 0, 'linear'); b = NumericalView.new( w, Rect.newBy( 57, 68, 47, 21 ), "NumericalView", 60, 0, 1e+10, 0, 'linear'); e = Env.perc(0.005, 0.1, 1, -2); // percussive envelope { arg synth; var amp = 0.5; // output gain SetTempo.kr(nil, ControlIn.kr(w.at(0))/60.0); a.action = { // force the numeric entry to follow the slider b.value = a.value; }; b.action = { // force the slider to follow the numeric entry // i.e., click on entry and move mouse up/down a.value = b.value; }; Spawn.ar({ if(s1.value == 1, {EnvGen.ar(e, SinOsc.ar(440, 0, c.value * amp))}, if(s2.value == 1, {EnvGen.ar(e, Blip.ar(440, 7, c.value * amp))}, if(s3.value == 1, {EnvGen.ar(e, SyncSaw.ar(440, 440, c.value * amp))}, {EnvGen.ar(e, LFNoise1.ar(20000, c.value * amp))} ); ); ); }, 1, 1); }.play; ) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sun, 13 Dec 1998 18:52:02 +0200 From: Maurizio Giri <---@---.---> Subject: Re: SC2 with Newer G3 cards? Sorry, i forgot. I'm also interested in SC compatibility of other accelerator cards for PPC 8100, like Sonnet, for instance. Anyone? TIA Maurizio Giri _____________________________________________ o Maurizio Giri o o ConTempo o o Italian Contemporary (and Early) Music o o http://www.axnet.it/contempo o o-------------------------------------------o o ConTempo e-mail: contempo@wmail.axnet.it o o Personal e-mail: m.giri@agora.stm.it o o o o Snail: Via Ostilia, 55 - 00184 Roma Italy o o Tel +39.6.70451885 o _____________________________________________ ------------------------------ Date: Sun, 13 Dec 1998 13:51:03 -0500 (EST) From: "Ronald J. Kuivila" <---@---.---> Subject: spawning from sched Hi James, 1. I am running into situations where I want to spawn sounds from a synth task (i.e., routine calling sched), but I want the sounds to be added to the input of running unitgenerators. I assume this is where the synth abstraction shines, but I cannot figure out how to do it... 2. The compiler now objects if you try to definefunctions that are not part of a class in files that are are part of a library. Why? 3. Would it be possible to allow interpretation of code (using select/enter) while synthesis is occurring? It would be handy for certain kinds of parameter diddling and debugging. 4. It would worth having a method to change a ControlIn's lag value on the fly. (I tried drilling down into the class definition, but I couldn't make it work.) 5. Similarly, it would be nice to be able to change an EnvGen's envelope specification before triggering it. (I just made the env instance variable modifiable and that seemed to work.) 6. 1,4, and 5 above are all examples of situations where there is a fixed configurration of unitgenerators that one would like to reparameterize through the GUI or functions called by sched. Any words of wisdom on the general problem would be appreciated. RJK ------------------------------ End of sc-users-digest V1 #20 *****************************