From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #13 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, November 16 1998 Volume 01 : Number 013 ---------------------------------------------------------------------- Date: Wed, 4 Nov 1998 13:12:57 +0200 From: laurson@amadeus.siba.fi (Mikael Laurson) Subject: Samples sustainLoopStart and sustainLoopEnd methods seem to return both 0's (incorrectly) if a large amount of samples is loaded into SC2. (If one loads only a small amount of samples - say less than 10 files - sustainLoopStart and sustainLoopEnd methods return correct values). I am using the following code to play samples: *sample { arg namestr, speed = 1, offset = 0; var sampleinfo, sound, signal, susLS, susLE; sampleinfo = detect(loadedSamples, {arg item; this.strEqual(namestr,at(item, 0))}); sound = at(sampleinfo, 1); signal = at(sampleinfo, 2); susLS = sound.sustainLoopStart; susLE = sound.sustainLoopEnd; ^PlayBuf.ar(signal, sound.sampleRate, speed, offset, susLS, susLE) } where 'loadedSamples' (having the format: [[path1, sound1, signal1]...]) contains the samples that have been loaded into the system. This works only if sustainLoopStart and sustainLoopEnd are not 0. (If both are 0's then SC2 crashes.) If I make the following correction the problem seems to disappear (i.e. susLE is never = 0): *sample { arg namestr, speed = 1, offset = 0; var sampleinfo, sound, signal, susLS, susLE; sampleinfo = detect(loadedSamples, {arg item; this.strEqual(namestr,at(item, 0))}); sound = at(sampleinfo, 1); signal = at(sampleinfo, 2); susLS = sound.sustainLoopStart; susLE = sound.sustainLoopEnd; if (susLE == 0, {susLE = signal.size-2}); //if both = 0 -> crash?? ^PlayBuf.ar(signal, sound.sampleRate, speed, offset, susLS, susLE) } What is even more strange is that the problem (sustainLoopStart and sustainLoopEnd returning 0's) disappears if I load temporarily only a couple of samples. If I after this reload the large amount of samples then sustainLoopStart and sustainLoopEnd are correct!? Another problem that appears when a large amount of samples have been loaded is that when playing I get often only a very harsh noise (this is quite unpredictable: out of 10 trials maybe 3-4 are playing OK). The noise is similar to the one that you get when you have some garbage in a delay loop with feedback (I am using reverb that contains Comb and Allpass filters). Could it be that the delays contain some garbage when memory is tight? I don't have this problem with examples with only a few (or no) samples. Are there some primitives that one could use to check out the current status of the system (like the "Free memory" menu in SC1)? Finally, it would be convenient that when writing to disk (i.e. when using the non-real-time mode) one could see the current elapsed time of the calculation. (This works currently only in reat-time). Mikael ================================ Mikael Laurson Hollantilaisentie 1 A 2 00300 Helsinki 33 Finland E-mail: laurson@siba.fi ================================ ------------------------------ Date: Thu, 5 Nov 98 10:21:14 +0000 From: Chris <---@---.---> Subject: Asio Driver for Protools I have read recently that there are ASIO Drivers for Protools Hardware available on the net. Has anybody on the group any knowledge of: [1] Where to find them. [2] If they/it is likely to work with Super Collider together with Protools. Getting audio out of SC. through Protools using an old DigiDesign Driver has always worked and has never caused a problem, but getting (Line level) live audio in through Protools (d24) to SC. has never been possible for me. Does anybody have any thoughts on this matter. Best Wishes Chris Hughes ------------------------------ Date: Thu, 5 Nov 1998 09:43:53 -0600 From: James McCartney <---@---.---> Subject: back from Mexico I've returned from Mexico. I will try to catch up answering here as soon as I can. While there I started on a new tutorial set for version 2. - --- Also added keyword arguments, so if you like you can write: SinOsc.ar(freq: 800, mul: 0.1) Keywords in calls to 'value' for functions also works: { arg a=1, b=2, c=3, d=4; [a,b,c,d].postln }.value(b:7, c:8); // posts: [ 1, 7, 8, 4] Keyword arguments are not quite as fast as positional arguments, but sometimes more convenient and more self documenting. You can specify the keywords in any order. Unlike in some languages, all arguments can be specified by keyword. I.e., there are no arguments specifically declared as keyword arguments. Some more regularization of argument naming will need to be done in the library to support this more uniformly. Some has already been done. - --- The classes Function and Closure have been made into the same class now named Function and the class Block has been renamed FunctionDef. Most people not familiar with Smalltalk or Scheme are more familiar with the name 'function' than 'closure'. This may make it a bit easier to bootstrap folks up. Closures (now called Functions) now have the arithmetic properties that Function did, so that { [ 100, 200, 300 ].choose } + { 10.rand } will produce a new Function that returns one of 100-109,200-209,300-309. - --- This version will be uploaded pending some more changes. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 5 Nov 1998 10:06:16 -0600 From: James McCartney <---@---.---> Subject: Re: aliases to Sounds folders At 6:46 PM -0600 10/26/98, David Crandall wrote: >I may finally have some time to get up on the SC2 learning curve, but I'd >like to avoid duplicating the Sounds folder I already have for SC 1.x, >which I'm still using. Is there a way to indicate folder aliases so SC >will know where things are? SC2 does not search for things like SC1 did. You give it specific path names. There may be such facilities later, but not currently. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 5 Nov 1998 10:11:49 -0600 From: James McCartney <---@---.---> Subject: Re: 1212 card S/PDIF in At 3:59 AM -0600 10/30/98, finer@easynet.co.uk wrote: >Is there a way to get AudioIn to read from the 1212 's S/PDIF in ? Yes. The S/PDIF inputs are 11 & 12. So you'd say AudioIn.ar([11,12]) Also, if you look in Main.sc you'll see: Synth.setInputRouting([9, 10, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); This means that AudioIn.ar([1,2]) is actually getting channels 9 & 10 from the hardware. These are the analog inputs. If you want to use the ADAT optical inputs you need to change this to normal: Synth.setInputRouting([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Thu, 05 Nov 1998 22:14:48 +0100 From: Staffan Liljegren <---@---.---> Subject: Re: back from Mexico Not wanting to start a religious war or something, but I actually like Closures a lot (having background both from Lisp, ML and ST), they are close to anonymous functions in Lisp) But I think it is a good thing to unify Function and Closure though and the addition of arith properties is also good , so I support Your decision and can live with the name Function, which in my (ML infected) sense is more strict. - -Staffan Liljegren James McCartney wrote: > snip... > > The classes Function and Closure have been made into the same class > now named Function and the class Block has been renamed FunctionDef. > > Most people not familiar with Smalltalk or Scheme are more familiar > with the name 'function' than 'closure'. This may make it a bit easier > to bootstrap folks up. > > Closures (now called Functions) now have the arithmetic properties > that Function did, so that > { [ 100, 200, 300 ].choose } + { 10.rand } > will produce a new Function that returns one of 100-109,200-209,300-309. > ------------------------------ Date: Sat, 7 Nov 1998 21:31:03 -0600 From: James McCartney <---@---.---> Subject: Re: "series and parallel" signal flow At 2:00 PM -0600 10/30/98, Landon Rose wrote: > To a more general question-in terms of filters and delays- > how are the analog variants "parallel" and "series" expressed in SC? Have a look at the reverb patch in "Why SuperCollider?". It demonstrates a reverb with combs in parallel and allpasses in series. Also the "monastic resonance" example in the file "examples 5" does the same thing. In "examples 7" there is an example of a reverb using only allpasses in series in the "aleatoric quartet" example. To mix in parallel m combs do this: z = ...some ugen graph... x = Mix.ar(Array.fill(m, { CombN.ar(z, maxtime, acttime, dcytime); })); To make a series of n allpasses you can do the following: x = ... some ugen graph... n.do({ x = AllpassN.ar(x, maxtime2, acttime2, dcytime2); })' x // the output. The above constructs a daisy chain signal flow graph by reassigning to the variable x. If x starts out as a 2 channel array then you will get two allpass chains in parallel due to multi channel expansion. > One last but important question! If I am listening through >headphones on a powerbook, am I hearing all of code below? If scope is showing 4 views then there are 4 output channels so you won't hear them all on headphones. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 7 Nov 1998 21:40:14 -0600 From: James McCartney <---@---.---> Subject: Re: MIDI keyboard control At 3:28 PM -0600 10/30/98, David Cottle wrote: >Hi, > >I'm a new user and have been through the MIDI controller help pages but >can't see how to control with the keyboard. Is the keyboard in the same >class as the modulation wheel? If so, any idea what the number it would be >for a Casio 110? (I got it second hand and don't have the documentation.) There is a Voicer class that will spawn events from a MIDI keyboard. Have a look at the help file for that. Many MIDI controller numbers are standardized. Mod wheel is controller 1. I'm sure there is a web site somewhere that has these listed. The keyboard itself is not a controller though. If you want to make a mono synth then there are MIDIMostRecentNote and MIDINoteGate that make control signals like the old analog keyboards used to produce. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 7 Nov 1998 22:07:53 -0600 From: James McCartney <---@---.---> Subject: Re: 2 questions: large score and playback rate At 6:21 PM -0600 11/2/98, Mark Ballora wrote: >Welcome back, James! I hope your trip was everything you meant it to be. > >1) >I'm still working with OrcScore, using a _large_ (80,000+ entries) score. >I get an Out of Memory message when I try to run it, and I have to quit and >restart SuperCollider before I can run another instrument. It works fine >with a shorter score file. Is there a way to make a large score like this >work? Increase the Get Info size of SC..? I guess I'll have to make another (dumber) way to read large files for those of you intent on abusing the system.. ;-) You just won't be able to embed arbitrary code like you can with 'executeFile'. >Running the instrument produces > >alloc failed 1 19 4194336 >Is this the same problem from 1) in a new package, or is there something >wrong with my patch and/or my OrcScore modifications? I think it is. It is trying to allocate 4 megs for something and I don't see any delay lines or other buffers in your patch so perhaps it is your score. Each slot takes up 8 bytes and you have 80000+ * 4 slots. Each object has some overhead as well and you have 80000+ objects. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 7 Nov 1998 22:25:55 -0600 From: James McCartney <---@---.---> Subject: Re: Samples At 5:12 AM -0600 11/4/98, Mikael Laurson wrote: >sustainLoopStart and sustainLoopEnd methods seem to return >both 0's (incorrectly) if a large amount of samples is loaded >into SC2. (If one loads only a small amount of samples - say less >than 10 files - sustainLoopStart and sustainLoopEnd methods return >correct values). When you read the samples are you checking the Boolean return codes to be sure that the read actually succeeded? >I am using the following code to play samples: > > *sample { arg namestr, speed = 1, offset = 0; > var sampleinfo, sound, signal, susLS, susLE; > sampleinfo = detect(loadedSamples, {arg item; > this.strEqual(namestr,at(item, 0))}); > sound = at(sampleinfo, 1); > signal = at(sampleinfo, 2); > susLS = sound.sustainLoopStart; susLE = sound.sustainLoopEnd; > ^PlayBuf.ar(signal, sound.sampleRate, speed, offset, susLS, susLE) > } How are you using this code? You can't create a UGen like PlayBuf outside of a call to Synth.new and then use it later in a Synth. Synth.play({ ..all UGens must be created while this function is active.. }); >Are there some primitives that one could use to check out the current >status of the system (like the "Free memory" menu in SC1)? This would be a good thing to have but it is not there yet. Since all memory is GCed now even samples and delay buffers and was not in SC1, it is more difficult to determine how much memory is free. You can do this.gcInfo in the interpreter and you will get an enigmatic report of the state of the GC.. > >Finally, it would be convenient that when writing to disk (i.e. when using >the non-real-time mode) one could see the current elapsed time of the >calculation. >(This works currently only in reat-time). This has been fixed. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 9 Nov 1998 09:52:04 +0000 From: finer@easynet.co.uk (Jem Finer) Subject: various list questions and the dreaded sample click 1. If I write : a = [1,2,3,4,5]; a.permute(3).postln; I get the original list. Same with pyramid too. Maybe I'm doing something a bit wrong ! 2. I can find a way of adding to the end of a list (add) but is there something like addFirst to add to the beginning of a list ? 3. Just wondering if any more light was shinable on the sample click problem. One further thing I could say about the problem is that it doesn't always happen with the same sample - can run a patch which clicks several times and then it'll run all clean and nice. Also the click is sometimes there if I run the patch before loading the sample. Cheers, Jem Jem Finer Kentish Town London NW5 finer@easynet.co.uk ------------------------------ Date: Mon, 9 Nov 1998 14:29:39 -0500 From: Mark Ballora <---@---.---> Subject: Re: 2 questions: large score and playback rate I'd written: >>1) >>I'm still working with OrcScore, using a _large_ (80,000+ entries) score. >>I get an Out of Memory message when I try to run it, and I have to quit and >>restart SuperCollider before I can run another instrument. It works fine >>with a shorter score file. Is there a way to make a large score like this >>work? > You wrote: >Increase the Get Info size of SC..? Tried that. No-workie. >I guess I'll have to make another (dumber) way to read large files for >those of you intent on abusing the system.. ;-) I'm happy to be of service :-) I tried the patch with a shorter file of manageable length. It doesn't seem to like my revision to OrcScore. SC's exact complaint was ERROR: Message 'timeScale_' not understood. RECEIVER: Instance of Synth { (02F006A4, gc=00, fmt=00, flg=00, set=06) instance variables [8] ugens : nil outputs : nil parent : nil blockSize : Integer 64 releaseTime : nil channelOffset : Integer 0 schedQueue : nil bSchedQueue : nil } ARGS: Instance of Array { (02F007F4, gc=00, fmt=01, flg=00, set=00) indexed slots [1] 0 : instance of SliderView (02EFFEA4, size=0, set=05) } CALL STACK: Object : doesNotUnderstand arg this = arg selector = 'timeScale_' arg args = [*1] arg spawn = arg i = 0 arg synth = arg deltaTime = 0.894737 arg instrumentNum = 0 arg dataval = 0.894737 arg spawn = arg eventCount = 0 arg synth = var pfields = [*3] var instrument = arg synth = Meta_Synth : new arg this = arg argNewSynthBlock = Spawn : getNewEvent arg this = var newSynth = nil Synth : play arg this = arg argDuration = nil Meta_Synth : play arg this = arg argNewSynthBlock = arg argDuration = nil var newsynth = ... *************** That revision again: I went into Cycle.sc and changed the OrcScore definition to read: OrcScore { // orchestra is an array (or dictionary) of instrument functions. // score is an array of arrays of parameters to be passed to the instrument function. *ar { arg orchestra, score, argNumChannels = 1, argNextTime = 1.0, argMaxRepeats = 1, timeScale=1.0, mul = 1.0, add = 0.0; var maxrepeats; maxrepeats = if (argMaxRepeats.notNil, { argMaxRepeats * score.size },{ nil }); ^Spawn.ar( { arg spawn, eventCount, synth; var pfields, instrument; pfields = score.wrapAt(eventCount); spawn.nextTime = pfields.at(0) * timeScale.poll; // pfield zero must be delta time instrument = orchestra.at(pfields.at(1)); // pfield one must be instrument index instrument.valueArray(spawn, eventCount, synth, pfields); // call instrument function }, argNumChannels, argNextTime, maxrepeats, mul, add ) } My patch looks like: ( // FOR USE WITH THE ALTERNATE CYCLE.SC var timelist; timelist = thisProcess.interpreter.executeFile("shorthrv_time_condense"); e = Env.new ([0, 1, 0], [0.004, 0.2, 0.004], 'linear'); Synth.play({ var w; var rate, rate_display; w = GUIWindow.new("panel", Rect.newBy( 178, 67, 275, 90 )); rate=SliderView.new( w, Rect.newBy( 16, 9, 163, 20 ), "SliderView", 1, 1, 100, 0, 'linear'); rate_display=NumericalView.new( w, Rect.newBy( 186, 9, 64, 20 ), "NumericalView", 1, 1, 100, 0, 'linear'); StringView.new( w, Rect.newBy( 65, 33, 128, 20 ), "Rate"); rate.action = { rate_display.value = rate.value }; rate_display.action = { rate.value = rate_display.value }; OrcScore.ar( [{ arg spawn, i, synth, deltaTime, instrumentNum, dataval; synth.timeScale=rate; EnvGen.ar(e, Impulse.ar(1/dataval, 0.5)); } ], timelist, 1, nil, 1) }) And the file "shorthrv_time_condense" consists of: #[ [ 0.894737, 0, 0.894737 ], [ 0.887218, 0, 0.887218 ], [ 0.909774, 0, 0.909774 ], [ 0.932331, 0, 0.932331 ], [ 0.932331, 0, 0.932331 ], [ 0.924812, 0, 0.924812 ], [ 0.917293, 0, 0.917293 ], [ 0.917293, 0, 0.917293 ], [ 0.932331, 0, 0.932331 ], [ 0.932331, 0, 0.932331 ], [ 0.909774, 0, 0.909774 ], [ 0.924812, 0, 0.924812 ], [ 0.917293, 0, 0.917293 ], ... [ 0.962406, 0, 0.962406 ] ] ------------------------------ Date: Mon, 9 Nov 1998 19:37:58 -0600 (CST) From: "AUDIOSYNTH.COM" <---@---.---> Subject: Re: 2 questions: large score and playback rate >synth.timeScale = rate; Synth has no timeScale_ method. timeScale is an argument to OrcScore.ar . ------------------------------ Date: Tue, 10 Nov 1998 02:42:39 +0100 From: Wolfgang Suppan <---@---.---> Subject: time from synth Hi, can anyone help me, how to do a function, that prints out (.postln) the time [in milliseconds] between the impulses of a dust unit-generator ie: {dust.ar(2)} Regards, WS ps: my problem is to get the current time from the synth. ------------------------------ Date: Tue, 10 Nov 1998 15:58:01 +0100 From: Staffan Liljegren <---@---.---> Subject: DelayWr and Subject: Re: debug stitched code James- I'm sending this as a typical example of a problem that I run into all the time when trying to knit one bit of code to another. The Error message "Message 'numChannels' not understood." doesn't locate the source of the problem, ( the problem being "p" an undeclared variable, should be 'file') well, of course it does, but at a level lower than I'm able to readily see. That is to say, I looked at the DiskIn.help file but that doesn't refer to 'numChannels' either, one finds it in DiskIO.sc, which I guess is the ugen 'numChannels' is refering too? excuse my lack of experience in programming but is there a way the Error could read "Message 'p' not understood" ? or perhaps give the ugen that doesn't understand the message? As with much of the workings of SC, perhaps your error messages will turn out to be a perfectly fine way to understand errors once I learn how to decipher them. The way I deal with this problem now is to rebuild the code step by step which would I suppose I should do from the beginning anyway! ( Synth.scope({ var s, z, y, decayTime, delayScale, file; decayTime = MouseX.kr(0,16); delayScale = MouseY.kr(0.01, 1); file = SoundFile.new; file.readHeader("bigbeans:BowSC:Bow1"); s = DiskIn.ar( p, true); z = DelayN.ar(Mix.ar(s), 0.048); y = Mix.ar(CombL.ar(z, 0.1, Array.fill(8,{0.04.rand2 + 0.05}) * delayScale, decayTime)); 5.do({ y = AllpassN.ar(y, 0.050, [0.050.rand,0.050.rand], 1) }); LeakDC.ar(y) } , 0.8) ) ERROR: Message 'numChannels' not understood. RECEIVER: nil ARGS: Instance of Array { (02226438, gc=80, fmt=01, flg=81, set=00) } CALL STACK: Object : doesNotUnderstand arg this = nil arg selector = 'numChannels' arg args = [*0] DiskIn : initOutputs arg this = var i = 0 var outChan = nil var numChannels = nil DiskIn : init arg this = arg argSoundFile = nil arg argLoop = true arg argStartFrame = 0.......... etcetera ------------------------------ Date: Wed, 11 Nov 1998 19:42:11 +0100 From: Hans Tutschku <---@---.---> Subject: Gui-question Hi James, I have two questions concerning the code below. Why I have to scale down the SP/DIF input of the KORG-card to avoid clipping? (It sounds good BTW, just curious why this factor 0.0005) Now the GUI-problem: If I'm scanning the actual value of a slider in the main-GUI-window, it works fine (look into the routine "ringmodulation" - the variable "outnum" is the second slider on the main-GUI-window. If instead I want to have this slider on a second GUI-window (open by clicking on edit), I don't get it working. What's wrong? Hans ( // ******************************************************************************** *********************** // GLOBAL VARIABLES //fenster var hauptfenster; var rmfenster; // hauptfenster var w; //fenster "Konzert-99-99" var innum; //numberbox inputgain var inslide; //slider inputgain var outnum; //numberbox outputgain var outslide; //slider outputgain var buttonrmedit; var rmcheck; //checkbox ringmod var origcheck; //checkbox original sound // rmfenster var wrm; //fenster "ringmod" var glissf; var glissfreqslide; // ******************************************************************************** *********************** hauptfenster = { w = GUIWindow.new("Konzert-99-99", Rect.newBy( 10, 60, 300, 204 )) .backColor_(rgb(28,145,214)); innum = NumericalView.new( w, Rect.newBy( 21, 21, 37, 16 ), "NumericalView", 0.5, 0, 1, 0.01, 'linear') .backColor_(rgb(176,176,176)); inslide = SliderView.new( w, Rect.newBy( 61, 21, 119, 16 ), "SliderView", 0.5, 0, 1, 0.01, 'linear') .backColor_(rgb(92,253,255)).knobColor_(rgb(176,176,176)); StringView.new( w, Rect.newBy( 184, 18, 128, 20 ), "Input") .backColor_(rgb(28,145,214)); outnum = NumericalView.new( w, Rect.newBy( 21, 45, 37, 16 ), "NumericalView", 0, 0, 100, 0.01, 'linear') .backColor_(rgb(176,176,176)); outslide = SliderView.new( w, Rect.newBy( 61, 45, 119, 16 ), "SliderView", 0, 0, 100, 0.01, 'linear') .backColor_(rgb(92,253,255)).knobColor_(rgb(176,176,176)); buttonrmedit = ButtonView.new( w, Rect.newBy( 92, 134, 51, 19 ), "edit", 0, 0, 1, 0, 'linear'); origcheck = CheckBoxView.new( w, Rect.newBy( 21, 84, 67, 21 ), "orig.", 0, 0, 1, 0, 'linear'); rmcheck = CheckBoxView.new( w, Rect.newBy( 21, 134, 67, 21 ), "rm", 0, 0, 1, 0, 'linear'); inslide.action = { innum.value = inslide.value}; outslide.action = { outnum.value = outslide.value }; buttonrmedit.action = { rmfenster.value; }; }; // ******************************************************************************** *********************** rmfenster = { wrm = GUIWindow.new("ringmod", Rect.newBy( 300, 160, 371, 204 )) .backColor_(rgb(28,145,214)); glissf = NumericalView.new( wrm, Rect.newBy( 21, 69, 37, 16 ), "NumericalView", 3, 0.1, 100, 0.01, 'linear') .backColor_(rgb(176,176,176)); glissfreqslide = SliderView.new( wrm, Rect.newBy( 61, 69, 119, 16 ), "SliderView", 3, 0.1, 100, 0.01, 'linear') .backColor_(rgb(92,253,255)).knobColor_(rgb(176,176,176)); glissfreqslide.action = { glissf.value = glissfreqslide.value }; }; // ******************************************************************************** *********************** // BEGINN DER BEARBEITUNG hauptfenster.value; play({ arg synth; // ******************************************************************************** *********************** // original sound hoeren Pause.ar({ (AudioIn.ar([11,12]) * 0.0005 * ControlIn.kr(innum)) }, origcheck.kr(0) // control with check box with no lag time. ) + // ******************************************************************************** *********************** // ringmodulation Pause.ar({ AudioIn.ar([11,12]) * 0.0005 * ControlIn.kr(innum) * // slider in main-window - works fine //SinOsc.ar(LFSaw.kr( ControlIn.kr(outnum), 100, LFSaw.kr([1,0.323], 10, 1)).midicps, 0, 0.4); // slider in second window - doesn't work - why ????????????????????? SinOsc.ar(LFSaw.kr( ControlIn.kr(glissf), 100, LFSaw.kr([1,0.323], 10, 1)).midicps, 0, 0.4); }, rmcheck.kr(0) // control with check box with no lag time. ) }); GUIWindow.closeAll; ) ------------------------------ Date: Wed, 11 Nov 1998 17:18:03 -0600 (CST) From: "AUDIOSYNTH.COM" <---@---.---> Subject: Re: debug stitched code 'p' is a declared variable. The interoreter has instance variables a-z declared. ------------------------------ Date: Wed, 11 Nov 1998 17:22:25 -0600 (CST) From: "AUDIOSYNTH.COM" <---@---.---> Subject: Re: debug stitched code What happens is that p is nil. DiskIn sends p the numChannels message assuming it is a sound file. nil doesn't understand numChannels. If all arguments were to be checked for type it would slow down the code. This is one drawback to the flexibility provided by dynamic typing. ------------------------------ Date: Wed, 11 Nov 1998 22:30:25 -0500 From: Landon Rose <---@---.---> Subject: Re: debug stitched code Mystery person wrote: >'p' is a declared variable. The interoreter has instance variables >a-z declared. does this mean that one never has to declare var a-z? While I'm waiting for an answer I'm going to try it right now! Is there a list in Docs or somewhere that lists all the declared variables by the interpreter? Landon ------------------------------ Date: Fri, 13 Nov 1998 08:48:26 +0100 From: "Iannis Zannos" <---@---.---> Subject: Mystery person - ---------- >From: Landon Rose <---@---.---> >To: sc-users@lists.io.com >Subject: Re: debug stitched code >Date: Thu, 12 Nov 1998 4:30 AM > > > >Mystery person wrote: ... AUDIOSYNTH -> www.audiosynth.com Is there need for an associative memory module in SC? ;-? Cheers, Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 ------------------------------ Date: Fri, 13 Nov 1998 17:54:50 -0600 From: James McCartney <---@---.---> Subject: Re: debug stitched code At 9:30 PM -0600 11/11/98, Landon Rose wrote: >Mystery person wrote: >>'p' is a declared variable. The interoreter has instance variables >>a-z declared. > >does this mean that one never has to declare var a-z? While I'm waiting >for an answer I'm going to try it right now! > >Is there a list in Docs or somewhere that lists all the declared variables >by the interpreter? Type "Interpreter", select it and do cmd-H. a-z are instance variables of the Interpreter class. All expressions written in the interpreter act as if they are being evaluated from within a method of the interpreter. That's why in the interpreter 'this' always refers to the interpreter and why you have direct access to the instance variables a-z. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 13 Nov 1998 22:14:06 -0600 From: James McCartney <---@---.---> Subject: Re: Gui-question At 12:42 PM -0600 11/11/98, Hans Tutschku wrote: >Hi James, > >I have two questions concerning the code below. Why I have to scale down >the SP/DIF input >of the KORG-card to avoid clipping? (It sounds good BTW, just curious why >this factor 0.0005) Probably my bug. I'll have a look at it. > >Now the GUI-problem: > >If I'm scanning the actual value of a slider in the main-GUI-window, it >works fine (look into the routine "ringmodulation" - >the variable "outnum" is the second slider on the main-GUI-window. >If instead I want to have this slider on a second GUI-window (open by >clicking on edit), I don't get it working. > >What's wrong? What's wrong is that glissf is equal to nil when the patch is created because the second window function has not been called to initialize it. So when you create the ControlIn object the glissf variable is nil. Arguments such as glissf are always passed by value, not reference. You could do something like this instead: var glissInput, glissView; //in your patch function: glissInput = ControlIn.kr; //in your window creation function: glissView = NumericalView.new(...); glissInput.source = glissView; --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 13 Nov 1998 22:29:19 -0600 From: James McCartney <---@---.---> Subject: Re: time from synth At 7:42 PM -0600 11/9/98, Wolfgang Suppan wrote: >Hi, > >can anyone help me, how to do a function, that prints out (.postln) the >time [in milliseconds] >between the impulses of a dust unit-generator ie: > >{dust.ar(2)} Here's how to do it at control rate: { arg synth; Sequencer.kr({ synth.time.postln; }, Dust.kr(2)); }.play synth.time is only accurate at control rate. Sequencer can be used to perform any function upon receiving a trigger. What do you intend to do with this info once you get it? --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Fri, 13 Nov 1998 22:34:00 -0600 From: James McCartney <---@---.---> Subject: Re: DelayWr and Hi, > >Has the need for using wouldn't just > DelayWr.ar(dline, out) >do the job, as it returns the second (in) argument ? yes. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 14 Nov 1998 07:33:03 -0600 From: James McCartney <---@---.---> Subject: [ADMIN] list redistribution aliases Recently I've been getting a lot of bounced messages from addresses that are not directly subscribed to the list but are getting the list via an address that is an alias for a list of people. Be aware that if you are on an alias and that alias begins bouncing messages because any of its addresses has become invalid, I will unsubscribe the alias and then no one on that list will get any more messages. I prefer that redistribution aliases not be used, but if they are be sure you maintain it. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 14 Nov 1998 19:57:45 -0600 From: James McCartney <---@---.---> Subject: Re: various list questions and the dreaded sample click At 3:52 AM -0600 11/9/98, Jem Finer wrote: >1. >If I write : > >a = [1,2,3,4,5]; >a.permute(3).postln; Yes there is a bug with permute. I fixed it. >I get the original list. >Same with pyramid too. pyramid works fine however. Note that pyramid returns a new array. the original is not changed. >2. >I can find a way of adding to the end of a list (add) but is there >something like addFirst to add to the beginning of a list ? Yeah I guess an insert function would be useful, huh.. ;-) I'll add that. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 16 Nov 1998 13:34:25 -0500 From: Landon Rose <---@---.---> Subject: Freq envelope for filters James- How do I create a filter whose frequency is determined by an envelope? The code below works, sort of, needs smoothing or something, sounds different than using Line- that is, the quality of the sweep. ( //filtered AudioIn envelope var a, b, c, d, e; e = Env.new([0.001,1,0.3,0.8,0.001],[5,2,5,2],'linear'); { a = AudioIn.ar( 1); b = AudioIn.ar(2); d = EnvGen.ar(e,a, 0, 1, 0, 1); c = RLPF.ar(a, Amplitude.kr(d,0.01,0.01,8000,20), 0.1, 0.2); c }.scope(0.3); ) //Line comarison ( scope({ RLPF.ar( AudioIn.ar(1), Line.kr(20,8000,5), 0.2) }) ) Thanks Landon ------------------------------ Date: Mon, 16 Nov 1998 13:44:52 -0500 From: Landon Rose <---@---.---> Subject: PMCIA cards James and All- Anyone know of audio cards for 2400/3400 PowerBooks? This one is one the horizon: > The Vortex PCM2000 (PMCIA type II digital I/O card) provides a >professional stereo digital audio interface for MacOS and PC-compatible >portable computers. PCM2000 supports 2-in/2-out of 14-24 bit / 32, 44.1, >48kHz S/PDIF digital audio. Two cards ca be used for a total of four >channels. The crad come with Metric Halo MacOS drivers and a bundled >version of Metric Halo's MLM-100 metering software and is fully compatible >with Storm's full line A/D/A converters. > > 500 North Rainbow Blvd. Ste. 300 > Las Vegas, NV 89107 > Tel: (701) 221-2027 > Fax: (701) 655-5879 > http://www.stormaudio.com Would be highly convenient for me anyway. Landon ------------------------------ Date: Mon, 16 Nov 1998 13:24:04 -0600 From: James McCartney <---@---.---> Subject: Re: Freq envelope for filters At 12:34 PM -0600 11/16/98, Landon Rose wrote: >James- > >How do I create a filter whose frequency is determined by an envelope? >The code below works, sort of, needs smoothing or something, sounds different >than using Line- that is, the quality of the sweep. > >( >//filtered AudioIn envelope >var a, b, c, d, e; >e = Env.new([0.001,1,0.3,0.8,0.001],[5,2,5,2],'linear'); >{ > a = AudioIn.ar( 1); > b = AudioIn.ar(2); > d = EnvGen.ar(e,a, 0, 1, 0, 1); > c = RLPF.ar(a, Amplitude.kr(d,0.01,0.01,8000,20), 0.1, 0.2); > c > >}.scope(0.3); >) I'm not sure why you are using Amplitude. That is an Amplitude follower, not something to use on a control signal. Also you are throwing away audio input channel 2 .. variable b is never used. I'm not sure if you are trying to create an envelope follower filter or a one time envelope filter over a sound. ( //filtered AudioIn envelope var a, b, c, d, e; e = Env.new([0.001,1,0.3,0.8,0.001],[5,2,5,2],'linear'); { a = AudioIn.ar([1, 2]); d = EnvGen.kr(e, 1, 0, 8000, 20, 1); RLPF.ar(a, d, 0.1, 0.2); }.scope(0.3); ) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 16 Nov 1998 23:12:48 +0000 From: Wolfgang Suppan <---@---.---> Subject: Re: time from synth James McCartney wrote: > { arg synth; Sequencer.kr({ synth.time.postln; }, Dust.kr(2)); }.play > > synth.time is only accurate at control rate. > Sequencer can be used to perform any function upon receiving a trigger. > > What do you intend to do with this info once you get it? Thank you for your help. I'm working in the field of CAC (computer aided composition) with the ircam-programm PatchWork, and try to convert all my Lisp-functions -which I'm using for composition- in SC for realtime performance. Also I want to bring features from the SC-language (i.e. using the impulses of a Dust unit-generator as a rhythmical structure for a clarinet part) into my compositorial work: to obtain a equal level of structural ideas in non-realtime (score writing), and realtime (live performance in combination with comuter and instruments). I write the trigger-times of the dust unit generator into a textfile, to use these data's in PatchWork. Regards, Wolfgang ------------------------------ End of sc-users-digest V1 #13 *****************************