From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #40 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 Saturday, May 15 1999 Volume 01 : Number 040 ---------------------------------------------------------------------- Date: Wed, 12 May 1999 14:06:23 +0200 From: "Iannis Zannos" <---@---.---> Subject: Re: SC not recognizing 1212 i/o There are problems with the ADAT word clock if you are using converters like those of Creamware. No problems with Studer or Alesis. You should make sure to have the latest version of the Korg driver. Apparently Korg have corrected the word clock problems - maybe a new driver has been released. Check with support / download newest driver. Make sure you are using the right sound control panel. The Korg manual says that there may be problems when using newer versions of the control panel, in particular the one that is combined with monitors. Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 - ---------- >From: "Garry Kling" <---@---.---> >To: >Subject: SC not recognizing 1212 i/o >Date: Wed, 12 May 1999 9:21 AM > >Has anyone had any problems getting SC to recognize the Korg 1212 card? >I installed the card 2 days ago, and have been trying every possible >extension setup to get it to work, but SC doesn't recognize it. Sound >Manager recognizes it, as does the korg utility, and I can get 2 channel >out of SC with it under the sound manager setup. I disabled the ATI >extensions as Korg suggests, as well as the extensions for the >Audiomedia III card that I have. Any ideas? > >Garry Kling >CEMS >Central Washington University > ><<< James McCartney 5/11 1:56p >>> >At 11:20 AM -0600 5/11/99, julian rohrhuber wrote: >>how can I edit a list in runtime? >>it would be very practical for many applications to have a window >>with the current array that can be changed and refreshed from the GUI. > >GUIUtils can do this. >A similar thing could be done in your own code. > > > --- james mccartney james@audiosynth.com >http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth >program: > > > > > > > > ------------------------------ Date: Wed, 12 May 1999 15:39:28 +0200 From: julian rohrhuber <---@---.---> Subject: Re: runtime listediting >GUIUtils can do this. i have tried of course, but the solution is neither elegant not working. I would like to use Numerical view instead, it would be nicer. >A similar thing could be done in your own code. What do you mean? My code has first to be compiled before a list is being updated, no? (At the moment I write and recompile. but the sound has to stop each time, what I wanted to avoid) here my try: ( var a, b, w, z, list; list = [1, 0, 1]; w = GUIWindow.new("panel", Rect.newBy( 163, 72, 120, 99 )); z = ButtonView.new( w, Rect.newBy( 49, 29, 22, 47 ), "change", 0, 0, 1, 0, 'linear'); z.action = { GetStringDialog.new("String", [1, 0, 1, 0].asCompileString, list).value}; { var trig; trig = Spawn.ar({ arg sp, i, sy; Impulse.ar(0, list@@i)}, 1, 1); Decay.ar(trig, 0.15, FSinOsc.ar(400)); }.play; ) >At 11:20 AM -0600 5/11/99, julian rohrhuber wrote: >>how can I edit a list in runtime? >>it would be very practical for many applications to have a window >>with the current array that can be changed and refreshed from the GUI. > >GUIUtils can do this. >A similar thing could be done in your own code. > > > --- james mccartney james@audiosynth.com http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth program: > > > > > > ------------------------------ Date: Thu, 13 May 1999 15:22:27 -0400 From: Gary Nelson <---@---.---> Subject: granulate input example We are trying to modify the example so that one of the parameters to change on every grain with [0.25, 0.5, 1, 2, 4].choose as follows... granulated = GrainTap.ar([bufL, bufR], durSlider.kr, [0.25, 0.5, 1, 2, 4].choose, pitchDispSlider.kr, timeDispSlider.kr, overlapSlider.kr, ampSlider.kr); Currently it picks a single random value at the beginning of the process and keeps that value for all subsequent grains. Where should the choose be placed to make this happen? Gary Lee Nelson TIMARA Department Conservatory of Music Oberlin, OH 44074 office: 440-775-8223 home: 440-775-4279 fax: 440-775-8942 email: Gary.Nelson@oberlin.edu http://www.timara.oberlin.edu/people/~gnelson/gnelson.htm ------------------------------ Date: Thu, 13 May 1999 21:47:46 -0600 From: James McCartney <---@---.---> Subject: Re: granulate input example At 1:22 PM -0600 5/13/99, Gary Nelson wrote: >We are trying to modify the example so that one of the parameters to change >on every grain with [0.25, 0.5, 1, 2, 4].choose as follows... > >granulated = GrainTap.ar([bufL, bufR], durSlider.kr, >[0.25, 0.5, 1, 2, 4].choose, pitchDispSlider.kr, timeDispSlider.kr, >overlapSlider.kr, ampSlider.kr); > >Currently it picks a single random value at the beginning of the process and >keeps that value for all subsequent grains. Where should the choose be >placed to make this happen? You can't with GrainTap. GrainTap makes a series of grains. It samples the values of its inputs whenever it starts a grain. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 13 May 1999 21:51:57 -0600 From: James McCartney <---@---.---> Subject: Re: granulate input example At 1:22 PM -0600 5/13/99, Gary Nelson wrote: >We are trying to modify the example so that one of the parameters to change >on every grain with [0.25, 0.5, 1, 2, 4].choose as follows... > >granulated = GrainTap.ar([bufL, bufR], durSlider.kr, >[0.25, 0.5, 1, 2, 4].choose, pitchDispSlider.kr, timeDispSlider.kr, >overlapSlider.kr, ampSlider.kr); > >Currently it picks a single random value at the beginning of the process and >keeps that value for all subsequent grains. Where should the choose be >placed to make this happen? Actually come to think of it, you can do this: granulated = GrainTap.ar([bufL, bufR], durSlider.kr, Plug.kr({ [0.25, 0.5, 1, 2, 4].choose }), pitchDispSlider.kr, timeDispSlider.kr, overlapSlider.kr, ampSlider.kr); The Plug evaluates its function every control period and the GrainTap samples it whenever it starts a new grain. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 13 May 1999 22:07:34 -0600 From: James McCartney <---@---.---> Subject: Re: granulate input example At 9:51 PM -0600 5/13/99, James McCartney wrote: >Actually come to think of it, you can do this: > >granulated = GrainTap.ar([bufL, bufR], durSlider.kr, >Plug.kr({ [0.25, 0.5, 1, 2, 4].choose }), >pitchDispSlider.kr, timeDispSlider.kr, >overlapSlider.kr, ampSlider.kr); The efficiency elf tells me this should be: granulated = GrainTap.ar([bufL, bufR], durSlider.kr, Plug.kr({ #[0.25, 0.5, 1, 2, 4].choose }), pitchDispSlider.kr, timeDispSlider.kr, overlapSlider.kr, ampSlider.kr); By using the # sign I am not having to build a new list each control period. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 14 May 1999 09:04:36 +0200 From: "Iannis Zannos" <---@---.---> Subject: Simulating MIDI input Hello James, is there a way for simulating MIDI input using Plug? If not could you provide one in the next release? The reason is if one is developing an application that uses MIDI input at a place without a MIDI keyboard, one has no way to test things! Best, Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 ------------------------------ Date: Fri, 14 May 1999 03:00:26 -0600 From: James McCartney <---@---.---> Subject: Re: Simulating MIDI input At 1:04 AM -0600 5/14/99, Iannis Zannos wrote: >Hello James, > >is there a way for simulating MIDI input using Plug? >If not could you provide one in the next release? simulate it how? You can plug anything in a Plug instead of MIDI. There is not an easy way to loopback MIDI within OMS. I am not inclined to provide such a feature. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 14 May 1999 10:10:27 +0200 From: "Iannis Zannos" <---@---.---> Subject: Using MIDI NoteOn as trigger What is the standard or recommended way to trigger execution of functions from MIDI Note on messages? I could use Voicer, but perhaps there is another, more direct way? Another issue is triggering non-Ugen objects, i.e. using a MIDI Note On message to cause evaluation of a normal, non-audio, non-UGen graph function. (Like Synth :: repeat... does). BTW Communicating between non-audio and audio functions i.e. between signal objects and discrete objects, is still rather "deep waters" in SC, Although the topic has been constantly investigated (by James) ever since SC 1 and there has been much progress, I am still missing some comprehensive treatment and / or documentation that makes handling easier. GUIUtils plus some of my recent doc on the web contains some efforts in that direction, hope that others may join and help shed light on the topic. Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 ------------------------------ Date: Fri, 14 May 1999 10:23:41 +0200 From: "Iannis Zannos" <---@---.---> Subject: Re: Simulating MIDI input >simulate it how? You can plug anything in a Plug instead of MIDI. Well, for example triggering Voicer with something else than MIDI. Could you provide an example? >There is not an easy way to loopback MIDI within OMS. >I am not inclined to provide such a feature. I was not referring to something like this. Best, Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 - ---------- >From: James McCartney <---@---.---> >To: sc-users@lists.io.com >Subject: Re: Simulating MIDI input >Date: Fri, 14 May 1999 11:00 AM > >At 1:04 AM -0600 5/14/99, Iannis Zannos wrote: >>Hello James, >> >>is there a way for simulating MIDI input using Plug? >>If not could you provide one in the next release? > >simulate it how? You can plug anything in a Plug instead of MIDI. >There is not an easy way to loopback MIDI within OMS. >I am not inclined to provide such a feature. > > > > > --- james mccartney james@audiosynth.com http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth program: > > > > > > ------------------------------ Date: Fri, 14 May 1999 03:30:54 -0600 From: James McCartney <---@---.---> Subject: Re: Using MIDI NoteOn as trigger At 2:10 AM -0600 5/14/99, Iannis Zannos wrote: >What is the standard or recommended way to trigger >execution of functions from MIDI Note on messages? > >I could use Voicer, but perhaps there is another, >more direct way? > >Another issue is triggering non-Ugen objects, >i.e. using a MIDI Note On message to cause >evaluation of a normal, non-audio, non-UGen >graph function. (Like Synth :: repeat... does). For now the only way to get note ons as events is to use Voicer. There needs to be a way to register functions for MIDI events as there was in SC1, but I have not added that yet. >BTW Communicating between non-audio and >audio functions i.e. between signal objects and >discrete objects, is still rather >"deep waters" in SC, Although the topic >has been constantly investigated (by James) ever >since SC 1 and there has been much progress, >I am still missing some comprehensive treatment >and / or documentation that makes handling easier. >GUIUtils plus some of my recent doc on the >web contains some efforts in that direction, >hope that others may join and help shed light >on the topic. I'm not sure what your looking to do. Use Plug to control UGens from scheduled events. Use Sequencer or TSpawn to trigger events from UGen signals. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 14 May 1999 18:34:07 +1000 From: Garth Paine <---@---.---> Subject: CyberArts Performance For your information - if you want to listen to the cyberArts Performance between Melbourne Australia (Garth Paine) and Boston, USA (Landon Rose) the performance will occure at 10:30AM EST Australian time and can be heard using a Real AUdio G2 Player by logging into: http://cis.iii.rmit.edu.au Cheers, Garth BTW: note that I have changed email and www addresses to activatedspace.com.au creativeaccess.com.au will not work after June 01, 1999 ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. Activated Space . Composer, Sound Designer, Installation Artist .. Interactives Designer, Exhibition Consultant ........ph. 61 3 95720133 garth@activatedspace.com.au http://www.activatedspace.com.au .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. ------------------------------ Date: Fri, 14 May 1999 04:28:23 -0600 From: James McCartney <---@---.---> Subject: Re: Simulating MIDI input At 2:23 AM -0600 5/14/99, Iannis Zannos wrote: >>simulate it how? You can plug anything in a Plug instead of MIDI. > >Well, for example triggering Voicer with something else than >MIDI. Could you provide an example? There is a noteOn method for Voicer which can be called from a synth sched task. This simulates a noteOn in the Voicer. noteOn { arg startTime, chan=1, note=60, veloc=64; --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Fri, 14 May 1999 05:10:53 -0600 From: James McCartney <---@---.---> Subject: Re: Simulating MIDI input Sorry, there is a bug in the Voicer noteOn method. The first argument was wrong and the comment was out of date. Change it to this and recompile: noteOn { arg chan=1, note=60, veloc=64; _Voicer_NoteOn ^this.primitiveFailed } Here is an example: ( // toggle mode e = Env.new([0, 0.1, 0.1, 0], [0.2, 0.1, 0.2], 'linear', 2); Synth.scope({ arg synth; var out, vc; out = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; EnvGen.ar(e, SinOsc.ar((note + 24).midicps)); }, 1, // one audio output channel 1, // listen to MIDI channel 1 -8 // if max voices is negative then use toggle mode ); vc = out.source; synth.repeat(0, 2, { vc.noteOn(1, 60, 64); }); out }) ) and another: ( // simulated note on and note off e = Env.new([0, 0.1, 0.1, 0], [0.2, 0.1, 0.2], 'linear', 2); Synth.scope({ arg synth; var out, vc; out = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; EnvGen.ar(e, SinOsc.ar((note + 24).midicps)); }, 1, // one audio output channel 1, // listen to MIDI channel 1 8 // max voices is 8 ); vc = out.source; synth.repeat(0, 0.2, { var note; note = 48 + 24.rand; vc.noteOn(1, note, 64); // sched the note off for this note synth.sched(0.5, { vc.noteOn(1, note, 0); }); }); out }) ) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Fri, 14 May 1999 19:06:04 +0200 From: "Iannis Zannos" <---@---.---> Subject: Re: Simulating MIDI input >Sorry, there is a bug in the Voicer noteOn method. >The first argument was wrong and the comment was out of date. >Change it to this and recompile: > > noteOn { arg chan=1, note=60, veloc=64; > _Voicer_NoteOn > ^this.primitiveFailed > } > > >Here is an example: ... Thank you! This is what I looking for. Iannis Zannos SIM - ---------- >From: James McCartney <---@---.---> >To: sc-users@lists.io.com >Subject: Re: Simulating MIDI input >Date: Fri, 14 May 1999 1:10 PM > >Sorry, there is a bug in the Voicer noteOn method. >The first argument was wrong and the comment was out of date. >Change it to this and recompile: > > noteOn { arg chan=1, note=60, veloc=64; > _Voicer_NoteOn > ^this.primitiveFailed > } > > >Here is an example: > >( >// toggle mode >e = Env.new([0, 0.1, 0.1, 0], [0.2, 0.1, 0.2], 'linear', 2); >Synth.scope({ arg synth; > var out, vc; > > out = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; > EnvGen.ar(e, SinOsc.ar((note + 24).midicps)); > }, > 1, // one audio output channel > 1, // listen to MIDI channel 1 > -8 // if max voices is negative then use toggle mode > ); > > vc = out.source; > > synth.repeat(0, 2, { vc.noteOn(1, 60, 64); }); > > out >}) >) > >and another: > >( >// simulated note on and note off >e = Env.new([0, 0.1, 0.1, 0], [0.2, 0.1, 0.2], 'linear', 2); >Synth.scope({ arg synth; > var out, vc; > out = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; > EnvGen.ar(e, SinOsc.ar((note + 24).midicps)); > }, > 1, // one audio output channel > 1, // listen to MIDI channel 1 > 8 // max voices is 8 > ); > > vc = out.source; > > synth.repeat(0, 0.2, { > var note; > note = 48 + 24.rand; > vc.noteOn(1, note, 64); > // sched the note off for this note > synth.sched(0.5, { vc.noteOn(1, note, 0); }); > }); > > out >}) >) > > > > --- james mccartney james@audiosynth.com http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth program: > > > > > ------------------------------ Date: Fri, 14 May 1999 21:30:29 +0200 From: "Iannis Zannos" <---@---.---> Subject: Missing Library support in Function (also: Re: Simulating MIDI input) The items under the third "Lib" menu entry ("Play") in the SC menu, will not function unless one provides the following method to the Function class: // Library support libMenuAction { arg name; this.value(name) } This is necessary to make functions work as entries in a menu-Library dictionary. By the way, a work around for triggering things with MIDI NoteOn messages, based on James' previous answer to this request is something like: ( var midiNoteOnAction; midiNoteOnAction = { arg voicer, i, synth, deltaTime, channel, note, velocity; [i, channel, note].postln; }; Synth.scope({ arg synth; var out, vc; out = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; midiNoteOnAction.value(voicer, i, synth, deltaTime, channel, note, velocity); nil; }, 1, // one audio output channel 1, // listen to MIDI channel 1 1 // one voice only ); vc = out.source; synth.repeat(1, 0.5, { vc.noteOn(1, 60.rand + 30, 64); }); out }) ) Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 - ---------- >From: James McCartney <---@---.---> >To: sc-users@lists.io.com >Subject: Re: Simulating MIDI input >Date: Fri, 14 May 1999 1:10 PM > > > noteOn { arg chan=1, note=60, veloc=64; > _Voicer_NoteOn > ^this.primitiveFailed > } > > >Here is an example: > >( >// toggle mode >e = Env.new([0, 0.1, 0.1, 0], [0.2, 0.1, 0.2], 'linear', 2); >Synth.scope({ arg synth; > var out, vc; > > out = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; > EnvGen.ar(e, SinOsc.ar((note + 24).midicps)); > }, > 1, // one audio output channel > 1, // listen to MIDI channel 1 > -8 // if max voices is negative then use toggle mode > ); > > vc = out.source; > > synth.repeat(0, 2, { vc.noteOn(1, 60, 64); }); > > out >}) >) ------------------------------ Date: Fri, 14 May 1999 12:30:19 -0700 From: "Garry Kling" <---@---.---> Subject: Re: SC not recognizing 1212 i/o Thanks Iannis - this is good to know. A combination of the latest drivers, deinstalling Quicktime 4.0, and getting rid of the ATI graphics extensions did the trick. But now (only in SC) the S/PDIF output is VERY quiet, noisy, and impossible to balance. I have a MIDIMan Flying Calf D/A, and the clock rate works, it's just quiet. Ideas? Thank You. Garry Kling Central Washington University <<< "Iannis Zannos" 5/12 8:03a >>> There are problems with the ADAT word clock if you are using converters like those of Creamware. No problems with Studer or Alesis. You should make sure to have the latest version of the Korg driver. Apparently Korg have corrected the word clock problems - maybe a new driver has been released. Check with support / download newest driver. Make sure you are using the right sound control panel. The Korg manual says that there may be problems when using newer versions of the control panel, in particular the one that is combined with monitors. Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 - ---------- >From: "Garry Kling" <---@---.---> >To: >Subject: SC not recognizing 1212 i/o >Date: Wed, 12 May 1999 9:21 AM > >Has anyone had any problems getting SC to recognize the Korg 1212 card? >I installed the card 2 days ago, and have been trying every possible >extension setup to get it to work, but SC doesn't recognize it. Sound >Manager recognizes it, as does the korg utility, and I can get 2 channel >out of SC with it under the sound manager setup. I disabled the ATI >extensions as Korg suggests, as well as the extensions for the >Audiomedia III card that I have. Any ideas? > >Garry Kling >CEMS >Central Washington University > ><<< James McCartney 5/11 1:56p >>> >At 11:20 AM -0600 5/11/99, julian rohrhuber wrote: >>how can I edit a list in runtime? >>it would be very practical for many applications to have a window >>with the current array that can be changed and refreshed from the GUI. > >GUIUtils can do this. >A similar thing could be done in your own code. > > > --- james mccartney james@audiosynth.com >http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth >program: > > > > > > > > ------------------------------ Date: Fri, 14 May 1999 15:00:35 -0600 From: James McCartney <---@---.---> Subject: Re: Missing Library support in Function At 1:30 PM -0600 5/14/99, Iannis Zannos wrote: >The items under the third "Lib" menu >entry ("Play") in the SC menu, will not >function unless one provides the following >method to the Function class: > > // Library support > libMenuAction { arg name; > this.value(name) } No, that is not missing. It is there. You must have written over your version of Function.sc with your own from GUIUtils, perhaps? // Library menu support libMenuAction { arg names; this.value(names) } --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 14 May 1999 22:43:56 +0200 From: "Iannis Zannos" <---@---.---> Subject: MidiChannel specific listening not working in voicer? (Also: Re: Missing Library support in Function ) >with your own from GUIUtils, perhaps? > > > // Library menu support > libMenuAction { arg names; this.value(names) } Yea sir, that was my mistake. ======= But now another question: It seems to me that midi-specific channel listening does not work in Voicer. i.e.: The example below is set to listen only to MIDI notes on channel 1, yet when I rotate through channels 1, 2, 3 via noteOn, the voicer does respond to all three channels. Perhaps the noteOn method or the _Voicer_NoteOn primitive must be corrected? I hacked the following workaround in Voicer: noteOn { arg chan = 1, note=60, veloc=64; // if argDuration is not nil then the note off will be generated // automatically after the duration if ( chan == midiChannel, { this.privNoteOn(chan, note, veloc) }); } privNoteOn { arg chan = 1, note=60, veloc=64; _Voicer_NoteOn ^this.primitiveFailed; } Test to see that this works. It should not work correctly without my workaround, if I am right: ----------------------------------- // Should trigger note only when channel is 1. (e = Env.new([0, 0.5, 0.1, 0], [0.002, 0.1, 0.2], 'linear'); Synth.scope({ arg synth; var out, vc; out = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; ['playing note', note, 'on channel:', channel].postln; EnvGen.ar(e, SinOsc.ar((note + 24).midicps)); // nil; }, 1, // one audio output channel 1, // listen to MIDI channel 1 1 // if max voices is negative then use toggle mode ); vc = out.source; synth.repeat(0, 2, { arg synth, time, count; ['the channel will be:', (count % 3)].postln; vc.noteOn(count % 3, 60, 64); }); out }) ) - ------------------------------ By the way, the doc in the source code mentions: // if argDuration is not nil then the note off will be generated // automatically after the duration Is this feature still on the do list? Cheers, Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 - ---------- >From: James McCartney <---@---.---> >To: sc-users@lists.io.com >Subject: Re: Missing Library support in Function >Date: Fri, 14 May 1999 11:00 PM > >At 1:30 PM -0600 5/14/99, Iannis Zannos wrote: >>The items under the third "Lib" menu >>entry ("Play") in the SC menu, will not >>function unless one provides the following >>method to the Function class: >> >> // Library support >> libMenuAction { arg name; >> this.value(name) } > >No, that is not missing. It is there. >You must have written over your version of Function.sc >with your own from GUIUtils, perhaps? > > > // Library menu support > libMenuAction { arg names; this.value(names) } > > --- james mccartney james@audiosynth.com http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth program: > > > > > > ------------------------------ Date: Fri, 14 May 1999 16:43:16 -0600 From: James McCartney <---@---.---> Subject: Re: MidiChannel specific listening not working in voicer? (Also: Re: Missing Library support in Function ) At 2:43 PM -0600 5/14/99, Iannis Zannos wrote: >But now another question: > >It seems to me that midi-specific channel listening >does not work in Voicer. i.e.: The example below >is set to listen only to MIDI notes on channel 1, >yet when I rotate through channels 1, 2, 3 via noteOn, >the voicer does respond to all three channels. If you call the noteOn method, it is assuming you do want a note on. The channel parameter in that case is only for your event function to do something with. The channel selection only happens for actual Midi data. >Perhaps the noteOn method or the >_Voicer_NoteOn primitive must be corrected? No it is working the way it is supposed to. >By the way, the doc in the source code mentions: > > // if argDuration is not nil then the note off will be generated > // automatically after the duration > >Is this feature still on the do list? No, that comment is in error as I stated in my previous post. My second example shows how to generate a note off. If you really wanted a method to do that, it is trivial to write. noteDur { arg chan=1, note=60, veloc=64, dur=1.0; this.noteOn(chan, note, veloc); synth.sched(dur, { this.noteOn(chan, note, 0); }); } --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: 14 May 1999 17:47:33 EDT From: Jeannie.H.Lee@Dartmouth.EDU (Jeannie H. Lee) Subject: pitch following? Any programs for pitch following other than the example provided by SC? I'd like to observe/study more examples and different approaches to this technique, so if you have something interesting and would like to share it, then please do! Thank you very much, Jeannie ------------------------------ Date: Fri, 14 May 1999 17:21:39 -0700 From: csz@wco.com (Carter Scholz) Subject: Re: pitch following? >Any programs for pitch following other than the example provided by SC? Hi Jeannie, I just happened to have made a small modification to the SC example in order to draw a pitch graph. It's not a different approach, but maybe it'll interest you. ============================= ( // plots frequency or amplitude of soundfile var in, freq, amp, sig, file, filename, minF=50, maxF=350, trace; trace = 'freq'; // change to 'amp' for amplitude filename = ":Sounds:didnt.aif"; file = SoundFile.new; if ( file.readHeader(filename), { file.preloadData; file.sustainLoopStart = 0; file.sustainLoopEnd = file.numFrames - 1 }); w = Synth.plot( { in = DiskIn.ar(file,true); amp = K2A.ar(Amplitude.kr(in, 0.1, 0.1)); freq = OnePole.ar( ZeroCrossing.ar(RLPF4.ar(in,maxF*0.75/44100,0)).max(minF).min(maxF), 0.999); sig = SinOsc.ar(freq, 0, amp); if (trace=='freq',{z=freq},{z=amp}); z }, file.numFrames/file.sampleRate, name:filename); if (trace=='freq', {w.at(1).minval=minF; w.at(1).maxval=maxF}, {w.at(1).minval=0; w.at(1).maxval=1}); ) ------------------------------ Date: Sat, 15 May 1999 09:42:06 -0500 From: rkuivila@mail.wesleyan.edu Subject: Re: Simulating MIDI input Is there any way to take over the reception of all keyboard events? (So the user can insert her own code that optionally disconnects keyboard input from the rest of the system.) This would make it easier to simulate MIDI input w/o undue complications (i.e. accidentally triggering some other activity. RJK ------------------------------ Date: Sat, 15 May 1999 12:28:23 -0600 From: James McCartney <---@---.---> Subject: Re: Simulating MIDI input At 8:42 AM -0600 5/15/99, rkuivila@mail.wesleyan.edu wrote: >Is there any way to take over the reception of all keyboard events? > >(So the user can insert her own code that optionally disconnects keyboard >input from the rest of the system.) ASCII keyboard or MIDI keyboard? --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 15 May 1999 20:24:45 +0200 From: "Iannis Zannos" <---@---.---> Subject: Sampling and playback of control signals Having a look at RecordBuf, PlayBuf and Signal, it seems that there is no way to record and playback control signals such as Mouse or MIDI. This is a pity, since there are many situation where one might want to record such data, as for example in a performance or installation, to use gesture data at later moments. At the moment, the best I could get at is to record such data by sampling them with Synth.repeat and store them as break-points in Env. This seems rather expensive in CPU and space. Any chance we could have RecordBuf.kr and PlayBuf.kr ? Best, Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 ------------------------------ Date: Sat, 15 May 1999 15:21:44 -0500 From: rkuivila@mail.wesleyan.edu Subject: Re: Simulating MIDI input ASCII. But, come to think of it, there is a more general principle here: It would be helpful to keep control input sources to synthesis functions sufficiently abstract that they can be repatched on the fly. Clearly this is possible to do with Plug, but there is no consistent framework for doing so at the moment. If there were some kind of callback facility for input handling of ANY sort (i.e., tablet, MIDI, ASCII keyboard), users could write this themselves. Basically, I am looking for an ExternalControlSourceAction routine in the class ExternalControl and something similar for ASCII keyboard input. This would default to DefaultControlSourceAction, which would be whatever normally happens. Then a typical user routine might look like: MIDIKeyDown.ExternalControlSourceAction = { arg channel, key, velocity; ---user code-- MIDIKeyDown,DefaultControlSourceAction(channel, key, velocity); } The user code might be something as simple as transposing key numbers or something as complex as remapping the keydown to be an ASCII keydown for the View that currently has focus. RJK ------------------------------ Date: Sat, 15 May 1999 14:39:44 -0600 From: James McCartney <---@---.---> Subject: Re: Simulating MIDI input At 2:21 PM -0600 5/15/99, rkuivila@mail.wesleyan.edu wrote: >ASCII. The problem with capturing all ascii is that the text editor needs to get those keys. I think it would lead to confusion. Currently you can capture keys when a View is focused. See the "key down actions" example in "gui examples". --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 15 May 1999 16:12:45 -0400 (EDT) From: "Ronald J. Kuivila" <---@---.---> Subject: Re: Simulating MIDI input Hi James, But what about the issue with ExternalControlSource's? RJK ------------------------------ Date: Sat, 15 May 1999 22:12:54 +0200 From: "Iannis Zannos" <---@---.---> Subject: Tiny bug in String : + method Following code in String class + { arg anObject; ^this prCat: " " primCat: anObject.asString; } ^^^^^ should read: + { arg anObject; ^this prCat: " " prCat: anObject.asString; } ^^^^^ Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 ------------------------------ Date: Sat, 15 May 1999 15:19:21 -0600 From: James McCartney <---@---.---> Subject: Re: Simulating MIDI input At 2:21 PM -0600 5/15/99, rkuivila@mail.wesleyan.edu wrote: >If there were some kind of callback facility for input handling of ANY >sort (i.e., tablet, MIDI, ASCII keyboard), users could write this >themselves. >Basically, I am looking for an ExternalControlSourceAction routine in >the class ExternalControl and something similar for ASCII keyboard input. >This would default to DefaultControlSourceAction, which would be whatever >normally happens. While this would be nice, it would make external control sources, which are now very efficient, have to run byte codes every time they change which would be rather inefficient. What happens now is that MIDI, Mouse and Tablet control input is stored in tables. When an external control source or a GUI view needs to get the data it looks it up in the tables. Both very fast. For remapping you'd have to fifo a message to the interpreter, the interpreter would dequeue the message, run the corresponding function byte codes, get the result and put it in the tables. This would require a new set of fifos. Now there are fifos between the GUI and the synth engine, but MIDI is a different asynchronous process and would require new fifos. This would mean that the virtual machine would have to check more fifos all the time even if there is no data coming in, this costs CPU time. It would have to fifo all MIDI data coming in because you cannot examine virtual machine data from any other process than the virtual machine, because it may be in an indeterminate state. Therefore the MIDI interrupt cannot check to see if it can just put it directly in the table because there is no remapping function, it has to fifo it. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sun, 16 May 1999 01:19:23 +0200 From: "Iannis Zannos" <---@---.---> Subject: Even more requests to Santa Claus (Re: Simulating MIDI input) While at it ...: What about Open Sound Control? Is that still on the to-do-list? It would be just so great to have SC communicate over ethernet with other machines running SC, Squeak, Netscape or whatever. Another rather specialized feature to consider: *Access to any subset of audio channels. Currently one can choose a channel offset with Synth : this.channelOffset. which is fine when choosing a single channel to output a spawned events sound on, or a group of *adjacent* channels on the Synth channel list. But consider the following situation: There are 8 loudspeakers in a corridor as follows: L1 R1 L2 R2 L3 R3 L4 R4 As a person moves along the corridor one may like to pan sounds along successively through L1 -> L2 -> L3 -> L4 and another sound at the same time through R1 -> R2 -> R3 -> R4 This can easily be done with 2 PanAz processes, each addressing 4 adjacent channels in the Synth output array, the loudspeakers being arranged to correspond to channels as follows: [L1, L2, L3, L4, R1, R2, R3, R4]. But then what if one wants also to pan accross the two groups in the corridor, say between L2 and R2? Is it possible to make say Pan2, address specifically L2 and R2, which lie apart in the channel list? The workaround would be to use the same PanAz arrangement and set the pan level appropriately to address only the channels needed, but this is obviously inflexible, inconvenient and CPU-intensive. Iannis Zannos BTW. MusicTechnology Swiki is down right now because the server at the University was moved to another room. As soon as it becomes possible, I will log in remote and restart the Swiki. Sorry about the inconvenience. - ---------- >From: James McCartney <---@---.---> >To: sc-users@lists.io.com >Subject: Re: Simulating MIDI input >Date: Sat, 15 May 1999 11:19 PM > >At 2:21 PM -0600 5/15/99, rkuivila@mail.wesleyan.edu wrote: > >>If there were some kind of callback facility for input handling of ANY >>sort (i.e., tablet, MIDI, ASCII keyboard), users could write this >>themselves. >>Basically, I am looking for an ExternalControlSourceAction routine in >>the class ExternalControl and something similar for ASCII keyboard input. >>This would default to DefaultControlSourceAction, which would be whatever >>normally happens. > >While this would be nice, it would make external control sources, >which are now very efficient, have to run byte codes every time >they change which would be rather inefficient. > >What happens now is that MIDI, Mouse and Tablet control input is >stored in tables. When an external control source or a GUI view >needs to get the data it looks it up in the tables. Both very fast. > >For remapping you'd have to fifo a message to the interpreter, >the interpreter would dequeue the message, run the corresponding >function byte codes, get the result and put it in the tables. >This would require a new set of fifos. Now there are fifos >between the GUI and the synth engine, but MIDI is a different >asynchronous process and would require new fifos. This would mean >that the virtual machine would have to check more fifos all the time >even if there is no data coming in, this costs CPU time. > >It would have to fifo all MIDI data coming in because you cannot >examine virtual machine data from any other process than the virtual >machine, because it may be in an indeterminate state. Therefore >the MIDI interrupt cannot check to see if it can just put it directly >in the table because there is no remapping function, it has to fifo it. > > --- 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 #40 *****************************