From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #45 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 Wednesday, June 23 1999 Volume 01 : Number 045 ---------------------------------------------------------------------- Date: Mon, 14 Jun 1999 08:49:27 -0600 From: James McCartney <---@---.---> Subject: Re: bug . . . or mug At 2:20 AM -0600 6/14/99, Iannis Zannos wrote: >Jem and Martin, > >thanks for spotting and correcting the compatibility >problems with GUIUtils and SC 2.1.4 ff. Meanwhile, I've fixed the ControlIn compatibility problem. >BTW: SC 2.1.4 ff now contains some features similar to >GUIUtils. - which can inspire extensions or improvements >on both parts: Extending the new SC 2.1.4 library and >GUI features in GUIUtils direction, and improving >the implementation style of GUIUtils a-la SC 2.1.4 ff style. Yes I realize this. I wanted to provide a simpler framework to use with the lib menu, however I have not worked out everything yet. One idea was to have a central repository of parameter specifications and have the UI built from these rather than have to specify the UI for each instrument. Just by using the appropriate argument names you get the proper controls. I would later provide a means to override the default UI generation with a specific one. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 14 Jun 1999 17:37:03 +0200 From: "Iannis Zannos" <---@---.---> Subject: Re: bug . . . or mug >From: James McCartney <---@---.---> >To: sc-users@lists.io.com >Subject: Re: bug ... or mug >Date: Mon, 14 Jun 1999 4:49 PM > >>BTW: SC 2.1.4 ff now contains some features similar to >>GUIUtils. - which can inspire extensions or improvements >>on both parts: Extending the new SC 2.1.4 library and >>GUI features in GUIUtils direction, and improving >>the implementation style of GUIUtils a-la SC 2.1.4 ff style. > >Yes I realize this. I wanted to provide a simpler framework to use >with the lib menu, however I have not worked out everything yet. >One idea was to have a central repository of parameter specifications >and have the UI built from these rather than have to specify the >UI for each instrument. Just by using the appropriate argument names >you get the proper controls. I would later provide a means to override >the default UI generation with a specific one. Dear Implementor, no problem at all. Your solutions are as far as I could glance clearer and more elegant - taking the issues one at a time. Since you provide the feature of: >Just by using the appropriate argument names >you get the proper controls. SoundModel of GUIUtils will eventually become obsolete. Point is: I tried using your code for producing controls from arg names, but could not do it within my brief span of attention. Could you provide examples? Only one basic feature I believe is still missing: patch cords for connecting buttons that represent sound generating or other objects. Possible? Yours faithfully, IZ ------------------------------ Date: Mon, 14 Jun 1999 21:52:39 +0200 From: andreas pieper <---@---.---> Subject: Re: bug . . . or mug hi, I just wandered: Are there any additional gui widgets planned? I am missing some sort of pop-up menu: in the case of many dynamically generated user-choices radio groups are sub-ideal because they do need too much screen space. An interface to quickdraw routines like in sc 1 would be nice too ( a proper object--oriented abstraction would be even nicer :) bst, a andreas pieper ------------------------------ Date: Tue, 15 Jun 1999 13:36:15 +0200 From: "Iannis Zannos" <---@---.---> Subject: List of SC-relevant email-lists ? >From: Martin Robinson <---@---.---> >To: sc-users@lists.io.com >PS [OT] I've been enjoying the discussions on the Music-DSP group (some I wonder which other mailing lists could be recommended to SC users? - - MAX-MSP lists (several) - - Computer Music / Electronic Music / ... ? - - Music-DSP? Is there a list of the addresses of these lists somewhere? Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 ------------------------------ Date: Tue, 15 Jun 1999 13:37:30 -0600 From: James McCartney <---@---.---> Subject: Mucchio Selvaggio ? Anyone know about an italian music magazine called "Mucchio Selvaggio" ? Someone who claims to write for them wants a free copy. (I get a few emails a month from folks who claim that they could do all sorts of great things for me if they can only get a free beta copy..) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 15 Jun 1999 23:21:14 +0100 From: Arie van Schutterhoef <---@---.---> Subject: Re: Mucchio Selvaggio?????.... >Anyone know about an italian music magazine called >"Mucchio Selvaggio" ? - -Altavista was generous enough to cough up the following: http://www.erim.com/diniego/mucchio01.htm http://www.rockit.it/mucchio/ >Someone (......) wants a free copy. - -Don't we all... Greetings Arie van Schuttrerhoef <<<<<<<<<<<<<<<<<<<<<<<<<-////||\\\\->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Arie van Schutterhoef artistic director Schreck Ensemble # -laboratory for live electro-acoustic music- # The Netherlands e-mail:arsche@stad.dsl.nl http://www.xs4all.nl/~schreck/ Tel: 00-31-71-5612287 Fax: 00-31-70-3859268 <<<<<<<<<<<<<<<<<<<<<<<<<-////||\\\\->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------ Date: Tue, 15 Jun 1999 18:45:53 -0400 From: johndu@world.std.com (John Duesenberry) Subject: Re: List of SC-relevant email-lists ? One rekevant list would be Tom Erbe's freesound@shoko.calarts.edu, formerly the SoundHack list. Unfortunately this list is frequently polluted by the ravings of antiorp, but still worth reading. >I wonder which other mailing lists could be recommended to >SC users? > >- MAX-MSP lists (several) >- Computer Music / Electronic Music / ... ? >- Music-DSP? > >Is there a list of the addresses of these lists somewhere? > > ------------------------------ Date: Wed, 16 Jun 1999 10:05:43 +0200 From: Martino Traversa <---@---.---> Subject: Re: Mucchio Selvaggio ? In 13.37 15/06/99 -0600, hai scritto: > >Anyone know about an italian music magazine called >"Mucchio Selvaggio" ? >Someone who claims to write for them wants a free copy. > >(I get a few emails a month from folks who claim that they could >do all sorts of great things for me if they can only get a free >beta copy..) I don't think so. It's a rock magazine; in any case, they are not involved in computer-music, contemporary music, modern music, research in electroacoustic fields... Moreover, I would have trusted them if their magazine had been dedicated to "Pousser, Varèse, Hilbert, Riemann..." or more simply called "f(x)", instead of the "The Wild Bunch". Regards, Martino COOL-FIRE: la soluzione Firewall per Windows NT http://www.symbolic.it/Prodotti/cool-fire.html SYMBOLIC Tel: +39 0521 776180 / Fax: +39 0521 776190 ------------------------------ Date: Wed, 16 Jun 1999 20:28:41 -0700 From: M Stevens <---@---.---> Subject: get value from array @ index? How does one go about assigning argument values from array items? What I'm specifically trying to do is generate SliderView objects with loop iterations while pulling particular arguments from an array. The problem is that something like this; n = 8; n.do( { arg i; SliderView.new( z, Rect.new( 30 * i + 5, 10, 30 * i + 20, 150), nil, 0.5, 0, 1 ); } ); assigns all sliders the same initial, min, and max values. What I'd like to do is have these values stored in arrays; [ ["slider1", 0.5, 0, 1], ["slider2", 0, 0, 100], ["slider3", 50, 200, 1000] ] and simply iterate through the arrays to create the sliders. This seems so basic that I'm kinda troubled I can't figure it out from the docs. + M Stevens + M@solipsist.org + mstevens@slip.net + www.solipsist.org + ------------------------------ Date: Thu, 17 Jun 1999 00:24:19 -0600 From: James McCartney <---@---.---> Subject: Re: get value from array @ index? At 9:28 PM -0600 6/16/99, M Stevens wrote: >How does one go about assigning argument values from array items? What I'm >specifically trying to do is generate SliderView objects with loop >iterations while pulling particular arguments from an array. The problem is >that something like this; > >n = 8; >n.do( { arg i; SliderView.new( z, Rect.new( 30 * i + 5, 10, 30 * i + 20, >150), nil, 0.5, 0, 1 ); } ); > >assigns all sliders the same initial, min, and max values. What I'd like to >do is have these values stored in arrays; > >[ ["slider1", 0.5, 0, 1], ["slider2", 0, 0, 100], ["slider3", 50, 200, 1000] ] > >and simply iterate through the arrays to create the sliders. This seems so >basic that I'm kinda troubled I can't figure it out from the docs. var w, s; w = GUIWindow.new("panel", Rect.newBy( 128, 64, 400, 400 )); s = [ ["slider1", 0.5, 0, 1], ["slider2", 0, 0, 100], ["slider3", 50, 200, 1000] ]; s.do({ arg item, i; SliderView.new( w, Rect.new( 30 * i + 8, 10, 30 * i + 20, 150), nil, item.at(1), item.at(2), item.at(3) ); }); --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Fri, 18 Jun 1999 17:48:34 +0100 From: Martin Robinson <---@---.---> Subject: MIDI notes Is there a way to receive Note on and Note off velocities in SC (e.g. to control attack time AND release time of an envelope). I was snooping around in the MIDIOut Class Def. and saw different methods for note on (status byte 9n) and note off (status byte 8n) and wondered if this was implemented for MIDI input. (Is MIDIOut working? I tried sending MIDI using this: ( var n; n = 4; n.do({ arg item, i; var w, trig, mOut; w = GUIWindow.new("Port "++i.asString, Rect.newBy( 295+(i*10), 99+(i*10), 264, 145 )); mOut = MIDIOut.new(i); trig = CheckBoxView.new( w, Rect.newBy( 52, 39, 171, 53 ), "K60 rand velocity", 0, 0, 1, 0, 'linear') .action_({ if(trig.value==1, { //"on".postln; mOut.noteOn(1, 60, 100.rand+1) }, { //"off".postln; mOut.noteOff(1, 60, 0) } ) }); }); ) but the incorrect values seem to be sent. Am I jumping the gun?) >>>>>>Martin Robinson :: (Ex)tractor :: && ________ >>><<<_sonicArts.at(middlesexUniversity.london.uk); ______ <><><>__this.liveElectronics.interFaces.diffusion ____ >>><<<___tractor.at(jacksonsLane.london.N6).june(17_18_19)_99 __ || ------------------------------ Date: Fri, 18 Jun 1999 11:01:28 -0700 From: M Stevens <---@---.---> Subject: Re: get value from array @ index? At 12:24 AM -0600 6/17/99, James McCartney wrote: >s = [ > ["slider1", 0.5, 0, 1], > ["slider2", 0, 0, 100], > ["slider3", 50, 200, 1000] >]; Thanks. Is SC similar enough to Smalltalk that I could have gotten this directly from a Smalltalk book? + M Stevens + M@solipsist.org + www.solipsist.org + ------------------------------ Date: Mon, 21 Jun 1999 12:34:51 +0200 From: "Iannis Zannos" <---@---.---> Subject: Problems with Digidesign d24 card. Hello James, SC 2.1.5 would not work with our d24 Protools hardware. After switching to digidesign, it produces an error message, and shows a strange behavior like not being able to save files, and finally crashing. I tried both with DAE started and off, and with d24 selected as output device in the Sound control panel. The error message is attached below. Do I need to install a specific driver for digi? Any other things I should do to solve this? Thank you. Best, Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 Prefs : hardware = apple sampleRate = 44100 clockSource = 0 bufMultiple = 1 useSoundInput = 1 defaultBlockSize = 64 OMS Port ioRefNums: 'ƒ IAC Bus #1' index: 0 refnum: 0 uniqueid: 19091 'ƒ IAC Bus #1' index: 1 refnum: 104 uniqueid: 27283 OMS init input and output buffers not the same size?? 512 1024 set to: 512 512 compiling class library.. ... compile stuff snipped ... ... compile done o ERROR: SndGetInfo siHardwareFormat error: -50 o ERROR: SndGetInfo siHardwareFormat error: -50 IODriverAcquireDevice: Device Not Available (-6011) o ERROR: digi sound driver could not be opened. using Apple Sound Mgr input and output buffers not the same size?? 512 1024 set to: 512 512 ------------------------------ Date: Mon, 21 Jun 1999 11:57:19 -0400 (EDT) From: rkuivila@mail.wesleyan.edu Subject: Re: MIDI notes > >(Is MIDIOut working? I tried sending MIDI using this: This is probably not news to anybody, but MIDIOut appears broken. The basic symptoms are: 1. the command byte of 3 byte commands gets send correctly, the data that appears has no discernible relation to the data sent. 2. 2 byte commands generate an error message. RJK ------------------------------ Date: Mon, 21 Jun 1999 11:01:16 -0700 From: Mark Polishook <---@---.---> Subject: Routine James, In your example from the Routine help file, I not clear as to what the "inval = 1.yield" and "linesinval = 2.yield", etc. lines do. I've removed them from the example and can plainly see that they're needed.... (I would have thought that 1.yield was enough and am not sure why 1.yield must be assigned to inval, etc.) Could you clarify? Thanks in advance ( var r, outval; r = Routine.new({ arg inval; ("->inval was " ++ inval).postln; inval = 1.yield; ("->inval was " ++ inval).postln; inval = 2.yield; ("->inval was " ++ inval).postln; inval = 99.yield; }); outval = r.next('a'); ("<-outval was " ++ outval).postln; outval = r.next('b'); ("<-outval was " ++ outval).postln; r.reset; "reset".postln; outval = r.next('c'); ("<-outval was " ++ outval).postln; outval = r.next('d'); ("<-outval was " ++ outval).postln; outval = r.next('e'); ("<-outval was " ++ outval).postln; outval = r.next('f'); ("<-outval was " ++ outval).postln; ) ------------------------------ Date: Tue, 22 Jun 1999 01:20:43 -0600 From: James McCartney <---@---.---> Subject: Re: get value from array @ index? At 12:01 PM -0600 6/18/99, M Stevens wrote: >Thanks. Is SC similar enough to Smalltalk that I could have gotten this >directly from a Smalltalk book? not exactly. The syntax for creating arrays dynamically is not standardized in various smalltalks. However, the Collection methods 'do' and 'at' should be well discussed in any smalltalk book. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 22 Jun 1999 01:21:43 -0600 From: James McCartney <---@---.---> Subject: Re: MIDI notes >>(Is MIDIOut working? I tried sending MIDI using this: The MIDIOut class is not working which is why it was not announced and is not documented. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 22 Jun 1999 01:36:44 -0600 From: James McCartney <---@---.---> Subject: Re: Routine At 12:01 PM -0600 6/21/99, Mark Polishook wrote: >James, > >In your example from the Routine help file, I not clear as to what the >"inval = 1.yield" and "linesinval = 2.yield", etc. lines do. I've >removed them from the example and can plainly see that they're >needed.... (I would have thought that 1.yield was enough and am not sure >why 1.yield must be assigned to inval, etc.) > >Could you clarify? inval = 1.yield; When you call 1.yield the Routine suspends its execution at that point and returns 1. Notice that in the lines that call the Routine, for example: outval = r.next('b'); that the 'next' method is passed an argument, in this case the Symbol 'b'. When the suspended Routine is called again and resumed from where it it was suspended, the result of the 'yield' method call is the argument passed to 'next'. That value then gets assigned to inval and execution continues until there is another yield, or the Routine returns (yielding nil). This can be tricky to understand at first because most languages including C,C++,Pascal,and even Smalltalk, have nothing similar to this kind of control flow. Scheme and Sather do have coroutines. So you should take some time to figure this out if it seems confusing at first because Routines can be very powerful. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 22 Jun 1999 14:20:05 +0800 From: Mark Ballora <---@---.---> Subject: GUIUtils mixed results I'm having inconsistent results with the GUIUtils, which I'm using with de Campo's tutorial. Sometimes they work fine. Other times, they cause a crash. Most times, I get the following: Bad input rate obj INPUT: Instance of ControlIn ''{ (02D0AFAC, gc=00, fmt=00, flg=00, set=05) instance variables [6] synth : instance of Synth (02CF6104, size=0, set=06) inputs : Float 0.1 3FB99999 9999999A rate : Symbol 'control' state : Integer 0 source : instance of Function (02D00DFC, size=0, set=01) prevSource : nil } * ERROR: input 1 to Pause is not a UGen, Float, or Integer. I'm unable to get predictable results. The same operation (the GUIUtils demo or the string patch using ParameterWindow (in 7.4 of the tutorial) can produce any of these three above. has anyone else encountered this, or is it some anomaly on my G3/266 OS 8.1? Mark Ballora ------------------------------ Date: Tue, 22 Jun 1999 08:47:09 +0200 From: "Iannis Zannos" <---@---.---> Subject: Extensions (fixes) to Instrument.edit GUI making. > THIS MESSAGE IS IN MIME FORMAT. Since your mail reader does not understand this format, some or all of this message may not be legible. - --MS_Mac_OE_3012886029_73301_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Following code extensions / fixes make MixerPlayer, MixerView and Instrument work to permit the editing of instruments. Code is attached as ascii and as stuffed file. Test example: ( Instrument(\test, { arg synth, freq, amp; FSinOsc.ar(freq, amp) }).play; ) BTW: String.sc file still has the primCat bug primCat should be replaced by prCat in method + as follows: + { arg anObject; ^this prCat: " " prCat: anObject.asString; } Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 Instrument { var <>func, <>name; *new { arg name, func; ^super.new.func_(func).name_(name) } *play { arg name, func, volume = 0.2; this.new(name, func).play(volume); } play { arg volume = 0.2; MixerPlayer.play(MixerVoice.new(this), volume); } // act like a UGen ar { arg ... inputs; ^func.valueArray(inputs); } // Library support *libPut { arg names, func; var instr; instr = this.new(names.last, func); Library.put(names, instr); ^instr } libMenuAction { arg names; this.play; } // OrcScore support spawn { arg spawn, eventCount, synth, inputs; ^{ arg synth, deltaTime, instrumentNum ... inputs; // strip off deltaTime and instrumentNum func.valueArray(inputs) }.valueArray(synth, inputs); } } MixerPlayer { classvar tspawn, <>mixer, inputs, <>numChannels = 2, <>numInputs = 12, env; classvar recBtn, recFile, recID=0; *reset { // in case of an error you may need to reset the MixerPlayer tspawn = nil; mixer = nil; inputs = nil; env = nil; recBtn = nil; recFile = nil; } *play { arg voice, volume = 0.2; var input; this.makeMixer; input = this.findFreeInput; if (input.isNil, {^this}); this.initInput(input, voice, voice.instrument.name, volume); if (tspawn.isNil, { this.prepareRecord; Synth.play(this.playFunc(input)); this.synthDone; },{ tspawn.trigger(input); }); } // PRIVATE *initInput { arg input, voice, name, volume; input.voice = voice; input.name = name.asString; input.nameView.label = input.name; if (voice.canMakeEditWindow, { input.editBtn.label = "Edit"; }); input.volumeSlider.value = volume; input.killBox.value = 1; input.killBox.action = { if (input.killBox.value == 0, { if ( tspawn.notNil and: { input.synth.notNil }, { input.synth.release; }); input.voice.close; input.voice = nil; input.name = nil; input.synth = nil; input.volumeSlider.value = 0.0005; input.killBox.action = nil; input.copyBtn.action = nil; input.editBtn.action = nil; input.nameView.label = "-"; input.editBtn.label = "_"; }); }; input.copyBtn.action = { this.play(input.voice.copy, input.volumeSlider.value); }; input.editBtn.action = { input.voice.makeEditWindow; }; } *playFunc { arg input; ^{ arg synth; var outs; outs = TSpawn.ar({ arg argTSpawn, i, tsynth, argInput; argInput.synth = tsynth; Pause.ar({ argInput.voice.play(synth); }, argInput.volumeSlider.kr - 0.001) * EnvGen.kr(env); }, numChannels); tspawn = outs.source; synth.sched(0, { tspawn.trigger(input) }); if (recFile.notNil, { // record to disk Pause.ar({ DiskOut.ar(recFile, 32768, outs); }, recBtn.kr); }); outs } } *synthDone { if (recFile.notNil, { recFile.endRecord; recID = recID + 1; }); recBtn.value = 0; tspawn = nil; inputs.do({ arg anInput; anInput.killBox.value_(0).doAction; }); } *makeMixer { if (mixer.notNil, { //mixer.toFront; ^mixer }); // make cutoff envelope env = Env.new(#[1,1,0],[1,0.01],'linear',1); mixer = GUIWindow.new("Mixer", Rect.newBy( 80, 80, 550, 80 + (24 * numInputs)) ); recBtn = CheckBoxView.new( mixer, Rect.newBy( 10, 4, 100, 20 ), "Record", 0, 0, 1, 0, 'linear'); inputs = Array.new(numInputs); numInputs.do({ arg i; var vol, box, copybtn, editbtn, str, top; top = 24 * i + 30; vol = SliderView.new( mixer, Rect.newBy( 10, top, 128, 20 ), "SliderView", 0.0, 0.0005, 1, 0, 'exponential'); box = CheckBoxView.new( mixer, Rect.newBy( 142, top, 20, 20 ), "", 0, 0, 1, 0, 'linear'); copybtn = ButtonView.new( mixer, Rect.newBy( 168, top, 40, 20 ), "Copy", 0, 0, 1, 0, 'linear'); editbtn = ButtonView.new( mixer, Rect.newBy( 212, top, 40, 20 ), "_", 0, 0, 1, 0, 'linear'); str = StringView.new( mixer, Rect.newBy( 264, top, 128, 20 ), "-"); inputs.add( MixerInputSpec.new(i, nil, nil, nil, vol, box, copybtn, editbtn, str) ); }); mixer.onClose = { inputs.do({ arg anInput; anInput.killBox.value_(0).doAction; }); mixer = nil; }; ^mixer; } *findFreeInput { ^inputs.detect({ arg anInput; anInput.voice.isNil }); } *prepareRecord { var filename; if (thisProcess.isDemo.not, { // make record file recFile = SoundFile.new; recFile.numChannels = numChannels; recFile.headerFormat = 'AIFF'; recFile.sampleFormat = '16 big endian signed'; filename = ":Sounds:MixerOut_" ++ (recID%10); if (recFile.writeHeader(filename), { recFile.prepareRecord; },{ ("write record file header failed : " ++ filename).postln; recFile = nil; }); }); } } MixerVoice { var <>instrument, <>editWindow, <>specs, <>plugs; *new { arg instrument; ^super.new.instrument_(instrument).makeSpecs; } copy { ^this.class.new(instrument) } canMakeEditWindow { ^instrument.func.def.argNames.size >= 2 } makeSpecs { specs = ParamSpec.makeSpecs(instrument.func) } makeEditWindow { if (editWindow.notNil, { ^editWindow }); if (specs.size < 1, { ^nil }); editWindow = GUIWindow.new(instrument.name.asString, Rect.newBy( 80, 80, 550, 60 + (24 * specs.size)) ); editWindow.onClose = { editWindow = nil; }; this.getPlugs; specs.do({ arg spec, i; var top, val, numer, slider, plug; top = 24 * i + 6; StringView.new( editWindow, Rect.newBy( 10, top, 100, 20 ), spec.name.asString ); plug = plugs@i; val = plug.source.value; slider = SliderView.new( editWindow, Rect.newBy( 114, top, 128, 20 ), nil, val, spec.minval, spec.maxval, spec.step, spec.warp ); numer = NumericalView.new( editWindow, Rect.newBy( 246, top, 60, 20 ), nil, val, spec.minval, spec.maxval, spec.step, spec.warp ); slider.action = { numer.value = slider.value }; numer.action = { slider.value = numer.value }; plug.source = numer; }); } close { if (editWindow.notNil, { editWindow.close; }); } play { arg synth; ^instrument.func.valueArray([synth].addAll(this.getPlugs)) } getPlugs { if (plugs.isNil, { plugs = specs.collect({ arg spec; spec.plug }) }); ^plugs; } } MixerInputSpec { var <>index, <>voice, <>name, <>synth, <>volumeSlider, <>killBox, <>copyBtn, <>editBtn, <>nameView; *new { arg index, voice, name, synth, volumeSlider, killBox, copyBtn, editBtn, nameView; ^super.new.init(index, voice, name, synth, volumeSlider, killBox, copyBtn, editBtn, nameView) } init { arg argIndex, argMixerVoice, argName, argSynth, argVolumeSlider, argKillBox, argCopyBtn, argEditBtn, argNameView; index = argIndex; voice = argMixerVoice; name = argName; synth = argSynth; volumeSlider = argVolumeSlider; killBox = argKillBox; copyBtn = argCopyBtn; editBtn = argEditBtn; nameView = argNameView; } } ParamSpec { classvar <>specs; var <>defval, <>minval, <>maxval, <>step, <>warp, <>name; *new { arg defval=0.0, minval=0.0, maxval=1.0, step=0.0, warp='linear', name="par"; ^super.new.defval_(defval).minval_(minval).maxval_(maxval).step_(step).warp_(warp).name_(name); } *default { specs = Environment.new; // set up some default param specs // you can add your own after the fact. specs.use({ // 'this' instead of ParamSpec to permit subclassing??? // ~freq = this.new(400, 20,20000,0,\exponential,400); ~freq = ParamSpec(400, 20,20000,0,\exponential,400); ~ffreq = ParamSpec(400, 20,20000,0,\exponential,400); // filter freq ~bw = ParamSpec(400, 20,20000,0,\exponential,400); ~amp = ParamSpec(0.2, 0.0001, 1.0, 0.0, \exponential, 0.2); ~pan = ParamSpec(0, -1, 1); ~velocity = ParamSpec(64, 0, 127); ~detune = ParamSpec(0, -20,20); ~beats = ParamSpec(0, 0,20); ~rate = ParamSpec(1, 0.125, 8 ,0, \exponential); // sample playback rate ~vibRate = ParamSpec(0, 0, 20); // vibrato LFO ~vibDepth = ParamSpec(0, 0, 1); ~tremRate = ParamSpec(0, 0, 20); // tremolo LFO ~tremDepth = ParamSpec(0, 0, 1); ~panRate = ParamSpec(0, 0, 20); ~panDepth = ParamSpec(0, 0, 1); ~delay = ParamSpec(0.2, 0.0001, 1, 0, \exponential); }); } *makeSpecs { arg func; var def, defargs, defvals, newspecs; def = func.def; defargs = def.argNames; defvals = def.prototypeFrame; if (defargs.size < 2, { ^#[] }); newspecs = Array.new(defargs.size-1); for (1, defargs.size-1, { arg i; var argName, defaults, spec, val; argName = defargs.at(i); defaults = defvals.at(i); spec = specs.atFail(argName, { this.new }); spec.name_(argName); spec = spec.mergeParameters(defaults); newspecs.add(spec); }); ^newspecs; } mergeParameters { arg pars; var newSpec; if ( pars.isNil, { ^this }); newSpec = this.copy; pars.asArray.do({ arg newval, i; newSpec.instVarPut(i, newval) }); ^newSpec; } *makePlugs { arg func; ^this.makeSpecs.collect( { arg spec; spec.plug }); } plug { ^Plug.kr(defval) } } /* mergeParameters___ { arg pars; var allPars; pars.postln; if ( pars.isNil, { ^this }); [defval, minval, maxval, step, warp, name].postln; allPars = [defval, minval, maxval, step, warp, name]; pars.asArray.do({ arg newval, i; allPars.put(i, newval) }); #defval, minval, maxval, step, warp, name = allPars; [defval, minval, maxval, step, warp, name].postln; } */ - --MS_Mac_OE_3012886029_73301_MIME_Part Content-type: application/mac-binhex40; name="MixerPlayer.sc.sit" (This file must be converted with BinHex 4.0) :%NeTH'9b8'aKH@9b,R0M,R0TG!"6594%8dP8)3#3"!h`!*!%Llp6593K!!%!!!h `FNaKG3)!N!3@!!!0$3j0DAKPFP"XBAPPFLjcBdJ!2kPD!*!$J!#3"!KZMl-F,J# 3'[q3"&4&@&463fTY!!#c6l(bXj+MH!!!!L`!!#5%!!!"$3!!$&dJe#r`!*!'DHi 4!!JFr,T$%!0$-Hq2L4"ND+C@HSNJ'945NBNPardScZq2$+%LN!"1KP,Kbd`jB6! A!hfCP04Ml9[lSQ%*1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fB!`@Zq+3 KZa*6640U*`Q$RC`9HC9Ajc1c"rUD'Ym#F#dP+%9,HHh&bp"51Ji@pcR0fKZLN`P ZT-PEPU1%ChQ[ic1f66LJ@IT%d-AR3"5ZDB03aeJd#J%4SeXU`m4`28`iI,qLUcd dk"d2pih2,jCEAQG6Qpeb"50'qA4X@25iT5K+*Tl`fiMMa-&h*[3LF`,`d-ZAib! Uj58B+`dN2&BXL3-Eb50FJmbcS8$LeYbbCcHj@%D"RU(c4Pf+9(eMLffFXj-Y"j% VqqHk`"mJm#%-,l#P%c0RHC!!'%[QCDZYTAP*NHqpcEGDrVm*9V8@+QBSJ4p"+'' LNdLE[@N@2qfEekr%-K`1hqP&TbP@X-#%qA!Gm8NrkSAV)e`Ei@Y3EL+NKb"hH&Q $XRLKZ[qXTldrUG)#irq1Z*,MYApKTAV'+Z,r+EjSAlrCE[m2!*!$Bm`!!-: - --MS_Mac_OE_3012886029_73301_MIME_Part-- ------------------------------ Date: Tue, 22 Jun 1999 09:44:11 +0100 From: Martin Robinson <---@---.---> Subject: Re: MIDI notes >This is probably not news to anybody, but MIDIOut appears broken. ... > >>>(Is MIDIOut working? I tried sending MIDI using this: > > The MIDIOut class is not working which is why it was not announced and > is not documented. > ... This I'd partly assumed (which was why it was parenthesised (I suppose)) ;-) This question slightly overpowered my real question: >Is there a way to receive Note on and Note off velocities in SC (e.g. to >control attack time AND release time of an envelope). After hitting send I had a sudden attack of paranoia that I'd asked this before. In a cold sweat one morning I remembered that I had, but that was in SC1. >>>>>>Martin Robinson :: (Ex)tractor :: && ________ >>><<<_sonicArts.at(middlesexUniversity.london.uk); ______ <><><>__this.liveElectronics.interFaces.diffusion ____ || ------------------------------ Date: Tue, 22 Jun 1999 11:30:58 -0700 From: Mark Polishook <---@---.---> Subject: Re: Routine James, thanks for the explanation...but I'm still missing something. > inval = 1.yield; > > When you call 1.yield the Routine suspends its execution > at that point and returns 1. ...but why is assignment here made to inval? - what, exactly, does this accomplish? Shouldn't the example in the help file run just as well (but, of course, it doesn't) WITHOUT the assignment to inval? Thanks, Mark ------------------------------ Date: Tue, 22 Jun 1999 14:30:23 -0600 From: James McCartney <---@---.---> Subject: Re: Routine At 12:30 PM -0600 6/22/99, Mark Polishook wrote: >James, thanks for the explanation...but I'm still missing something. > >> inval = 1.yield; >> >> When you call 1.yield the Routine suspends its execution >> at that point and returns 1. > >...but why is assignment here made to inval? - what, exactly, does this >accomplish? Keep reading. I explained it. Read it again if necessary. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! >When the suspended Routine is called again and resumed from where it >it was suspended, the result of the 'yield' method call is the argument >passed to 'next'. >That value then gets assigned to inval and execution continues until >there is another yield, or the Routine returns (yielding nil). !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 22 Jun 1999 15:39:56 -0400 From: "crucial" <---@---.---> Subject: FilterPatterns James- In its simplest form : Pset( \degree,3, Pbind(\tempo,9, \degree,Pseq(Array.fill(12,{24.rand - 20}),inf)) ).play(Event.protoEvent,1) I was thinking that filter patterns would 'write' into the events being passed up. They write over the initial definitions in the Event, but not over anything defined by for instance a Pbind. Or am I going the wrong way down the chain ? The proto event is passed down the chain (pset to pbind) as the objects are intialised. Then the event stream emits from there back up ? I suppose this is why you use mtranspose etc. ? Also, is it just me or is 2.15 kind of unstable ? I haven't had any problems with other software, but 2.15 is very crashy. When using Instruments and Orchestras, it seemed to lock up a lot, but I'm not sure why that would be. (they are just IdentityDictionaries) Even just playing examples from the docs. I stopped using Instruments last night and worked for many hours without crashing. __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Tue, 22 Jun 1999 12:25:20 -0700 From: Mark Polishook <---@---.---> Subject: Re: Routine James, restating my question more clearly... > inval = 1.yield; > > When you call 1.yield the Routine suspends its execution > at that point and returns 1. ...but why is assignment here made to inval? - In other words, I'm not seeing why the example doesn't run as 1.yield instead of the way it DOES run... inval = 1.yield Thanks, Mark > At 12:01 PM -0600 6/21/99, Mark Polishook wrote: > >James, > > > >In your example from the Routine help file, I not clear as to what > the > >"inval = 1.yield" and "linesinval = 2.yield", etc. lines do. I've > >removed them from the example and can plainly see that they're > >needed.... (I would have thought that 1.yield was enough and am not > sure > >why 1.yield must be assigned to inval, etc.) > > > >Could you clarify? > > inval = 1.yield; > > When you call 1.yield the Routine suspends its execution > at that point and returns 1. > > Notice that in the lines that call the Routine, for example: > > outval = r.next('b'); > > that the 'next' method is passed an argument, in this case the Symbol > 'b'. > > When the suspended Routine is called again and resumed from where it > it was suspended, the result of the 'yield' method call is the > argument > passed to 'next'. > That value then gets assigned to inval and execution continues until > there is another yield, or the Routine returns (yielding nil). > > This can be tricky to understand at first because most languages > including > C,C++,Pascal,and even Smalltalk, have nothing similar to this kind of > control flow. Scheme and Sather do have coroutines. > So you should take some time to figure this out if it seems confusing > at first because Routines can be very powerful. > > --- james mccartney james@audiosynth.com > http://www.audiosynth.com > If you have a PowerMac check out SuperCollider2, a real time synth > program: > - -- * * * * * * * * Mark Polishook Assistant Professor of Composition Music Department Central Washington University Ellensburg, WA 98926 tel.: 509-963-1245 fax: 509-963-1239 e-mail: polishoo@cwu.edu http://www.cwu.edu/~music/composition ------------------------------ End of sc-users-digest V1 #45 *****************************