From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #139 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 Monday, July 3 2000 Volume 01 : Number 139 ---------------------------------------------------------------------- Date: Sat, 01 Jul 2000 13:51:15 -0500 From: James McCartney <---@---.---> Subject: Re: Function Names Must be Single-Character? on 7/1/00 1:19 PM, Gary Morrison at mr88cet@texas.net wrote: > It would appear that function names need to be single-character. That seems a > little too Fortrannesque for a "modern" language like SuperCollider, so > presumably I'm missing something. No that is not true. The names 'a'-'z' are instance variables of the interpreter object, so you do not have to declare those as names in the interpreter. (You do have to declare all variables in the class library.) Not declaring a variable is not good style however, it is just a convenience for trying out things in the interpreter. ( var myOrnateFunctionName; myOrnateFunctionName = {arg freq = 880; SinOsc.ar(freq)}; Synth.play (myOrnateFunctionName) ) note: Synth.play({s.value}) is redundant just use Synth.play(s) > but these produce errors: > ( > sineWave = {arg freq = 880; SinOsc.ar(freq)}; > > Synth.play ({sineWave.value}) > ) You have to declare your variables. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Sat, 01 Jul 2000 14:53:26 -0400 From: Jeffrey P Shell <---@---.---> Subject: Re: Function Names Must be Single-Character? > It would appear that function names need to be single-character. That seems a > little too Fortrannesque for a "modern" language like SuperCollider, so > presumably I'm missing something. You can have longer names, but you must predeclare them as a var. Turn > ( > sineWave = {arg freq = 880; SinOsc.ar(freq)}; > > Synth.play ({sineWave.value}) > ) into: ( var sineWave; sineWave = {arg freq = 880; SinOsc.ar(freq)}; Synth.play({sineWave.value}) ) Supercollider lets you use single letter (lower case) variable names without predeclaring them with 'var', but longer names need to be declared. In the Help:SCTutorial 8.5:1 Handling and Syntax:1.5 Basic SC Syntax, it says:: >> SC2 also has 'ready-made' variable names: single lowercase characters from >> a-z >> can be used directly as variable names without declaring them. >> >> a = 17; >> a.postln; // works. >> >> While this saves you a lot of typing when you write something short to try >> an idea really quickly, it is not recommended for any larger program: >> Declaring and using descriptive variable names like >> panoramaPosition, modulationFrequency, reverbOutput etc. >> makes the program readable to anybody and saves you a lot of typing >> in the documentation. ( Reasonable abbreviation is ok too; I would >> probably write panPos, modFreq, and revOut etc.) ------------------------------ Date: Sat, 01 Jul 2000 15:32:10 -0500 From: Gary Morrison <---@---.---> Subject: Re: Function Names Must be Single-Character? - --------------4FD94A8B4BF18E0461064AB5 Content-Type: text/plain; charset=iso-8859-1; x-mac-type="54455854"; x-mac-creator="4D4F5353" Content-Transfer-Encoding: quoted-printable > No that is not true. The names 'a'-'z' are instance variables of the > interpreter object, so you do not have to declare those as names in the= > interpreter. The normal-language bias I reacted from was to say, "what's all this hooh= ah about not knowing of a variable? I declared it as a function," but that of cou= rse is the wrong mindset for OOP. > > > ( > var myOrnateFunctionName; > myOrnateFunctionName =3D {arg freq =3D 880; SinOsc.ar(freq)}; > Synth.play (myOrnateFunctionName) > ) That, by the way, generates an error: ( var myOrnateFunctionName; myOrnateFunctionName =3D {arg freq =3D 880; SinOsc.ar(freq)}; Synth.play (myOrnateFunctionName) ) INPUT: Instance of Synth { (05BC64C0, gc=3D02, fmt=3D00, flg=3D00, set=3D= 06) instance variables [8] ugens : instance of Array (05BC1940, size=3D1, set=3D00) outputs : instance of SinOsc (05BC76A0, size=3D0, set=3D05) parent : nil blockSize : Integer 64 releaseTime : nil channelOffset : Integer 0 schedQueue : nil bSchedQueue : nil } =95 ERROR: input 1 to SinOsc is not a UGen, Float, or Integer. This, however, doesn't: ( var myOrnateFunctionName; myOrnateFunctionName =3D {arg freq =3D 880; SinOsc.ar(freq)}; Synth.play (myOrnateFunctionName.value) ) but I don't hear a sinewave coming from it either. - --------------4FD94A8B4BF18E0461064AB5 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
No that is not true. The names 'a'-'z' are instan= ce variables of the
interpreter object, so you do not have to declare those as names in the
interpreter.
The normal-language bias I reacted from was to say, "what's all this hooh= ah about not knowing of a variable?  I declared it as a function," but that of course is the wrong mindset for OOP.
 

(
    var myOrnateFunctionName;
   myOrnateFunctionName =3D {arg freq =3D 880;  Si= nOsc.ar(freq)};
   Synth.play (myOrnateFunctionName)
)

That, by the way, generates an error:
(
   var myOrnateFunctionName;
   myOrnateFunctionName =3D {arg freq =3D 880;  Si= nOsc.ar(freq)};
   Synth.play (myOrnateFunctionName)
)
INPUT:
Instance of Synth {    (05BC64C0, gc=3D02, fmt=3D0= 0, flg=3D00, set=3D06)
  instance variables [8]
    ugens : instance of Array (05BC1940, size=3D1,= set=3D00)
    outputs : instance of SinOsc (05BC76A0, size=3D= 0, set=3D05)
    parent : nil
    blockSize : Integer 64
    releaseTime : nil
    channelOffset : Integer 0
    schedQueue : nil
    bSchedQueue : nil
}
=95 ERROR: input 1 to SinOsc is not a UGen, Float, or Integer.
This, however, doesn't:
(
   var myOrnateFunctionName;
   myOrnateFunctionName =3D {arg freq =3D 880;  Si= nOsc.ar(freq)};
   Synth.play (myOrnateFunctionName.value)
)
but I don't hear a sinewave coming from it either. - --------------4FD94A8B4BF18E0461064AB5-- ------------------------------ Date: Sat, 01 Jul 2000 15:41:40 -0500 From: Gary Morrison <---@---.---> Subject: Re: Function Names Must be Single-Character? - --------------618978F7DF5F7DE1C9504536 Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353" Content-Transfer-Encoding: 7bit Gary Morrison wrote: > That, by the way, generates an error: > ... > This, however, doesn't: > ... > but I don't hear a sinewave coming from it either. Oh, but this does produce the desired effect: ( var myOrnateFunctionName; myOrnateFunctionName = {arg freq = 880; SinOsc.ar(freq)}; Synth.play ({myOrnateFunctionName.value}) ) - --------------618978F7DF5F7DE1C9504536 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Gary Morrison wrote:
That, by the way, generates an error:
...
This, however, doesn't:
...
but I don't hear a sinewave coming from it either.
Oh, but this does produce the desired effect:
(
   var myOrnateFunctionName;
   myOrnateFunctionName = {arg freq = 880;  SinOsc.ar(freq)};
   Synth.play ({myOrnateFunctionName.value})
)
- --------------618978F7DF5F7DE1C9504536-- ------------------------------ Date: Sat, 01 Jul 2000 15:47:44 -0500 From: James McCartney <---@---.---> Subject: Re: Function Names Must be Single-Character? Please don't post in HTML. > The normal-language bias I reacted from was to say, "what's all this hoohah > about not knowing of a variable? I declared it as a function," No you defined a function value. Declaration and definition are two different things. > ( > var myOrnateFunctionName; > myOrnateFunctionName = {arg freq = 880; SinOsc.ar(freq)}; > Synth.play (myOrnateFunctionName) > ) > That, by the way, generates an error: Oh I see you are trying to pass in an argument. I missed that. In that case do use Synth.play ({ myOrnateFunctionName.value }); Synth.play passes in the synth as the argument. So the synth was being plugged into the freq. > This, however, doesn't: > ( > var myOrnateFunctionName; > myOrnateFunctionName = {arg freq = 880; SinOsc.ar(freq)}; > Synth.play (myOrnateFunctionName.value) > ) > but I don't hear a sinewave coming from it either. The above is incorrect because you must pass a Function to Synth.play and the above is passing in a SinOsc (the result of evaluating the Function). ------------------------------ Date: Sun, 2 Jul 2000 15:45:49 +0800 From: rkuivila@mail.wesleyan.edu (Ron Kuivila) Subject: Ppatmod Hi James, In Ppatmod(list, function, reps), t he function does not have the pattern's prototypeEvent as its currentEnvironment. Is there some way to get at those environment variables from the function? RJK ------------------------------ Date: Sun, 02 Jul 2000 11:55:41 -0500 From: Gary Morrison <---@---.---> Subject: Off-Real-Time SuperCollider Capabilities? SuperCollider is clearly well-suited to real-time sound generation and manipulation. If I were to take what I'm working on now to its extremes, it's likely to clobber just about any CPU running it in real-time. Are there straight-forward ways to adapt SuperCollider programs written for the usual real-time execution into off-real-time execution? ------------------------------ Date: Sun, 02 Jul 2000 21:09:15 -0500 From: Gary Morrison <---@---.---> Subject: Licensed Per Installation or Per Usage at Any One Time? I'm trying to remember: Does one SuperCollider license allow me to install SuperCollider on two machines as long as I don't run it on both machines at the same time? I ask mostly because I just picked up a G4 beast, and I need to know whether, after I install it on that machine, I need to toss it from my PowerBook. ------------------------------ Date: Sun, 02 Jul 2000 22:49:00 +0000 From: "christian.adam.hresko." <---@---.---> Subject: Re: Licensed Per Installation or Per Usage at Any One Time? Gary Morrison wrote: > I'm trying to remember: Does one SuperCollider license allow me to install > SuperCollider on two machines as long as I don't run it on both machines at the > same time? > > I ask mostly because I just picked up a G4 beast, and I need to know whether, > after I install it on that machine, I need to toss it from my PowerBook. james mentioned a few months ago that you can run it on as many machines as you like, as long as the machines are yours. (other machines not owned by you require another license...) cheers, christian : btw, anybody hear about this c sharp thing microsoft is developing? (at least i think it was microsoft...) - -- http://www.thislinkgoesnowhere.com ------------------------------ Date: Sun, 02 Jul 2000 23:02:26 -0500 From: Gary Morrison <---@---.---> Subject: Problems Running on G4? Have any of you had, or heard of others who've had, problems running SuperCollider on the usual 500MHz G4 machine (256Meg RAM, 27Gig HD, DVD-RAM backup, etc.)? It doesn't seem to run on that new machine. I'm sure there's a perfectly good reason, and that James will take care of me, so no worries of course. I'm just curious if as to whether there are famous G4-specific conflicts or whatever that I can try out right away. Thanks! ------------------------------ Date: Sun, 02 Jul 2000 21:20:46 -0700 From: Alberto de Campo <---@---.---> Subject: Re: Problems Running on G4? Gary Morrison wrote: > Have any of you had, or heard of others who've had, problems running > SuperCollider on the usual 500MHz G4 machine (256Meg RAM, 27Gig HD, DVD-RAM > backup, etc.)? It doesn't seem to run on that new machine. It does on ours. Try turning off virtual memory, and thin out the system extensions, keeping only what you really need in a special SC2 set. That usually does it. Best, adc ------------------------------ Date: Sun, 02 Jul 2000 23:39:02 -0500 From: James McCartney <---@---.---> Subject: Re: Problems Running on G4? on 7/2/00 11:02 PM, Gary Morrison at mr88cet@texas.net wrote: > Have any of you had, or heard of others who've had, problems running > SuperCollider on the usual 500MHz G4 machine (256Meg RAM, 27Gig HD, DVD-RAM > backup, etc.)? It doesn't seem to run on that new machine. I have a 450 G4 that I use daily. I do not know offhand what your problem might be. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Sun, 02 Jul 2000 23:41:20 -0500 From: James McCartney <---@---.---> Subject: Re: Off-Real-Time SuperCollider Capabilities? on 7/2/00 11:55 AM, Gary Morrison at mr88cet@texas.net wrote: > SuperCollider is clearly well-suited to real-time sound generation and > manipulation. If I were to take what I'm working on now to its extremes, it's > likely to clobber just about any CPU running it in real-time. Are there > straight-forward ways to adapt SuperCollider programs written for the usual > real-time execution into off-real-time execution? > > Use Synth.write. Read "Tutorials:Audio 01 - Synth" - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Mon, 3 Jul 2000 09:01:57 +0200 From: integer@www.god-emil.dk Subject: [ot] [!nt] \n2+0\ 242.firewire.lib kontent !d : nato.0+55.modular dv \ fireuire info data [c]ccp 0+0000+ n2+0: beauty has its reasons. - N 4 .firewire N 4 .firewire is a multi klient \ multi application firewire extension. permitting multiple applications and klients to simultaneously engage in video + audio firewire aktivity. presently klients exist for : - nato.0+55.modular. - image\ine. - msp. details - email : nato.055.fireuire@m9ndfukc.com - http : http://www.eusocial.com/242/fireuire - N 4 .firewire - - multi.klient. multi.hizzi. firewire.protokol 0 0 0 || KORPORAT KR!EG MACHT 3k0R KUNST N[>] IMF - the International Meme Fund - shear pathway to the core. - promoting meme development. lokomotion. + reinvestment. - meme sekurity + meme transaktions. [>] ||||||||||||||||||||| rekurrent exc!tat!on || ||||||||eusocial.com pro satisfacer le metro < 0\ zve!te[z]!ztem \1 > ------------------------------ Date: Mon, 03 Jul 2000 07:54:27 -0500 From: Gary Morrison <---@---.---> Subject: Re: Problems Running on G4? > > Have any of you had, or heard of others who've had, problems running > > SuperCollider on the usual 500MHz G4 machine > It does on ours. Good to hear. > > > Try turning off virtual memory, and thin out the system extensions, VM's off, and I've tried it with no extensions. Buuuuut, I noticed this morning that both Norton and Disk First Aid report problems with the disk. As soon as I can find a DVD-RAM medium, I'll back it up and run Norton on it, or possibly reformat and restore, if necessary. I wonder how disk problems came up so quickly... ------------------------------ Date: Mon, 03 Jul 2000 07:44:47 -0500 From: Gary Morrison <---@---.---> Subject: Re: Off-Real-Time SuperCollider Capabilities? > Use Synth.write. Read "Tutorials:Audio 01 - Synth" Ah, perfect; I somehow missed that distinction between Synth.write and Synth.record. Thanks. ------------------------------ Date: Mon, 03 Jul 2000 02:43:03 -0400 From: "crucial" <---@---.---> Subject: Re: FloatArray Methods >Joel Ryan ... >What I'm trying to do: >is collect a snapshot of parameters (single floats and arrays of same) >into one long flat array for writing and reading from disk. >and which is composed and decomposed >to/from the arrays of my active global parameters. > >I was going to use compileStrings and environment dictionaries for storage >This would be a very easy if not the fastest way to change envirionments of parameters. >But since until v3.0 there is no compiling at run time, There is compiling at run time now. I do it all the time. Reading SoundFile headers at runtime is what cannot currently be done. Possibly FloatArrays come under this category ? Considering the type of data you are saving, I would just use normal arrays. FloatArrays and their write methods are primarily targeted at sound data. The only problems with size in compiling normal text files is after two pages or so. Then the literal table can't handle all the input. I suppose if SC doesn't print all 17 digits, we are loosing accuracy of the floats after printing.... but in all my cases the floats are displayed with enough accuracy for the sound function or pattern in question. You shouldn't have to do any packing and upacking (like flattening the arrays). I often save stuff in Environments so everything is named, the order or contents can change from patch to patch and its easily editable / fixable with a text editor. Also, if you don't need to change the data once you have loaded it, you could save it with an extra #[ ] to specify a literal (which takes less memory). >... > >/////////////////////// >Joel Ryan >STEIM :: Ballett Frankfurt :: Institute of Sonology >Achtergracht 19, 1017WL Amsterdam >+31 (20) 624-3886 >+31 (20) 626-4262 fax >http://www.frankfurt-ballett.de/joel.html >http://www.steim.nl >/////////////////////////////////////////// > > > _____(( http://crucial-systems.com _________________))_______ ------------------------------ End of sc-users-digest V1 #139 ******************************