From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #379 Reply-To: sc-users Sender: owner-sc-users-digest@lists.io.com Errors-To: owner-sc-users-digest@lists.io.com Precedence: bulk sc-users-digest Sunday, November 11 2001 Volume 01 : Number 379 ---------------------------------------------------------------------- Date: Fri, 09 Nov 2001 22:41:53 +0000 From: Tim Sayer <---@---.---> Subject: Re: amplitude many thanks Felix, I managed to get TSpawn working but I noticed the cpu usage started rising quite dramatically when the patch was playing. Also I wondered if it was more efficient to run though the buffer array and drop markers into another array without playing the buffer. something like speech.size.do(arg i; if (amplitude.kr(speech < threshold),{marker(index)=i; index++},); I'm sure I've got the syntax wrong but maybe you can see in principle what I mean. Also I have a couple of questions about your example: Synth.collect({ var schedSynth; schedSynth = thisSynth; TSpawn.ar({ arg synth,i,spawn; schedSynth.beats.postln; nil // no audio output }, Ampltidude.kr(speech) > threshold); }); Does it matter if collect or scope is used? Is a new synth spawned each time the amplitude check returns true? I really appreciate your help, TiM ------------------------------ Date: Fri, 09 Nov 2001 19:58:48 -0500 From: felix <---@---.---> Subject: Re: amplitude > From: Tim Sayer <---@---.---> > Date: Fri, 09 Nov 2001 22:41:53 +0000 > > many thanks Felix, > > I managed to get TSpawn working but I noticed the cpu usage started rising > quite dramatically when the patch was playing. Also I wondered if it was > more efficient to run though the buffer array and drop markers into another > array without playing the buffer. something like > > speech.size.do(arg i; if (amplitude.kr(speech < threshold),{marker(index)=i; > index++},); oh yeah i was going to say that method two is to do it analytically, ie. not 'playing' it. above you are trying to do something that doesn't work. several things. .kr ugen wants an audio signal to listen to, not a 1..0 bin op that a 'less than' would produce. the only thing you can do with a ugen constructed with an if statement is return a signal, not do stuff like { index = index + 1; } using an if statement to build a ugen is a bit complicated, i suggest not attempting it right now. the easiest, least frustrating, and most educational way would be to try the amplitude thing. > > I'm sure I've got the syntax wrong but maybe you can see in principle what I > mean. Also I have a couple of questions about your example: > > Synth.collect({ > var schedSynth; > schedSynth = thisSynth; > TSpawn.ar({ arg synth,i,spawn; > schedSynth.beats.postln; > nil // no audio output > }, Ampltidude.kr(speech) > threshold); > }); > > > Does it matter if collect or scope is used? i used collect because it would happen faster than real time. you can use scope and listen to it. you should, then you can see it post when it gets triggered. try it with audio input and speak into it. > Is a new synth spawned each time the amplitude check returns true? yes Ampltidude.kr(speech) > threshold creates a binop ugen that goes from 0 to 1 to indicate true. any time the signal crosses from zero to non-zero the tspawn is triggered. experiment with just this thing. build it and .postln it so you can see what the > really does. command-Y on > to see how the different classes respond to the > message. > > > I really appreciate your help, > > TiM > > > ------------------------------ Date: Fri, 9 Nov 2001 21:05:18 -0500 From: Andrei <---@---.---> Subject: MIDI out Sorry, a basic question, but how do you send out MIDI info from SC (2) ? Examples, please ? Is there anything in the documentation about that ? Thanks. Andrei ------------------------------ Date: Fri, 9 Nov 2001 22:58:54 -0500 From: "don mennerich" <---@---.---> Subject: RE: MIDI out hey andrei, have you checked the adc tutorials under user interaction, theres a file in there on useing midi, which demonstrates how to send midi messages. sorry if you already knew this donald - -----Original Message----- From: owner-sc-users@lists.io.com [mailto:owner-sc-users@lists.io.com]On Behalf Of Andrei Sent: Friday, November 09, 2001 9:05 PM To: SC Subject: MIDI out Sorry, a basic question, but how do you send out MIDI info from SC (2) ? Examples, please ? Is there anything in the documentation about that ? Thanks. Andrei ------------------------------ Date: Sat, 10 Nov 2001 09:21:15 -0700 From: "David Cottle" <---@---.---> Subject: Re: Digi 001 input >> > > I'm glad. > How do you manage to have an enless supply of good quotes to put at the end of > your mails? Things I've been collecting for a long time. They are appended at random. > The current one reminds me of an article somone showed me recently about 'Wasi > sabi' (I think) - the Japanese art of imperfection. Anything like chindogu; the Japanese art of useless inventions? - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "But what will never be overcome are the diminishing returns inherent in mechanical reproduction. When the music ceases to be fresh for us in this sense, it ceases to be alive, and we can say in the most real sense that it ceases to be music." -Roger Sessions ------------------------------ Date: Sat, 10 Nov 2001 09:21:15 -0700 From: "David Cottle" <---@---.---> Subject: Re: MIDI out > Sorry, a basic question, but how do you send out MIDI info from SC (2) ? > Examples, please ? Is there anything in the documentation about that ? I have an example in my text. It's at the swiki. But here is a simple example: ( var pr = 25, port = 0, channel = 1, prog = 17; //MIDIOut(port).program(channel, prog); Pbind( \midinote, Pseq([ Prand([ nil, Pseq(#[48, 41, 43, 31]), Pseq(#[24, 31, 36, 43, 48, 55]) ]), Pseq([ 60, Prand(#[63, 65]), 67, Prand(#[70, 72, 74]) ], { rrand(2, 5) }), Prand(#[74, 75, 77, 79, 81], { rrand(3, 9) }) ], inf), \dur, 0.1, \sustain, Pfunc({if(0.7.coin, {0.1}, {1 + 3.0.rand})}), \veloc, Prand([ Pseq([2, 3, 4, 5, 6, 7, 8]*10, 2), Pseq([9, 8, 7, 6, 5, 4, 3]*10, 3), Pseq([30], 12), Pseq([50], 12), Pseq([80], 12), Prand([1, 2, 3, 4, 5, 6, 7, 8, 9]*10,15) ], inf), \ugenFunc, { arg midinote, veloc, sustain, outersynth; MIDIOut(0).noteOn(1, midinote, veloc); // schedule note off in the outer synth. outersynth.sched(sustain, { MIDIOut(0).noteOn(1, midinote, 0); }); nil // no audio output } ).play(channels: 1); 127.do({arg item; MIDIOut(0).noteOn(1, item, 0)}) ) - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "Ballo ergo sum." -Jennifer Cartwright ------------------------------ Date: Sat, 10 Nov 2001 20:02:25 +0100 From: heiko goelzer <---@---.---> Subject: updated PrestButtonView hi, i put the latest PresetButton version on the swiki. http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/331 it features some changes in the presetting scheme and a PresetButton for randomizing your GUI. there is also a set of Play- and RecordButtons in there. check it Heiko ------------------------------ Date: Sat, 10 Nov 2001 16:12:59 -0800 (PST) From: Lee Azzarello <---@---.---> Subject: Re: Digi 001 input On Tue, 6 Nov 2001, John Eacott wrote: > > > > I already use these for sound out. I didn't realize input would work the > > same way. So is it correct that I don't even have to mess with the choices > > in the Sound control panel? That's just for system sound? > > I'm not at my studio to check it right now but I believe so. You might > want to make sure that the 001 is not selected in Sound Control Panel as > that might make it unavailable for SC. I can confirm this. You must turn off the Digi as the MacOS sound device in order for SC to use it. - -l[e^2] - ----------------- chmod -R 777 / chown -R nobody / imagine true freedom http://eds.org/~lee ------------------------------ Date: Sun, 11 Nov 2001 21:24:13 -0700 From: Michael Theodore <---@---.---> Subject: Type conversion? Hello, I'm doing a process which first results in floats. The floats are then sent a floor message, the results of which are used as an index for an array. However, floor seems to be returning a float, and not an integer, which isn't what I'd expect, as the docs say float returns the "next smaller integer". Here's a made up example to illustrate the problem, as well as the start of the error message. Any help is gratefully appreciated. thanks, Michael ******************* ( var myfunc; var myarray; myarray = [0, 1, 2, 3, 4]; myfunc = { var x, y; x = 3.6; // x is a float y = x.floor; // last expression in the function should return an int? }; myfunc.value.postln; // looks like an int myarray.at(myfunc.value); // ouch, error ) Float 4 ERROR: Primitive '_BasicAt' failed. Index not an Integer ****************** PS - Thanks to Jeremy for answering my stupid spawn question. I can't believe I actually blanked out on that one - it's all over the help file. ------------------------------ End of sc-users-digest V1 #379 ******************************