From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #63 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, September 26 1999 Volume 01 : Number 063 ---------------------------------------------------------------------- Date: Sun, 19 Sep 1999 22:57:04 +0100 From: rkuivila@mail.wesleyan.edu Subject: Voicer problem, general question Hi James, Voicer seems to get unhappy when key downs and key ups are too close together. This problem seems to go away if you give a voicer a series of polite key down/up combinations (as many as channels allocated to the voicer)... Why don't you provide a single global synth that is guaranteed to be running as long as synthesis is active for scheduling purposes? (This is what SoundManager did.) This seems clearer conceptually to me. For example, I often think in terms of a Routine that runs in along in time spawning sounds as needed. (In fact the routine may just schedule MIDI output, like MAX ;) To do this in the current environment seems to require cooking up a pseudo-sound when all you really want is a Synth at the root level that is guaranteed to be there. RJK ------------------------------ Date: Mon, 20 Sep 1999 16:17:00 -0600 From: James McCartney <---@---.---> Subject: Re: Voicer problem, general question At 3:57 PM -0600 9/19/99, rkuivila@mail.wesleyan.edu wrote: > Why don't you provide a single global synth that is guaranteed to be >running as long as synthesis is active for scheduling purposes? (This is >what SoundManager did.) Because then it would be taking up resources all the time and, since you can add that functionality if you need it in the same way that GUIUtils did, the capability is there if you want it. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 20 Sep 1999 16:22:43 -0600 From: James McCartney <---@---.---> Subject: Re: Voicer problem, general question At 3:57 PM -0600 9/19/99, rkuivila@mail.wesleyan.edu wrote: > Why don't you provide a single global synth that is guaranteed to be >running as long as synthesis is active for scheduling purposes? (This is >what SoundManager did.) This seems clearer conceptually to me. For >example, I often think in terms of a Routine that runs in along in time >spawning sounds as needed. (In fact the routine may just schedule MIDI >output, like MAX ;) To do this in the current environment seems to require >cooking up a pseudo-sound when all you really want is a Synth at the root >level that is guaranteed to be there. OK after thinking a bit, I think I know what you mean.. There are some technical problems with that involved in running the compiler while the synth engine is running. It could cause an interrupt overrun and sound cards tend to behave badly in this situation. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 20 Sep 1999 14:47:00 -0600 From: "David Cottle" <---@---.---> Subject: Re: Event trigger Hi, I guess I don't understand the instrument well enough. I'll study it more. This works: out = CombL.ar(LFNoise2.ar(3000, Decay2.ar( Impulse.kr(0), // 0.015, 0.04, 0.006) ), // used as a string resonator delayTime, // max delay time delayTime, // actual delay time 6); // decay time of string out*EnvGen.kr( Env(#[1,1,0],[1, 0.01],\linear,1) ) But I thought the "6" is the decay time. Anyway, I'll work on this for a while. ------------------------------ Date: Mon, 20 Sep 1999 17:28:52 -0600 From: James McCartney <---@---.---> Subject: Re: Event trigger At 2:47 PM -0600 9/20/99, David Cottle wrote: >But I thought the "6" is the decay time. Anyway, I'll work on this for a >while. CombL is an infinite impulse response filter, thus it has no duration. Only EnvGen, Line and XLine can give an event a finite duration. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Tue, 21 Sep 1999 10:57:30 -0700 From: Mark Polishook <---@---.---> Subject: iMac? Does anyone have experience with SC on an iMac? I'm assuming that it runs fine....am I correct? Could someone on the list, (James, or or anyone else), verify this. TIA, Mark ------------------------------ Date: Tue, 21 Sep 1999 14:09:41 -0400 From: Scott Wilson <---@---.---> Subject: Re: iMac? Rob Powers, a student here at Wesleyan was using one last year, and as far as I know had no problems. Ron, do you know differently? Scott At 10:57 AM 21/09/99 -0700, you wrote: >Does anyone have experience with SC on an iMac? I'm assuming that it >runs fine....am I correct? > >Could someone on the list, (James, or or anyone else), verify this. > >TIA, > >Mark > > ------------------------------ Date: Tue, 21 Sep 1999 13:27:07 -0600 From: "David Cottle" <---@---.---> Subject: Re: iMac? Hi, > Does anyone have experience with SC on an iMac? I'm assuming that it > runs fine....am I correct? We have a lab with 15 iMacs and I used SC for the Electronic Music course last semester and the computer music course this year. They lock up occasionally, but I suspect that has more to do with our lab management software than SC. Otherwise they run fine. ------------------------------ Date: Tue, 21 Sep 1999 13:13:29 -0700 From: Mark Polishook <---@---.---> Subject: Re: iMac? Many thanks for the answers to my iMac question. And belated thanks to James for the clarification last week about Pbindf and Psetf. - -mp > Hi, > > > Does anyone have experience with SC on an iMac? I'm assuming that it > > > runs fine....am I correct? > > We have a lab with 15 iMacs and I used SC for the Electronic Music > course > last semester and the computer music course this year. They lock up > occasionally, but I suspect that has more to do with our lab > management > software than SC. Otherwise they run fine. - -- * * * * * * * * 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 ------------------------------ Date: Tue, 21 Sep 1999 13:34:44 -0700 From: Scot Gresham-Lancaster <---@---.---> Subject: Re: iMac? I have been using an iMac with SC 2.x all summer and also experience this 20 sec. or so lockup, a patch will continue to play and the mouse will move, but no mouse or key events work, they remain buffered and then they execute when it wakes up in a bit. I suspect it is associated with the kludgey USB driver. I am using the MidiMan MIDIsport which didn't even work until OS 8.6.1 because the Apple USB drivers were not standard. Hope that helps. David Cottle wrote: > > Hi, > > > Does anyone have experience with SC on an iMac? I'm assuming that it > > runs fine....am I correct? > > We have a lab with 15 iMacs and I used SC for the Electronic Music course > last semester and the computer music course this year. They lock up > occasionally, but I suspect that has more to do with our lab management > software than SC. Otherwise they run fine. - -- x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0 Scot Gresham-Lancaster scot@csuhayward.edu MB1525a ph: 510-885-3150 CSUHayward fax:510-885-3461 Hayward, CA 94542 R O T A S or backwards R O T A S O P E R A O P E R A T E N E T T E N E T A R E P O A R E P O S A T O R or sidewise S A T O R ------------------------------ Date: Tue, 21 Sep 1999 20:06:12 -0400 From: Scott Wilson <---@---.---> Subject: Re: iMac? At 01:34 PM 21/09/99 -0700, you wrote: >I have been using an iMac with SC 2.x all summer and also experience >this 20 sec. or so lockup, a patch will continue to play and the >mouse will move, but no mouse or key events work, they remain buffered >and then they execute when it wakes up in a bit. > >I suspect it is associated with the kludgey USB driver. I am using the >MidiMan MIDIsport which didn't even work until OS 8.6.1 because the >Apple USB drivers were not standard. I have noticed this or a similar problem on numerous different Macs, all G3s for what it's worth. All pre-USB I think. Recently I have noticed it with Audiodesk in addition to SC. When this happens I can always hear the hard drive operating. Changing the size of the cache doesn't seem to make any difference. In all cases VM was off. When James was here he said that he figured it was something to do with the OS, and thus beyond his purview. Any new insights on this James? Anyone else? A minor inconvenience, but very annoying in the middle of a performance. However, it's not specifically an iMac issue. Scott ------------------------------ Date: Tue, 21 Sep 1999 20:31:43 -0400 From: "N. Kent" <---@---.---> Subject: Re: iMac? Scot Gresham-Lancaster wrote: > > I have been using an iMac with SC 2.x all summer and also experience > this 20 sec. or so lockup, a patch will continue to play and the > mouse will move, but no mouse or key events work, they remain buffered > and then they execute when it wakes up in a bit. Has everyone ruled out strains of the Autostart Worm? the approximately 20 second lock out, drive access and everything seeming okay afterword are all symptoms I've seen caused by last year's viruses. nick kent ------------------------------ Date: Wed, 22 Sep 1999 12:54:36 +0200 From: Ioannis Zannos <---@---.---> Subject: Re: Voicer problem, general question James McCartney wrote: > > At 3:57 PM -0600 9/19/99, rkuivila@mail.wesleyan.edu wrote: > > > Why don't you provide a single global synth that is guaranteed to be > >running as long as synthesis is active for scheduling purposes? (This is > >what SoundManager did.) This seems clearer conceptually to me. For > >example, I often think in terms of a Routine that runs in along in time > >spawning sounds as needed. (In fact the routine may just schedule MIDI > >output, like MAX ;) To do this in the current environment seems to require > >cooking up a pseudo-sound when all you really want is a Synth at the root > >level that is guaranteed to be there. > > OK after thinking a bit, I think I know what you mean.. > There are some technical problems with that involved in > running the compiler while the synth engine is running. > It could cause an interrupt overrun and sound cards tend to > behave badly in this situation. > Hey there - Ron is here and we have been talking about this "global synth" problem plus also the Voicer problems some more after this. My note here to James on the topic of global synth: While global synth is invaluable for things like getting the time or scheduling routines etc. James is right in that the functionality is there. I have now done a new version of SoundManager (of GUIUtils) called SynthManager, which is smaller and neater and really easy to use in almost any context. Therefore I think the said needs can be covered with this little SynthManager class. Therefore I would agree with James that one should avoid mucking around with the Synth scheme in SC at the basic level. I will post SynthManager here as soon as we have reviewed it with Ron some more, which will probably happen real soon. There are also more problems concerned with triggering and timing events which can be solved at a conceptual level by implementing a few classes and defining a neat scheme (Pattern, Framework) for them to cooperate, while not having to muck with the internals of SC at all. More later. Best Iannis Zannos. ------------------------------ Date: Tue, 21 Sep 1999 16:08:48 +0100 From: rkuivila@mail.wesleyan.edu Subject: comments on MIDI input handling Hi James, Here is a little report on the activity Ioannis alluded to together with a couple of requests and a comment. background: Ioannis and Garth Paine have been working on a Very Nervous System based installation. The configuration they have been using generates gobs of MIDI: 72 zones per video frame. They were trying to Voicer to handle things and this has not been working because of unreliable response to key up commands. (As a wrokaround they are going to try the trick of creating an instance of MIDIController and then altering its controller and channel instance variables to poll a collection of MIDIControl inputs from a single process. By reserving one continuous controller as a sequence number - it increments each time VNS has transmitted a complete packet - it is possible to do something similar to what they were attempting with Voicer. Hopefully this will take care of things.) request 1: Would it be possible to add a method to MIDINoteGate that would return the actual velocity of the MIDI key rather than a flag indicating whether or not it is pressed? This would have allowed the same workaround without having to change the VNS component of the system. comment: On a more general level, this example illustrates that asynchronous input is not always appropriate to direct control of sound synthesis. Nor is it always appropriate to process such input with UnitGenerators. For example, I cannot think of a way of using UnitGenerators to count how many video zones are 'active' (a completely reasonable feature to extract), but it is easy to do with sequential logic. Even when the input is from a musical instrument one may be more interested in accumulating a statistical profile of musical input then in moment by moment response. Robert Rowe's work with Cypher provides a good example. request 2: Could you provide a version of Voicer that provides its "newEventFunc" with key ups as well as downs? (This would make generating a statistical profile of MIDI input far easier.) Incidentally, in many circumstances it would be completely adequate to run it at low control rates (i.e. 10 msec intervals). (Voicer probably does run at control rate already - I guess that the "ar" in Voicer simply means that the first audio buffer filled by newEventFunc is offset by an appropriate amount.) Are there any complications with having the sounds Voicer spawns crank up their control rates? request 3: What about a general MIDIInput class that receives all complete input packets and lets the user do his/her own higher level parsing? RJK ------------------------------ Date: Wed, 22 Sep 1999 19:18:45 -0400 From: Scott Wilson <---@---.---> Subject: Re: iMac? At 08:31 PM 21/09/99 -0400, you wrote: > >Has everyone ruled out strains of the Autostart Worm? > >the approximately 20 second lock out, drive access and everything >seeming okay afterword are all symptoms I've seen caused by last year's viruses. > > >nick kent Ack!!!! This turned out to be exactly correct. Thanks for the tip. S. ------------------------------ Date: Wed, 22 Sep 1999 18:05:36 -0600 From: "David Cottle" <---@---.---> Subject: Re: iMac? Hi, >>Has everyone ruled out strains of the Autostart Worm? >> >>the approximately 20 second lock out, drive access and everything >>seeming okay afterword are all symptoms I've seen caused by last year's > viruses. >> >> >>nick kent > > Ack!!!! This turned out to be exactly correct. Thanks for the tip. Will disinfectant 3.7.1 detect the worm? If not, how do I find and destroy it? ------------------------------ Date: Wed, 22 Sep 1999 23:11:25 -0600 From: James McCartney <---@---.---> Subject: Re: iMac? At 6:05 PM -0600 9/22/99, David Cottle wrote: >Hi, > >>>Has everyone ruled out strains of the Autostart Worm? >>> >>>the approximately 20 second lock out, drive access and everything >>>seeming okay afterword are all symptoms I've seen caused by last year's >> viruses. >>> >>> >>>nick kent >> >> Ack!!!! This turned out to be exactly correct. Thanks for the tip. > >Will disinfectant 3.7.1 detect the worm? If not, how do I find and destroy >it? No. Disinfectant is out of date and should no longer be used. I found a shareware here that reportedly can remove some but not all of the autostart worm versions. However, I cannot vouch for this software. Anything that erases files and rewrites boot blocks to remove a virus is doing potentially dangerous things, so you are probably better off with a commercial virus utility. Commercial software is generally better coded for failure modes. In any case, do a backup before you run it. (But also be careful with where you insert this backup because it is infected.) http://www.ledet.com/autostart/eradicator_sea.hqx Also note that any files that the worm corrupted are not recoverable. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 23 Sep 1999 01:26:17 -0600 From: James McCartney <---@---.---> Subject: Re: BOUNCE : iMac? At 11:56 PM -0600 9/22/99, owner-sc-users@lists.io.com wrote: >Hi all, > >you can try WormScanner : http://www.jwwalker.com/pages/worm.html > >Jean de Reydellet > > >PS: I could get n = 450 in the interpolating oscillator benchmark on a >G4/400 yesterday. >Is there going to be a version of SC optimized for the "velocity engine"? > Yes. I'm waiting for a machine.. Some VE code is already written. Over time I will probably add more VE acceleration to various ugens. The mul, add inputs of all ugens that have them will benefit. Not all unit generators will benefit, but many will. Table lookup oscillators are one that is hard to speed up because Altivec doesn't have any way to lookup 4 table entries in parallel, but there is some speed up that can be done. A single IIR filter is impossible to speed up, but a bank of them in parallel as in Klank can be sped up. The 450 & 500 Mhz should be even better than the 400 due to the improved motherboard. The 400 machines are basically a G4 on a Yosemite (old G3) motherboard, whereas the 450 and 500 have the newer faster Sawtooth motherboard. If you can wait, I recommend getting the 450 or 500 MHz models. >Tout sur la synthËse et la transformation du son : >www.chez.com/audionumerique > >---------- --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 23 Sep 1999 13:01:35 +0100 From: finer@easynet.co.uk Subject: MIDIController values Hello, I thought I could use MIDIController to receive Control messages from outside SC and then extract the value - using MIDIController as a kind of trojan horse to smuggle numerical info into SC. Anyway, I'm having a bit of trouble extracting the actual integer value of a control message. Is it infact possible and if so how ? Thanks, Jem ------------------------------ Date: Thu, 23 Sep 1999 13:18:38 -0400 From: Scott Wilson <---@---.---> Subject: Autostart Worm Check out: http://www.sherpasoft.com/MacSupporters/macvir.faq This contains a detailed description of the Autostart worm family, and a method to remove them manually, without software. Scott ------------------------------ Date: Thu, 23 Sep 1999 13:04:03 -0400 From: Scott Wilson <---@---.---> Subject: Re: iMac? >> Ack!!!! This turned out to be exactly correct. Thanks for the tip. > >Will disinfectant 3.7.1 detect the worm? If not, how do I find and destroy >it? I used Virex, which we have here at Wesleyan. It seems that the virus sets up a fake extension called Desktop Print Spooler (as opposed to Desktop Printer Spooler). This is not visible on the hard drive, but may cause bombs, etc. The trick is to start up the machine without extensions and then run the virus software. Otherwise it will be unable to delete the file, since it will be 'in use.' I used to feel that Mac viruses were a relatively small concern (at least compared to PCs) but it seems that at this point it's probably worth investing in some commercial software that allows you to get virus updates, etc., especially in an institutional setting. Scott Wilson ------------------------------ Date: Fri, 24 Sep 1999 10:26:41 +0200 From: laurson@amadeus.siba.fi (Mikael Laurson) Subject: MIDI sync record I am working with a SC patch that is controlled by MIDI control data. The patch works fine when using the Synth.play method. When I want store the result to disk I switch the play method to Synth.record. This works OK except that the file contains occasionally some clicks (probably my Mac - a 266Mhz G3 - and the disk are not fast enough). If I try to activate the "Deferred Task Level" menu it seems that the menu-item cannot be checked. Is there some other way to avoid these clicks? Finally one question concerning G4 Macs. James wrote in an earlier message: >Some VE code is already written. Is there already a C compiler available for the "velocity engine"? I heard some rumours that the "Code Warrior" by MetroWerks has something like this, but I could not find where to find information if this is true. Mikael ================================ Mikael Laurson Hollantilaisentie 1 A 2 00300 Helsinki 33 Finland E-mail: laurson@siba.fi ================================ ------------------------------ Date: Fri, 24 Sep 1999 02:38:41 -0600 From: James McCartney <---@---.---> Subject: Re: MIDI sync record At 2:26 AM -0600 9/24/99, Mikael Laurson wrote: >I am working with a SC patch that is controlled by MIDI control data. >The patch works fine when using the Synth.play method. When >I want store the result to disk I switch the play method to Synth.record. >This works OK except that the file contains occasionally some clicks >(probably my Mac - a 266Mhz G3 - and the disk are not fast enough). How much CPU does your patch use ? Try using a larger disk buffer for DiskOut. > >If I try to activate the "Deferred Task Level" menu it seems that the >menu-item cannot >be checked. Deferred Task level is no longer supported. >Finally one question concerning G4 Macs. James wrote in an earlier message: > >>Some VE code is already written. > >Is there already a C compiler available for the "velocity engine"? I heard some >rumours that the "Code Warrior" by MetroWerks has something like this, but >I could not >find where to find information if this is true. Metrowerks Pro 5 does support Altivec. Altivec programming is like writing macro assembler code in C. Apple has an Altivec web site that has more info on Altivec. http://developer.apple.com/hardware/altivec/index.html --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 24 Sep 1999 09:40:45 -0400 From: Mark Ballora <---@---.---> Subject: Re: MIDI sync record >I am working with a SC patch that is controlled by MIDI control data. >The patch works fine when using the Synth.play method. When >I want store the result to disk I switch the play method to Synth.record. >This works OK except that the file contains occasionally some clicks >(probably my Mac - a 266Mhz G3 - and the disk are not fast enough). > >If I try to activate the "Deferred Task Level" menu it seems that the >menu-item cannot >be checked. > >Is there some other way to avoid these clicks? > > I use the same machine. I've had occasional trouble making sound files out of hefty patches. It solved it to use Synth.write instead of .record. ------------------------------ Date: Fri, 24 Sep 1999 06:32:04 -0600 From: "David Cottle" <---@---.---> Subject: MIDI out Hi, I haven't seen anything in the documentation about MIDI output. Is SC capable of sending MIDI out? If so, how. If not, any chance of implementing it? In a lot of the stuff I'm doing right now I don't care much about the instrument, I just want it to produce a sound that isn't too irritating. But I spend a lot of time working on the instruments anyway. If I had a MIDI out option I could just send it to a keyboard and pick a patch. ------------------------------ Date: Fri, 24 Sep 1999 09:38:08 -0600 From: James McCartney <---@---.---> Subject: Re: MIDI out At 6:32 AM -0600 9/24/99, David Cottle wrote: >Hi, > >I haven't seen anything in the documentation about MIDI output. Is SC >capable of sending MIDI out? If so, how. If not, any chance of implementing >it? In a lot of the stuff I'm doing right now I don't care much about the >instrument, I just want it to produce a sound that isn't too irritating. But >I spend a lot of time working on the instruments anyway. If I had a MIDI out >option I could just send it to a keyboard and pick a patch. MIDIOut.help --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 24 Sep 1999 10:01:27 -0600 From: "David Cottle" <---@---.---> Subject: Re: MIDI out Hi, > MIDIOut.help I hate when I do that! Next time I'll rt*m. ------------------------------ Date: Fri, 24 Sep 1999 11:19:12 -0600 From: James McCartney <---@---.---> Subject: Re: BOUNCE sc-users@lists.io.com: Non-member submission from [julian rohrhuber ] At 10:06 AM -0600 9/24/99, owner-sc-users@lists.io.com wrote: > >- it would be convenient to have a single impulse UGen similar to >PSinGrain - it would save me many envelopes. Impulse.ar(0) generates a single impulse. > >- I find it very nice to have a vector/array concept like in C - is there >a special reason >why SC doesn¥t have anything like var a[][] ? Arrays are objects like everything else. The notation is different than C. x[i] in C is written as x.at(i) or x @ i in SC. If you wanted a 2D array you could write a class for that. Or you could just do it manually using 1D arrays: var a; // create and zero fill a 10 x 20 array a = Array.fill(10, { Array.fill(20, 0) }); a.at(5).put(8, 999); a.at(0).at(0).postln; a.at(5).at(8).postln; --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 24 Sep 1999 14:48:33 -0600 From: James McCartney <---@---.---> Subject: Re: latency of keyDownAction Is this a recent message? I just found it. You need to have the time set properly on your machine, or else my mail reader sorts it to oblivion. At 2:29 PM -0600 1/23/05, rkuivila@mail.wesleyan.edu wrote: >Hi James, > > There seems to be about a quarter second delay in a View's response to a >keyDownAction. Is there any way to speed this up? (I want to be able to >have people make simple performance instruments w/o any MIDI gear - just >mic, mouse, and keyboard.) Yes I just improved the situation here. There used to be a problem here with the cooperative tasking and threads, but that is no longer the case so the performance here doesn't need to be geared down like it was. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 24 Sep 1999 15:54:43 -0600 From: "David Cottle" <---@---.---> Subject: MIDIOut Hi, OK, this time I did some reading (through the archives) and used this from a recent discussion: (Pbind( \midinote, Pseq(#[60, 62, 64], 10), \ugenFunc, { arg midinote, amp; [\midinote_output, midinote].postln; MIDIOut(0).noteOn(1, midinote, amp); FSinOsc.ar(midinote.midicps, Line.kr(0.1, 0, 0.1)) } ).play(channels: 1) ) I read your instructions for getting OMS to play and that works. My next problem is getting the notes off. Is the code below the correct method? How would you do it? (Could you write a short example?) Do you have to keep that close track of the midi pitches (you have to send a note off for each midi note that has been turned on), or can you send an all notes off? (Pbind( \midinote, Pseq(#[60, 60, 62, 62, 64, 64], 10), \amp, Pseq(#[120, 0], inf), \ugenFunc, { arg midinote, amp; [\midinote_output, midinote].postln; MIDIOut(0).noteOn(1, midinote, amp); FSinOsc.ar(midinote.midicps, Line.kr(0.1, 0, 0.1)) } ).play(channels: 1) ) ------------------------------ Date: Fri, 24 Sep 1999 18:16:08 -0400 (EDT) From: Matthew Rogalsky <---@---.---> Subject: checkboxes, radio buttons Dear all, Should, for instance, checkbox1.value return 0 or 1 depending on the CheckBoxView's state? This is what I gather from looking at the GUI examples file. But, in my application I want to make an assign grid in which the checkboxes control amplitude of soundfiles -- and multiplying a signal (within a Mix ugen) by checkbox1.value doesn't have any effect (I hear the file playing back continuously). Polling checkbox1.value clearly shows it toggling between 0 and 1, so why would it have no effect applied to the amplitude of my soundfile? I started off using radio buttons and had the same problem, which I presume is MY problem -- can someone point out what I'm not seeing? thanks mattr ------------------------------ Date: Fri, 24 Sep 1999 17:25:03 -0600 From: James McCartney <---@---.---> Subject: Re: checkboxes, radio buttons At 4:16 PM -0600 9/24/99, Matthew Rogalsky wrote: >Dear all, > >Should, for instance, > >checkbox1.value > >return 0 or 1 depending on the CheckBoxView's state? This is what I gather >from looking at the GUI examples file. > >But, in my application I want to make an assign grid in which the >checkboxes control amplitude of soundfiles -- and multiplying a signal >(within a Mix ugen) by checkbox1.value doesn't have any effect (I hear the >file playing back continuously). > >Polling checkbox1.value clearly shows it toggling between 0 and 1, so why >would it have no effect applied to the amplitude of my soundfile? > >I started off using radio buttons and had the same problem, which >I presume is MY problem -- can someone point out what I'm not seeing? checkbox.value gives you a single value. That is the value at the time you call it. You are calling it at the time you construct your patch. So you are multiplying your signal by the frozen value that was in effect when your patch was constructed. In order to get a changing value you need to use a Plug ugen. If you do checkbox.kr, then your checkbox gets wrapped in a Plug which tracks the value of the checkbox. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 24 Sep 1999 17:31:58 -0600 From: James McCartney <---@---.---> Subject: Re: MIDIOut At 3:54 PM -0600 9/24/99, David Cottle wrote: >My next >problem is getting the notes off. Is the code below the correct method? How >would you do it? (Could you write a short example?) In order to make this example work you need to change the Pattern class a bit. In Pattern::asSpawn you'll find a line containing: ~innersynth = innersynth; Above that line add a line: ~outersynth = outersynth; Recompile and then this will work. The above is necessary in order to get access to a Synth that you can schedule the note off in. This change will be in the next version. ( Pbind( \midinote, Pseq(#[60, 60, 62, 62, 64, 64], 10), \veloc, Pwhite(1,127,inf), \ugenFunc, { arg midinote, veloc, sustain, outersynth; [\noteOn, midinote].postln; MIDIOut(0).noteOn(1, midinote, veloc); // schedule note off in the outer synth. outersynth.sched(sustain, { [\noteOff, midinote].postln; MIDIOut(0).noteOn(1, midinote, 0); }); nil // no audio output } ).play(channels: 1) ) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Fri, 24 Sep 1999 23:27:50 -0600 From: "David Cottle" <---@---.---> Subject: Re: MIDIOut Hi, >>problem is getting the notes off. Is the code below the correct method? How >>would you do it? (Could you write a short example?) > > In order to make this example work you need to change the [...] > ( > Pbind( [...] > ).play(channels: 1) > ) This all worked great, with one last problem. If I stop the process before the midi off I get a forever sustained pitch. I was thumbing through the instrument sounds with a program change in the function and last time I ended on annoying organ sound, hitting command period before the note off, so it continued to sustain. I had to use my dusty aural skills to determine the midi number for the still sounding pitch and quickly typed in MIDIOut(0).noteOn(1, 64, 0) to get it to shut up. This will certainly surface in the class. Short of writing a note off for every note I used at the end of the function, or some sort of loop to turn all the notes off, what can I do to stop it? Is there an all notes off? Would it hurt to write 127.do({arg item; MIDIOut(0).noteOn(1, item, 0)}) to clean up, sort of like closing windows? Thanks again for your help. This will save me a lot of time and will greatly simplify the next section of the class. ------------------------------ Date: Sat, 25 Sep 1999 00:41:41 -0600 From: James McCartney <---@---.---> Subject: Re: MIDIOut At 11:27 PM -0600 9/24/99, David Cottle wrote: >sort of loop to turn all the notes off, what can I do to stop it? Is there >an all notes off? Would it hurt to write >127.do({arg item; MIDIOut(0).noteOn(1, item, 0)}) to clean up, sort of like >closing windows? You can try "all notes off". Not all keyboards respond to it, in which case you need to iterate through them as above. All notes off is controller 123, the data value is ignored. MIDIOut(0).control(1, 123, 0); Or you could add this method to MIDIOut: allNotesOff { arg chan; 0000,0000,C000this.control(chan, 123, 0); } and then you could write: MIDIOut(0).allNotesOff(1); --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Sat, 25 Sep 1999 08:58:34 -0600 From: "David Cottle" <---@---.---> Subject: Re: MIDIOut Hi, > You can try "all notes off". Not all keyboards respond to it, I'll try this. Another thing I noticed last night. I don't know if you can help with this, but I did a version with \dur, 0.25, and output was sort of crippled, some notes longer, then shorter. At any rate, not correct. But what I mean to say is that they were incorrect in a pattern, hinting that it's not keeping up with the data. Is this just a quirk of quicktime? Any suggestions on how to improve it? I'm not too worried about it because I don't think it will happen on a real synthesizer (I'll post again if it does). ------------------------------ Date: Sat, 25 Sep 1999 09:05:13 -0600 From: "David Cottle" <---@---.---> Subject: Re: MIDIOut Hi, Try this: ( var pr = 25; Pbind( \midinote, Pfunc({30 + 40.rand}), \dur, 0.2, \veloc, Pwhite(80,127,inf), \ugenFunc, { arg midinote, veloc, sustain, outersynth; MIDIOut(0).program(1, pr); MIDIOut(0).noteOn(1, midinote, veloc); // schedule note off in the outer synth. outersynth.sched(sustain, { MIDIOut(0).noteOn(1, midinote, 0); }); nil // no audio output } ).play(channels: 1); 127.do({arg item; MIDIOut(0).noteOn(1, item, 0)}) ) On my machine it sounds like it has to "take a breath" every five notes. ------------------------------ Date: Sat, 25 Sep 1999 10:10:53 -0600 From: James McCartney <---@---.---> Subject: Re: MIDIOut At 8:58 AM -0600 9/25/99, David Cottle wrote: >Hi, > >> You can try "all notes off". Not all keyboards respond to it, > >I'll try this. > >Another thing I noticed last night. I don't know if you can help with this, >but I did a version with \dur, 0.25, and output was sort of crippled, some >notes longer, then shorter. At any rate, not correct. But what I mean to say >is that they were incorrect in a pattern, hinting that it's not keeping up >with the data. Is this just a quirk of quicktime? Any suggestions on how to >improve it? Well this is why I resisted putting in MIDIOut for so long. I knew that I would have to keep explaining why the timing sucks. SuperCollider calculates things in the audio interrupt. The audio interrupt is bursty. It is not a good place to schedule MIDI from. The only way to even out the MIDI timing would be to delay it some amount of time. Unfortunately if the CPU is occupied calculating audio during certain periods of time then not even delaying the MIDI works. Ideally MIDI should have a higher priority than audio. On MacOS this is not possible AFAIK. MIDIOut should really NOT be used for notes, only controllers. If you want to use it for notes, then I guarantee nothing as far as timing. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sun, 26 Sep 1999 00:17:39 -0600 From: "David Cottle" <---@---.---> Subject: Re: MIDIOut Hi, > Well this is why I resisted putting in MIDIOut for so long. [...] > MIDIOut should really NOT be used for notes, only controllers. > If you want to use it for notes, then I guarantee nothing as far > as timing. Hmm, . . . So its not a very good option for this class? (I tried it with a synth and had the same problem.) I was pretty excited to use it. ------------------------------ Date: Sun, 26 Sep 1999 00:24:29 -0600 From: "David Cottle" <---@---.---> Subject: Re: MIDIOut Hi, > Well this is why I resisted putting in MIDIOut for so long. Any chance of having it write to a midi file, which could then be played back? I know the midi file format is pretty dense, which is why I've avoided it for so long. Could you buffer the output? I don't mean to sound demanding, just thinking out loud. ------------------------------ Date: Sun, 26 Sep 1999 07:37:23 -0600 From: James McCartney <---@---.---> Subject: Re: MIDIOut At 12:17 AM -0600 9/26/99, David Cottle wrote: >Hi, > >> Well this is why I resisted putting in MIDIOut for so long. >[...] >> MIDIOut should really NOT be used for notes, only controllers. >> If you want to use it for notes, then I guarantee nothing as far >> as timing. > >Hmm, . . . So its not a very good option for this class? (I tried it with a >synth and had the same problem.) I was pretty excited to use it. What machine and system version are you using? The audio interrupts tend to stomp on the timer interrupts that OMS uses. The smaller the buffer size and the less CPU load you have the better chance you have. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ End of sc-users-digest V1 #63 *****************************