From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #376 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, November 7 2001 Volume 01 : Number 376 ---------------------------------------------------------------------- Date: Mon, 29 Oct 2001 23:30:30 +0100 From: Arie van Schutterhoef <---@---.---> Subject: Re: SC Overload Problems? > i was riding at 120% for a while. - -I always thought this was the providence of only Max/MSP users... But like we all know, reality is a better test-case for all the things we're not willing to be prepared for... Or:..watch your cpu overload; it always arrives too early! AvS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................. ^ Arie van Schutterhoef | arsche@xs4all.nl ^_北北北北北北北北北北北盻_""""""""""""""""""""""""""""""""" | ` |Schreck Ensemble http://www.xs4all.nl/~schreck/ | ` |# -laboratory for live electro-acoustic music- # | ` |Tel: 00-31-71-5612287 Fax: 00-31-70-3859268 | *========================================================++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................. ------------------------------ Date: Mon, 29 Oct 2001 18:05:49 -0600 From: Ethan Bakshy <---@---.---> Subject: Re: OT audiosport quattro rfi on 10/28/01 11:38 PM, Thomas Miley at tmiley@prodigy.net wrote: >Excuse me for asking a question that may have been answered, but does anyone >have any experience using the audiosport quattro? Does SC support it? >http://www.midiman.net/products/m-audio/quattro.htm I have a Quattro... It's designed to support ASIO, so SC supports it pretty nicely. I haven't had many issues with SC and the quattro either. You just need to keep updated on the Quattro drivers because the earlier releases were not too great (slow + unstable :-/ ), but every update released seems to help out quite a bit with any problems that I do run into on occasion. - -ethan ------------------------------ Date: Mon, 29 Oct 2001 22:04:44 -0500 From: felix <---@---.---> Subject: Re: SC Overload Problems? on 10/29/01 5:30 PM, Arie van Schutterhoef at arsche@xs4all.nl said: >> i was riding at 120% for a while. > -I always thought this was the providence of only > Max/MSP users... > But like we all know, reality is a better test-case > for all the things we're not willing to be prepared for... > Or:..watch your cpu overload; it always arrives too early! > > AvS shit i've got up to 3000% and lived to keep playing the set. its probably a measurement of the remaining stack when the interrupt comes back around. i've been able to keep playing with the cpu bouncing around 100% + without audio suffering too bad. its like a junky with drugs in front of his face..."awww c'mon give me the dusty_powerline.intg.4" ------------------------------ Date: Mon, 29 Oct 2001 22:10:44 -0500 From: felix <---@---.---> Subject: Re: Using an Identity Dictionary with Voicer no that's a good way of doing it. it was mentioned a while back (by me) as a way to map input values to functions. if it finds a nil, and values it, its still nil, and that returns from a spawn as nil, which results in no event. that's fine. no sound for that key. on 10/28/01 12:26 PM, Mark Bartscher at markbartscher@hotmail.com said: > Is there an efficient way of assigning incoming midinotes to arrays, without > a long series of if thens? > > For example: > > if (note == 60, {function}) > > With incoming computer keys, i just map them directly in an > IdentityDictionary...i.e > > $1 -> [0,1,0,1] > > is there anyway to get the incoming midinotes on the left side of an > IdentityDictionary? > > If this is a clunky way of doing it...any better ideas? > > Mark B. > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > ------------------------------ Date: Tue, 30 Oct 2001 16:11:45 +1100 From: NF <---@---.---> Subject: Re: OT: X 10.1 NF: Am I right in assuming that SC, nor Max/MSP nor a host of other apps. can yet run in Classic? I tried SC and it asked for Authorisation - when I clicked the button the whole app. split the scene poste haste. Is this my problem or usual behaviour? NIGEL FRAYNE >installed OS X 10.1 over the weekend. > >i'd definitely recommend the upgrade to anyone currently using OS X. > >lots faster. some new features. my printer actually works now. (without having to install new drivers... whoopee) things work. > >ch. ------------------------------ Date: Tue, 30 Oct 2001 00:39:51 -0500 From: christian adam hresko <---@---.---> Subject: Re: OT: X 10.1 NF wrote: > NF: Am I right in assuming that SC, nor Max/MSP nor a host of other apps. can yet run in Classic? I tried SC and it asked for Authorisation - when I clicked the button the whole app. split the scene poste haste. Is this my problem or usual behaviour? > > NIGEL FRAYNE > > >installed OS X 10.1 over the weekend. > > > >i'd definitely recommend the upgrade to anyone currently using OS X. > > > >lots faster. some new features. my printer actually works now. (without having to install new drivers... whoopee) things work. > > > >ch. i can't get SC to recognize any sound drivers. ASIO doesn't work, and soundmangler just disappears. i'd wait until SC3 is fully developed. or SC server. however that works out... (not sure if there's gonna be an SC3 and SC server, or just one or the other) i'm still not sure why reaktor works. that's the only (realtime) audio app i can get working under classic. ch. ------------------------------ Date: Tue, 30 Oct 2001 10:36:44 +0000 From: gareth.ormerod@bdhtbwa.co.uk Subject: phase_shifting i am looking to hopefully extend the following patch, included in the sc examples to play ideally four different samples. As an sc beginner i am a bit daunted as to where to start. Any help regarding the best method of approach would be much appreciated. thanks in advance gareth ( var filename, sound, signal, n; n = 6; filename = ":Sounds:floating_1"; sound = SoundFile.new; if (sound.read(filename), { signal = sound.data.at(0); Synth.play({ Mix.arFill(n, { arg i; Pan2.ar( PlayBuf.ar(signal, sound.sampleRate, 1.0 + (0.013 * i), 0, 0, signal.size-2), 2.0/(1-n) * i + 1 ); }) / n; }); },{ (filename ++ " not found.\n").post }); ) ------------------------------ Date: Tue, 30 Oct 2001 14:43:14 +0100 From: Arie van Schutterhoef <---@---.---> Subject: Re: SC Overload Problems? >shit i've got up to 3000% and lived to keep playing the set. - -Doesn't sound to me like a healthy concert-practice... > without audio suffering too bad. - -It just depends on what your criteria is for this... AvS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................. ^ Arie van Schutterhoef | arsche@xs4all.nl ^_北北北北北北北北北北北盻_""""""""""""""""""""""""""""""""" | ` |Schreck Ensemble http://www.xs4all.nl/~schreck/ | ` |# -laboratory for live electro-acoustic music- # | ` |Tel: 00-31-71-5612287 Fax: 00-31-70-3859268 | *========================================================++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................. ------------------------------ Date: Tue, 30 Oct 2001 10:03:03 -0500 From: felix <---@---.---> Subject: Re: SC Overload Problems? on 10/30/01 8:43 AM, Arie van Schutterhoef at arsche@xs4all.nl said: >> shit i've got up to 3000% and lived to keep playing the set. > -Doesn't sound to me like a healthy concert-practice... it was an accident. normally i never go above 100%. > >> without audio suffering too bad. > -It just depends on what your criteria is > for this... i do mean no audible effect. but it scares the piss out of me. its certainly not my common practice. > > AvS ------------------------------ Date: Tue, 30 Oct 2001 10:03:03 -0500 From: felix <---@---.---> Subject: Re: SC Overload Problems? on 10/30/01 8:43 AM, Arie van Schutterhoef at arsche@xs4all.nl said: >> shit i've got up to 3000% and lived to keep playing the set. > -Doesn't sound to me like a healthy concert-practice... it was an accident. normally i never go above 100%. > >> without audio suffering too bad. > -It just depends on what your criteria is > for this... i do mean no audible effect. but it scares the piss out of me. its certainly not my common practice. > > AvS ------------------------------ Date: Tue, 30 Oct 2001 10:03:03 -0500 From: felix <---@---.---> Subject: Re: SC Overload Problems? on 10/30/01 8:43 AM, Arie van Schutterhoef at arsche@xs4all.nl said: >> shit i've got up to 3000% and lived to keep playing the set. > -Doesn't sound to me like a healthy concert-practice... it was an accident. normally i never go above 100%. > >> without audio suffering too bad. > -It just depends on what your criteria is > for this... i do mean no audible effect. but it scares the piss out of me. its certainly not my common practice. > > AvS ------------------------------ Date: Tue, 30 Oct 2001 11:02:13 -0600 From: James McCartney <---@---.---> Subject: Re: OT: X 10.1 on 10/29/01 11:39 PM, christian adam hresko at godpup@ix.netcom.com wrote: > i can't get SC to recognize any sound drivers. ASIO doesn't work, and > soundmangler just disappears. Apple: "on Mac OS X 10.1, Classic does not support sound input." - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Tue, 30 Oct 2001 20:48:16 +0100 From: Julian Rohrhuber <---@---.---> Subject: Re: phase_shifting >i am looking to hopefully extend the following patch, included in >the sc examples to play ideally four different samples. As an sc >beginner i am a bit daunted as to where to start. Any help regarding >the best method of approach would be much appreciated. thanks in >advance gareth > >( >var filename, sound, signal, n; >n = 6; >filename = ":Sounds:floating_1"; >sound = SoundFile.new; >if (sound.read(filename), { > signal = sound.data.at(0); > Synth.play({ Mix.arFill(n, { arg i; > Pan2.ar( > PlayBuf.ar(signal, sound.sampleRate, >1.0 + (0.013 * i), 0, 0, signal.size-2), > 2.0/(1-n) * i + 1 > ); > }) / n; > }); >},{ (filename ++ " not found.\n").post }); >) on http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/140 I put up a piece of code that does that. Also there is some utilitie classes that can be used for this kind of things. - -- ** ------------------------------ Date: Tue, 30 Oct 2001 18:07:51 -0600 From: matrix6k <---@---.---> Subject: Tomonori's simple editor a question involving messages - i think. i'm attempting to modify Tomonori's soundfile editor so that i can use two number boxes to set the exact selection of the soundfile. i'm trying to do this : setSelection.action = { a = startbox.value; b = endbox.value; sigViews.at(0).setSelection(a, b); }; I postln-ed 'a' and 'b', and they returned the correct values that were in the two numberboxes, but no worky. this works: setSelection.action = { a = startbox.value; b = endbox.value; sigViews.at(0).setSelection(1, 1000); }; if i just plug integers straight into it and ignore 'a' and 'b'. why ? i wonder if it's the numerical view settings (maybe they're kicking out floats?), or if i'm valuing a and b incorrectly ? also along the same application, i noticed that all the things you can do to the soundfile in Tom's editor are labeled 'in place' in the "Signal" sourcecode. i think i understand this, because something like .distort(0.1) returns a new signal... so it returns a new signal. i assume i need to overWrite the soundfile with the returned one ? is this correct ? thanks for any help. - -michael _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ------------------------------ Date: Tue, 30 Oct 2001 20:58:59 -0500 (EST) From: "Paul C. Koonce" <---@---.---> Subject: slope of controller I want to get the slope of a MIDI control signal. The code below should work, but doesn't even though it produces a signal related to the slope (slope with alternating zeros and interpolations). The errors look like they're related to the use of the K-rate controller even though I'm using K2A. Perhaps I'm misunderstanding what K2A does. The ugen "Slope" does the same thing. How would you do this? Paul Koonce Synth.scope({ var a, b, c ; a = MIDIController.kr(1,1,0,1,'linear'); b = K2A.ar( a ); c = FOS.ar(b, 1.0, -1.0,0.0) ; // OUTPUT SLOPE [b, c * 2000 ]; }, 1.0 ); ------------------------------ Date: Tue, 30 Oct 2001 21:08:11 -0600 From: James McCartney <---@---.---> Subject: Re: slope of controller If you changed this line perhaps what is happening would be more clear: a = MIDIController.kr(1,1,0,1,'linear',0); Now the lagTime is zero. MIDI control updates are intermittent giving a staircase function, not a continuously varying signal. So the slope is usually zero, unless you get a new value for the controller, which makes an impulse in the slope. With a nonzero lagtime the impulses decay, giving a saw effect. on 10/30/01 7:58 PM, Paul C. Koonce at koonce@phoenix.Princeton.EDU wrote: > > I want to get the slope of a MIDI control signal. The code below should > work, but doesn't even though it produces a signal related to the slope > (slope with alternating zeros and interpolations). The errors look like > they're related to the use of the K-rate controller even though I'm using > K2A. Perhaps I'm misunderstanding what K2A does. The ugen "Slope" does the > same thing. > > How would you do this? > > Paul Koonce > > Synth.scope({ > var a, b, c ; > a = MIDIController.kr(1,1,0,1,'linear'); > b = K2A.ar( a ); > > c = FOS.ar(b, 1.0, -1.0,0.0) ; // OUTPUT SLOPE > > [b, c * 2000 ]; > }, 1.0 ); > > > > - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Thu, 01 Nov 2001 20:29:47 +0000 From: "Fabs Mogini" <---@---.---> Subject: Pitch follower+Degreetokey Hi, I am using a theremine (through AudioIn) to trigger a sinewave with the Pitch object (simple). ////////////////////////////////////////////////////////////////////////// ( { var in, freq, hasFreq, amp, sig; in = Mix.ar(AudioIn.ar([1,2],1)); amp = Amplitude.kr(in, 0.1) thresh: 0.005; #freq, hasFreq = Pitch.kr(in); freq = freq.cpsmidi.round(1).midicps; FSinOsc.ar(freq,amp); }.play ) ////////////////////////////////////////////////////////////////////////// Now, I would like the AudioIn to trigger only certain notes from a mode (and not all the MIDI notes). I thought of using DegreeToKey to convert the signal to modal pitch. The Help file for DegreeToKey uses MouseX.kr to truncate the signal to values from a FloatArray a ndtrigger pitch from the chosen mode. My question is: How can I use the freq data (from the example above) instead of Mouse.kr to trigger notes from the mode (when the actual freq happens to match one of the notes of the mode)? I know I could try to use an Identity dictionnary or conditional statements (if) to get the same result but it would not be as flexible as using DegreeToKey since I can easily send new Float arrays to change mode during the performance. Any idea? Thanks. Fabrice Mogini - -------------------- ------------------------------ Date: Fri, 2 Nov 2001 12:13:53 +0100 (CET) From: Schreck-Ensemble <---@---.---> Subject: Re: Pitch follower+Degreetokey Hello, An interesting problem, since I am also considering a piece for this combination. I would choose an Identity dictionnary, but your idea of DegreeToKey could also work. Remember that the mouseX in the example gives the index of your table, so you have to convert the freq. into midi-notes using cpsmidi (round is also done by DegreeToKey) and give a float-array of 127 points (complete midi-scale) as input table. Other table-lengths will give repeats after so many steps (with octave shifts), a length of 12 will give the same layout every octave you play. You could also process the output of cpsmidi before feeding into DegreeToKey, for instance */3 will give a new output every minor third you play. by, Hans >Hi, > >I am using a theremine (through AudioIn) to trigger >a sinewave with the Pitch object (simple). > >////////////////////////////////////////////////////////////////////////// > >( >{ > var in, freq, hasFreq, amp, sig; > > in = Mix.ar(AudioIn.ar([1,2],1)); > amp = Amplitude.kr(in, 0.1) thresh: 0.005; > > #freq, hasFreq = Pitch.kr(in); > > > freq = freq.cpsmidi.round(1).midicps; > > FSinOsc.ar(freq,amp); > >}.play >) >////////////////////////////////////////////////////////////////////////// > >Now, I would like the AudioIn to trigger only certain notes from a mode >(and not all the MIDI notes). > >I thought of using DegreeToKey to convert the signal to modal pitch. > >The Help file for DegreeToKey uses MouseX.kr to truncate the signal >to values from a FloatArray a ndtrigger pitch from the chosen mode. > >My question is: > >How can I use the freq data (from the example above) instead of Mouse.kr >to trigger notes from the mode (when the actual freq happens to match >one of the notes of the mode)? > >I know I could try to use an Identity dictionnary or conditional >statements (if) to get the same result but it would not be as flexible as >using DegreeToKey since I can easily send new Float arrays >to change mode during the performance. > >Any idea? > > Thanks. > > Fabrice Mogini >-------------------- ============================================================ Hans van Eck: schreck@xs4all.nl Schreck-Ensemble: http://www.xs4all.nl/~schreck Buy a Schreck CD at: http://knorretje.hku.nl/~schreck/cgi-bin/nph-BUYCD.cgi Tel.: "+31"-(0)20-6968957 ============================================================ ------------------------------ Date: Fri, 2 Nov 2001 12:55:42 +0100 From: Julian Rohrhuber <---@---.---> Subject: Re: Pitch follower+Degreetokey a KeyToDegree ugen wold be nice.. I have written a couple of patches to make this possible, it seems to work as far as i can see. maybe there is be a better solution though. I'll put a KeyToDegree ugen on the swiki when I have it. meanwhile: ( { var freq; freq = SinOsc.kr(0.3, 0, 5, 69).midicps; SinOsc.ar(freq, 0, 0.1); }.play; ) //polling midinote ( { var freq, midinote; freq = SinOsc.kr(0.3, 0, 5, 69+5).midicps; midinote = freq.cpsmidi; thisSynth.repeat(0, 0.3, { midinote.poll.postln }); SinOsc.ar(freq, 0, 0.1); }.play; ) //polling note ( { var freq, midinote, note, steps=12, root=0.0; freq = SinOsc.kr(0.1, 0, 5, 69+5).midicps; midinote = freq.cpsmidi; note = midinote - root % steps; thisSynth.repeat(0, 0.1, { note.poll.postln }); SinOsc.ar(freq, 0, 0.1); }.play; ) //polling note ( { var freq, midinote, note, key, steps=12, root=0.0; freq = SinOsc.kr(0.1, 0, 5, 69+5).midicps; midinote = freq.cpsmidi; note = midinote - root % steps; key = note.round(1); thisSynth.repeat(0, 0.1, { key.poll.postln }); SinOsc.ar(freq, 0, 0.1); }.play; ) //we need a more complex round function r = { arg inval, scale, stepsperoct=12, resolution=0.05; var table, lastkey, repetitions; repetitions = resolution.reciprocal; table = Signal.newClear(scale.size * repetitions); lastkey = stepsperoct - (scale.last % stepsperoct); scale.do({ arg item; ((item - lastkey).abs * repetitions).postln.do({ table = table.add(item); }); lastkey = item; }); table }; s = r.value(nil, [0, 2, 4, 5, 7, 10]).postln; s.size.postln; s.occurencesOf(0).postln; s.at(20*1).postln; s.at(20*8).postln; //a testpatch ( { var freq, midinote, note, key, steps=12, root=0.0, round; m = Plug.kr(69); freq = m.midicps; round = { arg infreq, scale, stepsperoct=12, root=69, resolution=0.05; var table, lastkey, repetitions, out; repetitions = resolution.reciprocal; //crete a table for a staircase function table = Signal.new; lastkey = scale.last % stepsperoct; [scale, stepsperoct].postln; scale.do({ arg item; [\key, item, lastkey].postln; (((item - lastkey) % stepsperoct).postln * repetitions).do({ table = table.add(item); }); lastkey = item; }); [\tablesize, table.size].postln; scale.do({ arg item; [item, table.occurencesOf(item)].postln }); "--------".postln; out = Index.kr(table, b = (a = infreq.cpsmidi - root +0.1 / stepsperoct) * table.size); thisSynth.repeat(0, 0.1, { [out.poll, a.poll, b.poll].postln }); out }; midinote = freq.cpsmidi; note = midinote - root % steps; key = round.value(freq, FloatArray[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], 12, 69); SinOsc.ar(freq, 0, 0.1); }.play; ) m.source = 69 + 0; m.source = 69 + 1; m.source = 69 + 2; m.source = 69 + 3; m.source = 69 + 5; m.source = 69 + 6; m.source = 69 + 7; m.source = 69 + 8; m.source = 69 + 9; m.source = 69 + 11; >Hi, > >I am using a theremine (through AudioIn) to trigger >a sinewave with the Pitch object (simple). > >////////////////////////////////////////////////////////////////////////// > >( >{ > var in, freq, hasFreq, amp, sig; > > in = Mix.ar(AudioIn.ar([1,2],1)); > amp = Amplitude.kr(in, 0.1) thresh: 0.005; > > #freq, hasFreq = Pitch.kr(in); > > > freq = freq.cpsmidi.round(1).midicps; > > FSinOsc.ar(freq,amp); > >}.play >) >////////////////////////////////////////////////////////////////////////// > >Now, I would like the AudioIn to trigger only certain notes from a mode >(and not all the MIDI notes). > >I thought of using DegreeToKey to convert the signal to modal pitch. > >The Help file for DegreeToKey uses MouseX.kr to truncate the signal >to values from a FloatArray a ndtrigger pitch from the chosen mode. > >My question is: > >How can I use the freq data (from the example above) instead of Mouse.kr >to trigger notes from the mode (when the actual freq happens to match >one of the notes of the mode)? > >I know I could try to use an Identity dictionnary or conditional >statements (if) to get the same result but it would not be as flexible as >using DegreeToKey since I can easily send new Float arrays >to change mode during the performance. > >Any idea? > > Thanks. > > Fabrice Mogini >-------------------- - -- ** ------------------------------ Date: Fri, 02 Nov 2001 17:33:04 +0000 From: "Fabs Mogini" <---@---.---> Subject: Re: Pitch follower+Degreetokey So far this is what I could do. I am not sure that the "polled" function actually does anything (it seems like values keep on changing very fast)... ...anyway, thanks for your answers and let me know if you managed to write a class for it. Cheers Fabrice ////////////////////////////////////////////////////////////////////////// ( // pitch-follwer indexing to a mode Synth.play({ arg synth; var sign, theremine; var in, freq, hasFreq, sig; var midinote, solo, polled; var scale; scale = FloatArray[0,2,4,6,8,11]; // dorian scale in = Mix.ar(AudioIn.ar([1,2])); #freq, hasFreq = Pitch.kr(in); midinote = (freq.cpsmidi)%24; // the audioIn creates a wide range of notes // so I limit it to 24 only for indexing into the scale polled = { thisSynth.repeat(0, 0.2, { (midinote.poll);}); midinote;}; solo = polled.value; sign = FSinOsc.ar( ( DegreeToKey.kr( scale, ( solo.round(1)), // mouse indexes into scale 12, // 12 notes per octave 1, // mul = 1 60 // offset by 72 notes ) ).midicps //(solo.round(1).midicps) ,0.4); theremine = Limiter.ar(sign, 0.4,0.01); CombN.ar(theremine, 0.31, 0.31, 2, 0.4, theremine); }) ) ////////////////////////////////////////////////////////////////////////// - ---------- >From: Julian Rohrhuber <---@---.---> >To: sc-users@lists.io.com >Subject: Re: Pitch follower+Degreetokey >Date: Fri, Nov 2, 2001, 11:55 am > > a KeyToDegree ugen wold be nice.. > > I have written a couple of patches to make this possible, > it seems to work as far as i can see. maybe there is be a better > solution though. > I'll put a KeyToDegree ugen on the swiki when I have it. > > meanwhile: > > > ( > { > var freq; > freq = SinOsc.kr(0.3, 0, 5, 69).midicps; > SinOsc.ar(freq, 0, 0.1); > }.play; > ) > > > //polling midinote > ( > { > var freq, midinote; > freq = SinOsc.kr(0.3, 0, 5, 69+5).midicps; > midinote = freq.cpsmidi; > thisSynth.repeat(0, 0.3, { midinote.poll.postln }); > SinOsc.ar(freq, 0, 0.1); > }.play; > ) > > > //polling note > ( > { > var freq, midinote, note, steps=12, root=0.0; > freq = SinOsc.kr(0.1, 0, 5, 69+5).midicps; > midinote = freq.cpsmidi; > note = midinote - root % steps; > thisSynth.repeat(0, 0.1, { note.poll.postln }); > SinOsc.ar(freq, 0, 0.1); > }.play; > ) > > //polling note > ( > { > var freq, midinote, note, key, steps=12, root=0.0; > freq = SinOsc.kr(0.1, 0, 5, 69+5).midicps; > midinote = freq.cpsmidi; > note = midinote - root % steps; > key = note.round(1); > thisSynth.repeat(0, 0.1, { key.poll.postln }); > SinOsc.ar(freq, 0, 0.1); > }.play; > ) ------------------------------ Date: Sat, 3 Nov 2001 20:28:51 +0100 From: Julian Rohrhuber <---@---.---> Subject: Re: Pitch follower+Degreetokey >So far this is what I could do. >I am not sure that the "polled" function >actually does anything (it seems like values keep on changing very fast)... >...anyway, thanks for your answers and let me know if you managed to write a >class for it. it is on http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/349 for you to try it out. Please tell me if it works for you. > >////////////////////////////////////////////////////////////////////////// >( >// pitch-follwer indexing to a mode >Synth.play({ arg synth; > > var sign, theremine; > var in, freq, hasFreq, sig; > var midinote, solo, polled; > var scale; > > scale = FloatArray[0,2,4,6,8,11]; // dorian scale > > in = Mix.ar(AudioIn.ar([1,2])); > > #freq, hasFreq = Pitch.kr(in); > > midinote = (freq.cpsmidi)%24; btw. the midiscale is 12 halftones per octave, not 24 >// the audioIn creates a wide range of notes >// so I limit it to 24 only for indexing into the scale > here you are not really doing anything. > polled = { thisSynth.repeat(0, 0.2, { (midinote.poll);}); > midinote;}; > solo = polled.value; instead you could write solo = midinote; when polling, you get discrete values from a ugen. > > sign = FSinOsc.ar( > ( > DegreeToKey.kr( > scale, > ( solo.round(1)), // mouse indexes into scale > 12, // 12 notes per octave > 1, // mul = 1 > 60 // offset by 72 notes > ) > ).midicps //(solo.round(1).midicps) > > ,0.4); > > theremine = Limiter.ar(sign, 0.4,0.01); > > CombN.ar(theremine, 0.31, 0.31, 2, 0.4, theremine); > >}) >) The problem with this patch is that using a midinote as an index (degree) into a scale does not return you the proper values. it does work, but when you go up one halftone, for example, you might step up any interval in the result, as your scale has not only halftone steps. the fast change in the freq output of Pitch ugen is normal, as it approximates the frequency. if you want to improve this situation, you could use a Lag or a Slew to limit the change rate, or you could bandbass-filter the input to the values you expect. There is no once and for all solution for this, but for a specific case, like the theremin, it should be feasible. ------------------------------ Date: Sat, 3 Nov 2001 17:52:30 -0500 From: sonsgard <---@---.---> Subject: PlayBuf patch request Dear SC List, I would like to play soundfiles with SC and dynamicly control both length and start point of playback in the buffer. I've had moderate success with PlayBuf, but would like to see how other people have solved this problem. I humbly request of anyone willing to share patches/objects that impliment this kind of dynamic audio playback control, please forward some to me? Thank you very much! Shawn Onsgard - - "First one, then another. Another/one.)}{(" -Bay Woods ------------------------------ Date: Sat, 03 Nov 2001 20:48:14 -0500 From: newton armstrong <---@---.---> Subject: princeton SC working group announcing the first meeting of the princeton university supercollider working group. wednesday november 14, 5pm room 102 woolworth center for musical studies princeton university featuring: chris sattinger (aka: felix crucial, timeblind) talking about some stuff and playing some sounds and: newton armstrong talking about some stuff and playing some sounds as well we'd like to invite anyone who's interested to come along. the working group is going to meet on every 2nd wednesday of the month. if you'd like to do a presentation at the december 12 meeting, please get in touch with me at: newton@silvertone.princeton.edu or: (609) 986-9983. if you're coming from new york city, you'll need to take the new jersey transit northeast corridor line from penn station. return fare to princeton is $14. get off the train at princeton junction and take the shuttle to princeton. if you take the 3:07 train from penn, someone will be there to meet you at princeton at 4:29 and direct you to the woolworth center. web page coming soon... ------------------------------ Date: Sat, 03 Nov 2001 20:57:35 -0500 From: newton armstrong <---@---.---> Subject: Re: princeton SC working group On 3/11/01 8:48 PM, "newton armstrong" mistakenly wrote: > if you take the 3:07 train from penn, someone will be there to meet you at > princeton at 4:29 and direct you to the woolworth center. excuse me for misreading the timetable. that sentence should read: if you take the 3:43 train from penn, someone will be there to meet you at princeton at 4:48 and direct you to the woolworth center. ------------------------------ Date: Sun, 04 Nov 2001 11:21:30 -0800 (PST) From: cbmus@mills.edu Subject: Re: PlayBuf patch request Shawn, Here's a class I made a while ago for sample manipulation that I've found to be pretty useful -- Chris GranSampler { *ar { // all args except pModSig and soundFile may be // ExternalControlSource, UGen, ControlView or Floats arg soundFile, pitch = 1.0, // like MIDInote# initializes playback rate, 1.0 = normal amp = 1.0, // continuous amplitude, 0 -> 1.0 pBend = 1.0, // continuous pitch control, like pitchbend wheel loopStart = 0.0, loopLen = 1.0, // clipped to 0 -> 1.0 range loopDir = 1, loopOn = 1, // 0 = OFF, 1 = ON lengthMode = 0, // Mode 0 = length sets ratio of sampLength - loopStart // 1 = ratio of sample length, with sample wrapping pModSig = 0.0, // pModSig is a UGen xfadeLen = 0.002; // in seconds var sampLengthSec, thisSamp; thisSamp = soundFile.data.at(0); sampLengthSec = (thisSamp.size/soundFile.sampleRate); // in seconds ^Spawn.ar({ arg spawn, nextEvent, synth; var length, offsetSamp, env, dir, startoffset, startlength; startoffset = loopStart.poll.clip(0.0,0.989); // 0 - 1.0 if (lengthMode.poll == 0, { length = (1.0 - startoffset)*(loopLen.poll.clip(0.001,1.0))*sampLengthSec /((pitch.poll)*(pBend.poll)) // proportion of startoffset -> samp end in seconds },{ length = loopLen.poll.clip(0.001,1.0)*sampLengthSec /((pitch.poll)*(pBend.poll)) }); if (loopDir.poll > 0.5, { dir = -1; offsetSamp = (startoffset*thisSamp.size)+(length*soundFile.sampleRate) }, { dir = 1; offsetSamp = startoffset*thisSamp.size }); spawn.nextTime = length; // schedule next grain if (loopOn.poll == 0, { spawn.stop }); env = Env.linen(xfadeLen.poll, length - (2*xfadeLen.poll), xfadeLen.poll, 1.0,\welch); PlayBuf.ar(thisSamp, soundFile.sampleRate, ((Plug.kr(pitch))*(Plug.kr(pBend))*dir)+(pModSig.value), offsetSamp, 0, thisSamp.size-2, EnvGen.ar(env,Plug.kr(amp))); }, 1, nil ) } } Quoting sonsgard : > Dear SC List, > I would like to play soundfiles with SC and dynamicly control both > length > and start point of playback in the buffer. I've had moderate success > with > PlayBuf, but would like to see how other people have solved this > problem. > > I humbly request of anyone willing to share patches/objects that > impliment > this kind of dynamic audio playback control, please forward some to > me? > > Thank you very much! > Shawn Onsgard > > - > > "First one, then another. Another/one.)}{(" > -Bay Woods > > ------------------------------ Date: Mon, 5 Nov 2001 11:39:05 +0100 (CET) From: Giorgio Robino <---@---.---> Subject: Re: scheduling ugenFunctions hi all, I ask a little help: I need to schedule sound (UgenFunction) once, suppose that I want to start a new sound at t= 20sec from now. How I can d that with SC ? Maybe with Ptpar ? or with Spawn ? Thanks Giorgio - --- Giorgio Robino http://www.giorgiorobino.com , mailto:giorgio.robino@giorgiorobino.com - --- DEEP LISTENINGS "ascolti profondi, the new music magazine" (rivista trimestrale di cultura musicale), vendita per solo per corrispondenza. Rivolgersi a Gianluigi Gasparetti, mailto:deeplist@tin.it - --- SUPERCOLLIDER is an Object Oriented Programming Environment for real-time audio and video processing. It is one of the finest and most versatile environments for signal processing and especially for creating music applications of all kinds, such as complete compositions, interactive performances, installations etc. It runs on Macintosh Power PC computers. The author of SuperCollider is James McCartney. He maintains a site at: http://www.audiosynth.com ------------------------------ Date: Mon, 05 Nov 2001 12:38:02 +0100 From: reed <---@---.---> Subject: 48k record > Diese Nachricht ist im MIME-Format. Da Ihr Mailreader dieses Format nicht unterst焧zt, k歯nte diese Nachricht ganz oder teilweise unlesbar sein. - --B_3087808682_476371 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Hi, I'm currently trying to record an SC patch to hard disk at 48k (using SC2.2.10 and 2.2.11). I have changed the sampling rate to 48k (with a motu interface) in the audio setup, which is confirmed by Synth.samplingRate. When I record, however, the files are still written at 44.1k. As far as I can see from the documentation and the .sc files, I have no option of changing the sampling rate in the arguments for the .record method. The recorded files are then longer (not 5 secs but 5.44, for example), meaning that all of the data is there, and I can change the header to 48k in SoundHack, resulting in the correct length and the correct pitch level. Does anyone know if I have overlooked an argument, with which I can tell SC to include an indication for 48k sampling rate in the header? Many thanks, Sean Reed - --B_3087808682_476371 Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable 48k record Hi,

I'm currently trying to record an SC patch to hard disk at 48k (using SC2.2= .10 and 2.2.11). I have changed the sampling rate to 48k (with a motu interf= ace) in the audio setup, which is confirmed by Synth.samplingRate. When I re= cord, however, the files are still written at 44.1k. As far as I can see fro= m the documentation and the .sc files, I have no option of changing the samp= ling rate in the arguments for the .record method. The recorded files are th= en longer (not 5 secs but 5.44, for example), meaning that all of the data i= s there, and I can change the header to 48k in SoundHack, resulting in the c= orrect length and the correct pitch level. Does anyone know if I have overlo= oked an argument, with which I can tell SC to include an indication for 48k = sampling rate in the header?

Many thanks,

Sean Reed
- --B_3087808682_476371-- ------------------------------ Date: Mon, 05 Nov 2001 11:08:39 +0000 From: "Fabs Mogini" <---@---.---> Subject: Re: Pitch follower+Degreetokey This new class is very useful indeed + I had fun changing values of the third argument (stepsperoctave) when using RoundToScale). Thanks a lot Fabrice - ---------- >From: Julian Rohrhuber <---@---.---> >To: sc-users@lists.io.com >Subject: Re: Pitch follower+Degreetokey >Date: Sat, Nov 3, 2001, 7:28 pm > >>So far this is what I could do. >>I am not sure that the "polled" function >>actually does anything (it seems like values keep on changing very fast)... >>...anyway, thanks for your answers and let me know if you managed to write a >>class for it. > > it is on http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/349 > for you to try it out. Please tell me if it works for you. > > >> >>////////////////////////////////////////////////////////////////////////// >>( >>// pitch-follwer indexing to a mode >>Synth.play({ arg synth; >> >> var sign, theremine; >> var in, freq, hasFreq, sig; >> var midinote, solo, polled; >> var scale; >> >> scale = FloatArray[0,2,4,6,8,11]; // dorian scale >> >> in = Mix.ar(AudioIn.ar([1,2])); >> >> #freq, hasFreq = Pitch.kr(in); >> >> midinote = (freq.cpsmidi)%24; > > btw. the midiscale is 12 halftones per octave, not 24 > >>// the audioIn creates a wide range of notes >>// so I limit it to 24 only for indexing into the scale >> > > here you are not really doing anything. > >> polled = { thisSynth.repeat(0, 0.2, { (midinote.poll);}); >> midinote;}; >> solo = polled.value; > > instead you could write solo = midinote; > when polling, you get discrete values from > a ugen. > >> >> sign = FSinOsc.ar( >> ( >> DegreeToKey.kr( >> scale, >> ( solo.round(1)), // mouse indexes into scale >> 12, // 12 notes per octave >> 1, // mul = 1 >> 60 // offset by 72 notes >> ) >> ).midicps //(solo.round(1).midicps) >> >> ,0.4); >> >> theremine = Limiter.ar(sign, 0.4,0.01); >> >> CombN.ar(theremine, 0.31, 0.31, 2, 0.4, theremine); >> >>}) >>) > > > The problem with this patch is that using a midinote > as an index (degree) into a scale does not return you > the proper values. it does work, but when you go up one halftone, > for example, you might step up any interval in the result, as your > scale has not only halftone steps. > > the fast change in the freq output of Pitch ugen is normal, as it approximates > the frequency. if you want to improve this situation, you could use a > Lag or a Slew to limit the change rate, or you could bandbass-filter the input > to the values you expect. There is no once and for all solution for this, but > for a specific case, like the theremin, it should be feasible. > > > > > > > ------------------------------ End of sc-users-digest V1 #376 ******************************