From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #29 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, March 3 1999 Volume 01 : Number 029 ---------------------------------------------------------------------- Date: Mon, 22 Feb 1999 17:34:39 +0000 From: finer@easynet.co.uk Subject: re re delay feedback James , Thanks for the reply to my problem - thing is I don't understand quite how the two delay lines are feeding back into each other : You said : To get the output the way you want is easy. I liked the ping pong better though.. ( scope({ var buffer1,buffer2, input, delayedSignal1,delayedSignal2, mixedSignal; var f, d1, d2; f = MouseY.kr(60,1000); buffer1 = Signal.new(Synth.sampleRate * 0.3); buffer2 = Signal.new(Synth.sampleRate * 0.3); input = SinOsc.ar(Lag.kr(LFSaw.kr(MouseX.kr(0.1,5),f,f), 0.1),0,0.25); delayedSignal1 = TapN.ar(buffer1, 0.319); delayedSignal2 = TapN.ar(buffer2, 0.212); mixedSignal = [(delayedSignal1 * 0.4) , (delayedSignal2*0.5) + input]; #d2, d1 = DelayWr.ar([buffer2,buffer1], mixedSignal*0.75); input + d2 }) ) How is some of the output of delayedSignal1 going to delayedSignal2 and how is some of the output of delayedSignal2 going to delayedSignal1 ? I agree that ping pong is better though the above improves with adding mixedSignal to the output. I'm just intrigued as to how to do this double delay thing with a bit of the output of each feeding into the other. Thanks, Jem ------------------------------ Date: Sat, 20 Feb 1999 01:11:20 +0000 From: richard james <---@---.---> Subject: Morphing? Hello, Has anybody managed or tried to morph sound files? Or written any patches using FFT on sound files rather than the line-in? Richard. ------------------------------ Date: Tue, 23 Feb 1999 08:39:20 -0600 From: James McCartney <---@---.---> Subject: [FWD] Re: Morphing? From: Martin Robinson <---@---.---> Subject: Re: Morphing? This patch does FFT 'morphing' on sound files. You can also change the loop points of the files and pitch-shift them. Also one sound file goes through an LPF before the FFT and the other through an HPF, this, other than adding another process, helps reduce booming when the two files have similar spectra. ( var w; var aFilename, bFilename; var aSound, bSound; var aSignal, bSignal; aFilename = ":Sounds:gongHit"; bFilename = ":Sounds:floating_1"; aSound = SoundFile.new; bSound = SoundFile.new; if (aSound.read(aFilename) && bSound.read(bFilename), { aSignal = aSound.data.at(0); bSignal = bSound.data.at(0); Synth.play({ arg synth; var as, bs; var af, bf; var xFader; var aSpeed, bSpeed; var aEnd, bEnd; var speedLimit = 10; var fftsize, numffts, fftoffsets, window, cosineTable; var srca, srcb, srcc, srcd; var ffta, fftb, fftab, fftc, fftd, fftcd; var ifftab, ifftcd; var lagger; var output; w = GUIWindow.new("Spectral Crossfade Two Sound Files", Rect.newBy( 447, 67, 560, 167 )); as = SliderView.new( w, Rect.newBy( 27, 21, 128, 20 ), "SliderView", 1, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy( 159, 21, 128, 20 ), "Volume A"); af = SliderView.new( w, Rect.newBy( 27, 45, 128, 20 ), "SliderView", 20, 20, 20000, 0, 'exponential'); StringView.new( w, Rect.newBy( 159, 45, 128, 20 ), "HPF A"); bs = SliderView.new( w, Rect.newBy( 27, 69, 128, 20 ), "SliderView", 0, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy( 159, 69, 128, 20 ), "Volume B"); bf = SliderView.new( w, Rect.newBy( 27, 93, 128, 20 ), "SliderView", 20000, 20, 20000, 0, 'exponential'); StringView.new( w, Rect.newBy( 159, 93, 128, 20 ), "LPF B"); xFader = SliderView.new( w, Rect.newBy( 27, 119, 128, 20 ), "SliderView", 0, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy( 159, 119, 128, 20 ), "X Fader"); aSpeed = SliderView.new( w, Rect.newBy( 268, 21, 128, 20 ), "SliderView", 1, 1/speedLimit, speedLimit, 0, 'exponential'); StringView.new( w, Rect.newBy( 400, 21, 128, 20 ), "Speed A"); aEnd = SliderView.new( w, Rect.newBy( 268, 45, 128, 20 ), "SliderView", aSignal.size-2, 1, aSignal.size-2, 0, 'linear'); StringView.new( w, Rect.newBy( 400, 45, 128, 20 ), "Loop End A"); bSpeed = SliderView.new( w, Rect.newBy( 268, 69, 128, 20 ), "SliderView", 1, 1/speedLimit, speedLimit, 0, 'exponential'); StringView.new( w, Rect.newBy( 400, 69, 128, 20 ), "Speed B"); bEnd = SliderView.new( w, Rect.newBy( 268, 93, 128, 20 ), "SliderView", bSignal.size-2, 1, bSignal.size-2, 0, 'linear'); StringView.new( w, Rect.newBy( 400, 93, 128, 20 ), "Loop End B"); lagger = SliderView.new( w, Rect.newBy( 268, 117, 128, 20 ), "SliderView", 0.01, 0.1, 100, 0, 'exponential'); StringView.new( w, Rect.newBy( 400, 117, 128, 20 ), "Lagger"); xFader.action_({ as.value = (1 - xFader.value).sqrt; bs.value = xFader.value.sqrt; }); numffts = 2; // number of overlapped FFTs fftsize = 4096; // length of FFT buffer // make offsets for staggering overlapped FFTs fftoffsets = Array.series(numffts, 0, fftsize/numffts); window = Signal.welchWindow(fftsize); // make a signal //analysis/synthesis window cosineTable = Signal.fftCosTable(fftsize); // make cosine table required //for FFT srca = HPF.ar(PlayBuf.ar(aSignal, aSound.sampleRate, aSpeed.kr(lagger.kr), 0, 0, aEnd.kr(lagger.kr), as.kr(lagger.kr)), af.kr(lagger.kr)); srcb = LPF.ar(PlayBuf.ar(bSignal, bSound.sampleRate, bSpeed.kr(lagger.kr), 0, 0, bEnd.kr(lagger.kr), bs.kr(lagger.kr)), bf.kr(lagger.kr)); ffta = FFT.ar(fftsize, fftoffsets, cosineTable, window, nil, srca, 0.0); fftb = FFT.ar(fftsize, fftoffsets, cosineTable, window, nil, srcb, 0.0); fftab = ffta * fftb; ifftab = IFFT.ar(fftsize, fftoffsets, cosineTable, nil, window, fftab.real, fftab.imag); output = Mix.ar([ (Mix.ar(ifftab.real)/numffts)* (max((as.kr(lagger.kr)+bs.kr(lagger.kr)/2)- (as.kr(lagger.kr)-bs.kr(lagger.kr)).abs, 0).sqrt)*2, // the mutant AB DelayN.ar(srca * ((max(as.kr(lagger.kr), bs.kr(lagger.kr))- bs.kr(lagger.kr)) ** 2 / 2), fftsize/Synth.sampleRate, fftsize/Synth.sampleRate), // file A DelayN.ar(srcb * ((max(as.kr(lagger.kr), bs.kr(lagger.kr))- as.kr(lagger.kr)) ** 2 / 2), fftsize/Synth.sampleRate, fftsize/Synth.sampleRate) // file B ]); Compander.ar(output, output, 0.5, 1, 0.1, 0.01, 0.01); }); w.close; },{ ("file(s) not found.\n").post }); ) - -------------------- Martin Robinson Sonic Arts Middlesex University - ---------- >From: richard james <---@---.---> >To: sc-users@lists.io.com >Subject: Morphing? >Date: Sat, Feb 20, 1999, 1:11 am > > Hello, > > Has anybody managed or tried to morph sound files? > Or written any patches using FFT on sound files rather than the line-in? > > Richard. ------------------------------ Date: Wed, 24 Feb 1999 12:29:56 +1100 From: Garth Paine <---@---.---> Subject: Mouse to MIDI Hi all, I am trying to convert the MouseX and MouseY input to the following example into MIDIMostRecentNote and MIDIMostRecentVelocity inputs so tht I can play the patch via MIDI input. My problem is that I don't get the same range of modulation from MIDIMostRecentVelocity as I get from MouseY. I think I have scaled them both the same, however I am not getting the modulation range from the MIDI version - what have I done wrong? what do I need to change? ////////////////////////////////////////////////////////////////////////// ( // phase modulation with slow beats // mouse x controls random freq of new events // mouse y controls modulation index { var n, mx, my; n = 4; // number of simultaneous events mx = MouseX.kr(100, 6000, 'exponential'); my = MouseY.kr(0, 2); OverlapTexture.ar({ var a, f, x; x = mx.poll; a = 0; 3.do({ f = x.rand; a = FSinOsc.ar([f, f+1.0.rand2], my, a); }); f = x.rand; SinOsc.ar([f, f+1.0.rand2], a, 0.1) }, 4, 4, n, 2, nil) }.play ) ////////////////////////////////////////////////////////////////////////// ( // MIDI Version // phase modulation with slow beats // MIDIMostRecentNote controls random freq of new events // MIDIMostRecentVelocity controls modulation index { var n, mx, my; n = 4; // number of simultaneous events mx = MIDIMostRecentNote.kr(1, 100, 6000, 'linear'); my = MIDIMostRecentVelocity.kr(1, 0, 2,'exponential', 200); OverlapTexture.ar({ var a, f, x; x = mx.poll; a = 0; 3.do({ f = x.rand; a = FSinOsc.ar([f, f+1.0.rand2], my, a); }); f = x.rand; SinOsc.ar([f, f+1.0.rand2], a, 0.1) }, 4, 4, n, 2, nil) }.play ) ////////////////////////////////////////////////////////////////////////// Cheers, Garth See information about my new immersive interactive sound installations http://creativeaccess.com.au/~garth/ ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., ------------------------------ Date: Tue, 23 Feb 1999 19:52:04 -0600 From: James McCartney <---@---.---> Subject: Re: Mouse to MIDI At 7:29 PM -0600 2/23/99, Garth Paine wrote: >Hi all, > >I am trying to convert the MouseX and MouseY input to the following example >into MIDIMostRecentNote and MIDIMostRecentVelocity inputs so tht I can >play the patch via MIDI input. My problem is that I don't get the same >range of modulation from MIDIMostRecentVelocity as I get from MouseY. I >think I have scaled them both the same, however I am not getting the >modulation range from the MIDI version - what have I done wrong? what do I >need to change? > mx = MouseX.kr(100, 6000, 'exponential'); > my = MouseY.kr(0, 2); > mx = MIDIMostRecentNote.kr(1, 100, 6000, 'linear'); > my = MIDIMostRecentVelocity.kr(1, 0, 2,'exponential', 200); You changed the warp argument on both of them. You cannot have zero as the minval or maxval of an exponential warp because there is no power to which you can raise zero to in order to get a positive number. For the same reason, the minval and maxval must have the same sign when using exponential warp. (You can't get a negative number by raising a positive number to any power.) You could go back to the original mappings: mx = MIDIMostRecentNote.kr(1, 100, 6000, 'exponential'); my = MIDIMostRecentVelocity.kr(1, 0, 2); --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Wed, 24 Feb 1999 19:41:36 +1100 From: Garth Paine <---@---.---> Subject: Re: Mouse to MIDI James wrote, >You changed the warp argument on both of them. > >You cannot have zero as the minval or maxval of an >exponential warp because there is no power to which you >can raise zero to in order to get a positive number. > >For the same reason, the minval and maxval must have the same sign >when using exponential warp. (You can't get a negative number by >raising a positive number to any power.) > >You could go back to the original mappings: > > mx = MIDIMostRecentNote.kr(1, 100, 6000, 'exponential'); > my = MIDIMostRecentVelocity.kr(1, 0, 2); Thank you - I am pleased to be at least on the right track Cheers, Garth See information about my new immersive interactive sound installations http://creativeaccess.com.au/~garth/ ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., ------------------------------ Date: Wed, 24 Feb 1999 16:07:05 -0500 From: "crucial" <---@---.---> Subject: Re: [FWD] Re: Morphing? btw. the FFT help file has a mistake in the Scope.window line : Scope.window("FFT", fftsize, fft.magnitudeApx); was meant to read .... Scope.window("FFT", fftsize, nil,fft.magnitudeApx); ^^^ I must say I don't understand the magnitudeApx, and I still have a dim understanding of convolving. It sounds like string theory to me. Anyone know any good FFT tutorials/papers online ? __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Wed, 24 Feb 1999 17:01:30 -0600 From: James McCartney <---@---.---> Subject: Re: [FWD] Re: Morphing? At 3:07 PM -0600 2/24/99, crucial wrote: >btw. the FFT help file has a mistake in the Scope.window line : > > >Scope.window("FFT", fftsize, fft.magnitudeApx); > >was meant to read .... > >Scope.window("FFT", fftsize, nil,fft.magnitudeApx); Thanks. > >I must say I don't understand the magnitudeApx, and I still magnitudeApx is a faster form of finding the magnitude. FFT produces a complex number as output whose real and imaginary parts are unit generators. The magnitudeApx unit generator calculates the magnitude of the complex FFT output. However it does it using an approximation. Instead of the computationally expensive sqrt((x*x) + (y*y)) it does this: abs(x) + abs(y) - ((sqrt(2) - 1) * min(abs(x), abs(y)) The second version does not require a square root operation, so is much faster and produces a result with a maximum error of 1.28 dB --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 25 Feb 1999 01:55:02 +0100 (CET) From: Arie van Schutterhoef <---@---.---> Subject: Re: [FWD] Re: Morphing? >Anyone know any good FFT tutorials/papers online ? Have a look at: http://www.intersrv.com/~dcross/fft.html http://bass.gmu.edu/~mazel/fourier/four1.htm <<<<<<<<<<<<<<<<<<<<<<<<<-////||\\\\->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 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: Thu, 25 Feb 1999 13:07:51 -0500 (EST) From: Tecumseh Fitch <---@---.---> Subject: Magnitude On Wed, 24 Feb 1999, James McCartney wrote: > magnitudeApx is a faster form of finding the magnitude. > FFT produces a complex number as output whose real and imaginary > parts are unit generators. The magnitudeApx unit generator calculates > the magnitude of the complex FFT output. However it does it using an > approximation. Instead of the computationally expensive > > sqrt((x*x) + (y*y)) > > it does this: > > abs(x) + abs(y) - ((sqrt(2) - 1) * min(abs(x), abs(y)) Is there a fast way to produce just the lower half of the magnitude spectrum (i.e. DC to Nyquist)? Or to plot the mag. spectrum vertically in gray scale, in spectrographic format? * Wm. Tecumseh Fitch, Ph.D. ************************************************** * Post-doctoral Fellow, Harvard/MIT Speech & Hearing Sciences Program * Rm 982 Wm. James Hall, 33 Kirkland St. Cambridge MA 02138 * (617) 496-6575 (ofc), (617) 496-8355 (fax), tec@wjh.harvard.edu ************ ------------------------------ Date: Thu, 25 Feb 1999 16:51:21 -0700 From: "David Cottle" <---@---.---> Subject: Drive path Hi, I'm not even sure how to ask this question. We are working with SC on a server using At Ease. We want to be able to use Synth.write, but the files would be saved in the SC folder, or on the server where our students don't have access. How can we specify a drive? - -- ><><><><><><><><><><><> David Cottle composition, notation, contra lime@uiuc.edu ------------------------------ Date: Thu, 25 Feb 1999 18:14:41 -0600 From: James McCartney <---@---.---> Subject: Re: Drive path At 5:51 PM -0600 2/25/99, David Cottle wrote: >Hi, > >I'm not even sure how to ask this question. > >We are working with SC on a server using At Ease. We want to be able to use >Synth.write, but the files would be saved in the SC folder, or on the server >where our students don't have access. How can we specify a drive? SuperCollider uses normal Macintosh colon separated path names. Absolute paths "DriveName:Folder Name:Another Folder Name:File Name" Relative paths start with a colon. ":a Folder in SC directory:File Name" // Example: write a 2 second pink noise file to my HD's directory Synth.write({ PinkNoise.ar(0.2) }, 2, "Macintosh HD:pink.aiff"); --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Thu, 25 Feb 1999 18:17:04 -0600 From: James McCartney <---@---.---> Subject: Re: Magnitude At 12:07 PM -0600 2/25/99, Tecumseh Fitch wrote: >On Wed, 24 Feb 1999, James McCartney wrote: > >> magnitudeApx is a faster form of finding the magnitude. >> FFT produces a complex number as output whose real and imaginary >> parts are unit generators. The magnitudeApx unit generator calculates >> the magnitude of the complex FFT output. However it does it using an >> approximation. Instead of the computationally expensive >> >> sqrt((x*x) + (y*y)) >> >> it does this: >> >> abs(x) + abs(y) - ((sqrt(2) - 1) * min(abs(x), abs(y)) > >Is there a fast way to produce just the lower half of the magnitude >spectrum (i.e. DC to Nyquist)? Once you've done the FFT, the magnitude approximation is cheap. There's not much point in making a special operator for that. >Or to plot the mag. spectrum vertically in >gray scale, in spectrographic format? no. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 26 Feb 1999 12:31:44 +1100 From: Garth Paine <---@---.---> Subject: Re: Mouse to MIDI.2 Hi James et al, Further to my questions about the MIDI control of the patch bellow. I would like to develop an interactive sound installation that will track a number of people at once. I therefore want to develop the example bellow into a form that can take 4 to 6 seperate input co-ordinates independantly and produce simultaneous sound output. This would mean that a group of people within the space can play the patch as a polophonic instrument. How can I achieve this? I also wonder how MIDI gets to SC. Can I address OMS from SC. I can't find anything in the documentation about how the MIDI data actually gets to SC. I have been wondering about using the OMS IAC gus to send MIDI between MAX and SC on the same machine. >////////////////////////////////////////////////////////////////////////// > >( >// MIDI Version >// phase modulation with slow beats >// MIDIMostRecentNote controls random freq of new events >// MIDIMostRecentVelocity controls modulation index >{ > var n, mx, my; > n = 4; // number of simultaneous events > > mx = MIDIMostRecentNote.kr(1, 100, 6000, 'exponential'); > my = MIDIMostRecentVelocity.kr(1, 0, 2,'linear'); > OverlapTexture.ar({ > var a, f, x; > x = mx.poll; > a = 0; > 3.do({ > f = x.rand; > a = FSinOsc.ar([f, f+1.0.rand2], my, a); > }); > f = x.rand; > SinOsc.ar([f, f+1.0.rand2], a, 0.1) > }, 4, 4, n, 2, nil) >}.play >) > >////////////////////////////////////////////////////////////////////////// Cheers, Garth See information about my new immersive interactive sound installations http://creativeaccess.com.au/~garth/ ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., ------------------------------ Date: 25 Feb 99 21:22:14 EST From: Lily.Anne.N.Perez@Dartmouth.EDU (Lily Anne N. Perez) Subject: Re: looping and OrcScore Hi, James. Two questions: 1.) How can we make a sound file loop just once? 2.) Does OrcScore accept variables? We have tried putting a variable for amp and we get errors. thanks. AnNe ------------------------------ Date: Thu, 25 Feb 1999 20:38:27 -0600 From: James McCartney <---@---.---> Subject: Re: looping and OrcScore At 8:22 PM -0600 2/25/99, Lily Anne N. Perez wrote: >>>> Hi, James. Two questions: 1.) How can we make a sound file loop just once? 2.) Does OrcScore accept variables? We have tried putting a variable for amp and we get errors. thanks. AnNe <<<<<<<< Like I said in email, post your code. I can't tell what you are trying to do.. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: 25 Feb 99 22:36:42 EST From: Lily.Anne.N.Perez@Dartmouth.EDU (Lily Anne N. Perez) Subject: Re: OrcScore Here is the code using OrcScr. Does the score accept variables? ( // an orchestra and score player e = Env.new([0,1,0.2,0],[0.004, 0.2, 1], -2); var testnote = 60; Synth.scope({ OrcScore.ar( // the orchestra [ { arg spawn, i, synth, deltaTime, instrumentNum, note, amp = 0.4; EnvGen.ar(e, FSinOsc.ar(note.midicps, amp)); } ], // the score #[ // deltaTime, instrumentNum, ... [0.1, 0, testnote], [0.1, 0, 62], [0.1, 0, 64], [0.1, 0, 65] ], 1, nil, 2) }) ) ------------------------------ Date: Thu, 25 Feb 1999 22:38:39 -0600 From: James McCartney <---@---.---> Subject: Re: OrcScore At 9:36 PM -0600 2/25/99, Lily Anne N. Perez wrote: >Here is the code using OrcScr. Does the score accept variables? > #[ // deltaTime, instrumentNum, ... ^ get rid of this # #[ ... ] indicates a literal array built at compile time and can only consist of literals, not variables. If you remove the # then the array is built at run time and may contain any valid expression. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 26 Feb 1999 12:56:48 -0500 From: "crucial" <---@---.---> Subject: Yet More ways to switch things on and off... A seemingly simple solution : ({ var w, dubsize=4,a,d,fx,s,fxIn; // 4 stereo sets of sounds fxIn=Array.fill(dubsize,{FSinOsc.ar([800,1000].rand+100,0.0001)}); w = GUIWindow.new("dub", Rect.newBy( 222, 77, dubsize*40, 120 )) .backColor_(rgb(43,54,56)); // switches to turn on and off each set s=Array.fill(dubsize, {arg i; CheckBoxView.new(w, Rect.newBy(i*29 + 29, 87,18,19),"",1,0,1,0) .backColor_(rgb(225,19,15)); }); // attack settings for each set a=Array.fill(dubsize, {arg i; NumericalView.new( w, Rect.newBy( i*29 + 25, 20 , 27, 19 ), "", 0.02, 0, 10000, 0); }); // decay settings for each set d=Array.fill(dubsize, {arg i; NumericalView.new( w, Rect.newBy( i*29 + 25, 43 , 27, 19 ), "", 0.3, 0, 10000, 0); }); Mix.ar(fxIn.collect({arg it,i; it * Decay2.kr( s.at(i).kr, //switch a.at(i).kr, // attack d.at(i).kr) //decay })); }.play ) The CheckBoxes switch the sounds (the ever popular 800.rand FSin test signal) on and off and allow variable attack and decay. But the decay setting seems to also act as a multiplier ! Different decay settings change the overall amplitude. I did get this to work using Slew.kr(s.at(i).kr, a.at(i).kr, d.at(i).kr) with slew values of 10,000 to 100 But Decay2 has the feel I want. __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Sat, 27 Feb 1999 22:02:26 -0600 From: James McCartney <---@---.---> Subject: Re: Yet More ways to switch things on and off... At 11:56 AM -0600 2/26/99, crucial wrote: >But the decay setting seems to also act as a multiplier ! >Different decay settings change the overall amplitude. Decay is a kind of leaky integrator. Decay is meant to be used with impulses. You want to use Lag. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sun, 28 Feb 1999 17:06:42 +1100 From: Garth Paine <---@---.---> Subject: Mouse to MIDI.2 again I thouht I'd post this for asecond time. It is clearly not of much interest to the list, but it is of great interest to me, so any guidance - ie look at the docs for .... or try using ... would be very useful. I also need to know if OMS is accessible in SC2x - I want to use the IAC bus in OMS to send MIDI from MAX to SC2x. Further to my questions about the MIDI control of the patch bellow. I would like to develop an interactive sound installation that will track a number of people at once. I therefore want to develop the example bellow into a form that can take 4 to 6 seperate input co-ordinates independantly and produce simultaneous sound output. This would mean that a group of people within the space can play the patch as a polophonic instrument. How can I achieve this? I also wonder how MIDI gets to SC. Can I address OMS from SC. I can't find anything in the documentation about how the MIDI data actually gets to SC. I have been wondering about using the OMS IAC gus to send MIDI between MAX and SC on the same machine. >////////////////////////////////////////////////////////////////////////// > >( >// MIDI Version >// phase modulation with slow beats >// MIDIMostRecentNote controls random freq of new events >// MIDIMostRecentVelocity controls modulation index >{ > var n, mx, my; > n = 4; // number of simultaneous events > > mx = MIDIMostRecentNote.kr(1, 100, 6000, 'exponential'); > my = MIDIMostRecentVelocity.kr(1, 0, 2,'linear'); > OverlapTexture.ar({ > var a, f, x; > x = mx.poll; > a = 0; > 3.do({ > f = x.rand; > a = FSinOsc.ar([f, f+1.0.rand2], my, a); > }); > f = x.rand; > SinOsc.ar([f, f+1.0.rand2], a, 0.1) > }, 4, 4, n, 2, nil) >}.play >) > >////////////////////////////////////////////////////////////////////////// Cheers, Garth See information about my new immersive interactive sound installations http://creativeaccess.com.au/~garth/ ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., Cheers, Garth See information about my new immersive interactive sound installations http://creativeaccess.com.au/~garth/ ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., ------------------------------ Date: Sun, 28 Feb 1999 01:56:28 -0600 From: antiorp@tezcat.com (=cw4t7abs) Subject: [none] >I thouht I'd post this for asecond time. It is clearly not of much >interest to the list, but it i|s of great interest to me, so any guidance - >ie look at the docs for .... o|r try using ... would be very useful. |___|_________________________|__|___| Composer, Sound Designer | .. Interactives Designer | ... Interactive Installation Ar|tist .... Exhibition Consultant | | >I also wonder how MIDI gets to| SC. Can I address OMS from SC. I can't >find anything in the documenta|tion about how the MIDI data actually gets to >SC. I have been wondering abo|ut using the OMS IAC gus to send MIDI between >MAX and SC on the same machine|. | | 1zt | / | > / | > | | >Further to my questions about t|he MIDI control of the patch bellow. I >would like to develop an intera|ctive sound installation that will tr/ack a >number of people a\t once./I\ therefore want to dev/elop the example/ bellow >into a form that ca\n tak/e 4\to 6 seper/ate input/co-ordinates in/dependantly >and produce simultan\eou/s sou\nd outpu/t. This would mean that a\ group of >people within the spa\c/e can play the/ patch as/ a polophonic inst\ru/ment. >How >can I achieve this? / \ / / \/ \ / \ / / \ / \/ / \ / / \ / / \ / / \ / / \ / / \/ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ | | / >See information about my-new-immersive interactive sound installations > | | >,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. >. Composer, Sound Designer >.. Interactives Designer >... Interactive Installation Artist >.... Exhibition Consultant >.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., How can I achieve this? ------------------------------ Date: Sun, 28 Feb 1999 16:41:51 -0500 From: "crucial" <---@---.---> Subject: Re: Yet More ways to switch things on and off... >At 11:56 AM -0600 2/26/99, crucial wrote: > >>But the decay setting seems to also act as a multiplier ! >>Different decay settings change the overall amplitude. > >Decay is a kind of leaky integrator. Decay is meant to be >used with impulses. >You want to use Lag. Thanks, that's probably better than Slew for this. __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Mon, 1 Mar 1999 08:53:12 -0600 From: James McCartney <---@---.---> Subject: Re: Mouse to MIDI.2 again At 12:06 AM -0600 2/28/99, Garth Paine wrote: >Further to my questions about the MIDI control of the patch bellow. I >would like to develop an interactive sound installation that will track a >number of people at once. I therefore want to develop the example bellow >into a form that can take 4 to 6 seperate input co-ordinates independantly >and produce simultaneous sound output. This would mean that a group of >people within the space can play the patch as a polophonic instrument. How >can I achieve this? What about some variation of this kind of construction? : ( // each oscillator controlled by a different MIDI channel. { Mix.arFill(6, { arg i; SinOsc.ar( MIDIMostRecentNote.kr(i+1).midicps, 0, 0.1 ) }) }.play; ) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 01 Mar 1999 13:32:39 -0800 From: Mark Polishook <---@---.---> Subject: wacom tablets? Does anyone have preferences regarding a 9x12 Wacom table vs. a 12x12 tablet?...is one of the 2 sizes more preferable than the other for use with SuperCollider? Thanks in advance, Mark ------------------------------ Date: Tue, 2 Mar 1999 07:56:47 +1100 From: Garth Paine <---@---.---> Subject: Re: Mouse to MIDI.3 James Wrote, >What about some variation of this kind of construction? : > >( >// each oscillator controlled by a different MIDI channel. >{ > Mix.arFill(6, { arg i; > SinOsc.ar( > MIDIMostRecentNote.kr(i+1).midicps, > 0, > 0.1 > ) > }) >}.play; >) Thanks James - which documentation should I look at for more information on this? Cheers, Garth See information about my new immersive interactive sound installations http://creativeaccess.com.au/~garth/ ,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. . Composer, Sound Designer .. Interactives Designer ... Interactive Installation Artist .... Exhibition Consultant .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., ------------------------------ Date: Wed, 3 Mar 1999 10:23:55 +0200 From: laurson@amadeus.siba.fi (Mikael Laurson) Subject: If(mousex) I get the following error message after trying the "If(mousex)" example that James gave in a message 22.2.99. ERROR: Message '<<' not understood. RECEIVER: Instance of ControlIn ''{ (03B8D9EC, gc=00, fmt=00, flg=00, set=05) (var zone; // a function to create rectangular zones: zone = { arg func, boundsRect, x, y; Pause.ar(func, (x >= boundsRect.left) * (x << boundsRect.right) * (y >= boundsRect.top) * (y << boundsRect.bottom)) }; Synth.play({ var mx, my; mx = MouseX.kr; my = MouseY.kr; Mix.ar([zone.value({ PinkNoise.ar(0.2) }, Rect.new(0, 0, 0.5, 0.5), mx, my), zone.value({ FSinOsc.ar(700, 0.2) }, Rect.new(0.5, 0, 1, 0.5) , mx, my), zone.value({ LFSaw.ar(100, 0.1) }, Rect.new(0, 0.5, 0.5, 1) , mx,my), zone.value({ Formant.ar(21, 2100, 80, 0.2) }, Rect.new(0.5, 0.5, 1,1) , mx, my) ]); }) ) I am using the version SC2d29 f. Mikael ================================ Mikael Laurson Hollantilaisentie 1 A 2 00300 Helsinki 33 Finland E-mail: laurson@siba.fi ================================ ------------------------------ Date: Wed, 3 Mar 1999 09:37:28 -0600 From: James McCartney <---@---.---> Subject: Re: If(mousex) At 2:23 AM -0600 3/3/99, Mikael Laurson wrote: >I get the following error message after trying the "If(mousex)" example >that James >gave in a message 22.2.99. > >ERROR: >Message '<<' not understood. > Pause.ar(func, > (x >= boundsRect.left) * (x << boundsRect.right) > * (y >= boundsRect.top) * (y << boundsRect.bottom)) ^^ Those are supposed to be single less than signs. They probably got doubled by some email software along the way. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Wed, 03 Mar 1999 14:21:45 -0500 From: "crucial" <---@---.---> Subject: [sc] A bug...? var r; r=[0,1,2,3,4]; r.clipAt(2).postln; r.clipAt(6).postln; // executing this.. // first time after compiling class library 2 0 // subsequent times //2 //instance of Method Interpreter : functionCompileContext (031990A0) // one other time it gave me an instance of EnvGen __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Wed, 03 Mar 1999 12:23:15 -0800 From: Mark Polishook <---@---.---> Subject: wacom tablets? James and all, Regarding WACOM tablet size....has anyone developed a preference for one size over another (9x12 as opposed to 12x12)? OR, is the largest available tablet size preferable? ...In other words, is SC optimized in any way to work with one size vs. another? Thanks in advance, Mark ------------------------------ Date: Wed, 3 Mar 1999 15:24:30 -0400 From: rkuivila@mail.wesleyan.edu Subject: Re: [sc] A bug...? Hi there, There are definitely some problems with Array . Your example will work if you make the array a List as follows: var r; r=List[0,1,2,3,4]; r.clipAt(2).postln; r.clipAt(6).postln; RJK PS: I actually sent an email about this some time ago. >var r; > > >r=[0,1,2,3,4]; > > >r.clipAt(2).postln; > >r.clipAt(6).postln; > > > > >// executing this.. >// first time after compiling class library >2 >0 > >// subsequent times >//2 >//instance of Method Interpreter : functionCompileContext (031990A0) > > > >// one other time it gave me an instance of EnvGen > > > > >__________________________________________ :\\_______ > http://crucial-systems.com > >__________________________________________ :\\_______ ------------------------------ Date: Wed, 3 Mar 1999 14:26:22 -0600 From: James McCartney <---@---.---> Subject: Re: [sc] A bug...? Yup that was a bug. now fixed. thanks. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Wed, 3 Mar 1999 14:45:11 -0600 From: James McCartney <---@---.---> Subject: Re: wacom tablets? At 2:23 PM -0600 3/3/99, Mark Polishook wrote: >James and all, > >Regarding WACOM tablet size....has anyone developed a preference for one size >over another (9x12 as opposed to 12x12)? > >OR, is the largest available tablet size preferable? > >...In other words, is SC optimized in any way to work with one size vs. another? I have the largest 12x18 size. It is nice, but it IS big. You need a lot of table space for it. I went for the larger size for the higher resolution and so that I could use two pointers comfortably. The 12x12 and 12x18 use a serial port, so you can't have a modem, printer, and tablet hooked up at once. The 9x12 uses the ADB port. Some of the smaller ones do not allow two pointers at once I think, but I was unable to find this out from the web site. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Wed, 3 Mar 1999 14:51:47 -0600 From: James McCartney <---@---.---> Subject: Re: [sc] A bug...? At 1:24 PM -0600 3/3/99, rkuivila@mail.wesleyan.edu wrote: >Hi there, > > There are definitely some problems with Array . Your example will work if >you make the array a List as follows: Do you know of other problems with Array? --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Wed, 03 Mar 1999 13:25:36 -0800 From: Mark Polishook <---@---.---> Subject: Re: wacom tablets? Thanks James. > At 2:23 PM -0600 3/3/99, Mark Polishook wrote: > >James and all, > > > >Regarding WACOM tablet size....has anyone developed a preference for > one size > >over another (9x12 as opposed to 12x12)? > > > >OR, is the largest available tablet size preferable? > > > >...In other words, is SC optimized in any way to work with one size > vs. another? > > I have the largest 12x18 size. It is nice, but it IS big. You need a > lot of > table space for it. I went for the larger size for the higher > resolution and so that I could use two pointers comfortably. > > The 12x12 and 12x18 use a serial port, so you can't have a modem, > printer, > and tablet hooked up at once. The 9x12 uses the ADB port. > > Some of the smaller ones do not allow two pointers at once I think, > but I was unable to find this out from the web site. > > --- 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 #29 *****************************