From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #386 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 28 2001 Volume 01 : Number 386 ---------------------------------------------------------------------- Date: Tue, 27 Nov 2001 03:25:26 +0100 From: Julian Rohrhuber <---@---.---> Subject: Re: Pattern restart //play n patterns from a gui ( var patterns, n, env, w, output, tspawn, synths; patterns = [ Pbind(\freq, Pseq(#[2000, 300, 10000], inf), \dur, 0.1, \amp, 0.03), Pbind(\freq, Pseq(#[200, 3000, 1000], inf), \dur, 0.1, \amp, 0.03) ]; patterns = patterns.collect({ arg item, i; Pswitch1([nil, item], Pfunc({ w.at(i).value.asInt }) ); }); n = patterns.size; synths = Array.fill(n, { nil }); env = Env.asr(0.002, 1, 1); w = GUIWindow("", Rect.newBy(100,100,120,20+(n*20))); n.do({ arg i; ButtonView(w, Rect.newBy(20,10+(i*20),80,15), "pat"++(i+1).asString).action_({ var synth; w.at(i).toggle; if( w.at(i).value == 1, { synth = Synth({ patterns.at(i).ar * EnvGen.kr(env)}); synths.put(i, synth); tspawn.triggerSynth(synth); w.at(i).backColor_(Color(255,176,176+60.rand2)); },{ synth = synths.at(i); if(synth.notNil, { synth.release }); w.at(i).backColor_(rgb(255,255,255)); }); }); }); Synth.play({ output = TSpawn.ar(nil, 2); tspawn = output.source; output }); w.close; ) - -- . ------------------------------ Date: Mon, 26 Nov 2001 21:35:38 -0500 From: newton armstrong <---@---.---> Subject: Re: Pattern restart julian, i was this close to your solution: --><-- which is not just elegant, it has pretty colours. thanks again. ------------------------------ Date: Tue, 27 Nov 2001 01:42:47 -0500 From: felix <---@---.---> Subject: Re: Pattern restart i would still use the example i posted yesterday, but for pedagogophilic reasons, here is a solved version for you newton. ( var patterns, n, env, w, output, tspawn; patterns = [ Pbind(\freq, Pseq(#[2000, 300, 10000], inf), \dur, 0.1, \amp, 0.03), Pbind(\freq, Pseq(#[200, 3000, 1000], inf), \dur, 0.1, \amp, 0.03) ]; patterns = patterns.collect({ arg item, i; // this is still wacky and obscure for my tastes ! Pswitch1([nil, item], Pfunc({ w.at(i).value.asInt }) ); }); env = Env.asr(0.002, 1, 1); w = GUIWindow("", Rect.newBy(100,100,120,20+(n*20))); patterns.size.do({ arg i; var synth,b; // these vars are scoped to this iteration of .do // its like living parallel lives in parallel universes b= ButtonView(w, Rect.newBy(20,10+(i*20),80,15), "pat"++(i+1).asString); b.backColor_(rgb(255,255,255)); b.action_({ arg butt; if(butt.value == 1,{ tspawn.triggerSynth( synth = Synth({ patterns.at(0).ar * EnvGen.kr(env)) }) ); },{ synth.release; // this can only be the synth created above // if it was nil its okay, nil.release is harmless }) }); Synth.play({ output = TSpawn.ar(nil, 2); tspawn = output.source; output }); w.close; ) ------------------------------ Date: Tue, 27 Nov 2001 09:43:58 -0500 From: newton armstrong <---@---.---> Subject: Re: pedagogophilia this looks like it should work, but it doesn't. the Synths don't seem to ever get created. as to being wacky and obscure, the reason i want to put nil in the EventStream when i kill it is because i don't want to hear new events being triggered while the Synth envelope is fading out. i want the stream to just stop dead. at the same time, i don't want a short release segment on the envelope, in case the last event has a long-ish decay. thanks for the example you posted the other day. as you already know, i'm slowly pillaging your code. the crucial library has a bunch of really useful things in it. On 27/11/01 1:42 AM, "felix" wrote: > > i would still use the example i posted yesterday, but for pedagogophilic > reasons, here is a solved version for you newton. > same patch as you posted, but with missing brackets, etc, added: ( var patterns, n, env, w, output, tspawn; patterns = [ Pbind(\freq, Pseq(#[2000, 300, 10000], inf), \dur, 0.1, \amp, 0.03), Pbind(\freq, Pseq(#[200, 3000, 1000], inf), \dur, 0.1, \amp, 0.03) ]; patterns = patterns.collect({ arg item, i; // this is still wacky and obscure for my tastes ! Pswitch1([nil, item], Pfunc({ w.at(i).value.asInt }) ); }); env = Env.asr(0.002, 1, 1); n = patterns.size; w = GUIWindow("", Rect.newBy(100,100,120,20+(n*20))); n.do({ arg i; var synth,b; // these vars are scoped to this iteration of .do // its like living parallel lives in parallel universes b= ButtonView(w, Rect.newBy(20,10+(i*20),80,15), "pat"++(i+1).asString); b.backColor_(rgb(255,255,255)); b.action_({ arg butt; if( butt.value == 1,{ tspawn.triggerSynth( synth = Synth({ patterns.at(i).ar * EnvGen.kr(env) }) ); },{ synth.release; // this can only be the synth created above // if it was nil its okay, nil.release is harmless }); }); }); Synth.play({ output = TSpawn.ar(nil, 2); tspawn = output.source; output }); w.close; ) ------------------------------ Date: Tue, 27 Nov 2001 08:45:08 -0800 From: MarkDavid <---@---.---> Subject: Re: Pattern restart Not to intrude but here is aversion that automatically makes the buttons. So, all you have to do is add patterns-MarkDavid ( var patterns, n, env, w, output, tspawn; patterns = [ Pbind(\midinote, Pseq([60, 67, 75], inf), \dur, 0.5, \amp, 0.03), Pbind(\midinote, Pseq(#[60, 67, 75], inf), \dur, 0.48, \amp, 0.03), Pbind(\midinote, Pseq(#[60, 67, 75], inf), \dur, 0.46, \amp, 0.03) ]; patterns = patterns.collect({ arg item, i; Pswitch1([nil, item], Pfunc({ w.at(i).value.asInt }) ); }); n = patterns.size; env = Env.asr(0.002, 1, 1); w = GUIWindow("", Rect.newBy(100,100,120,20+(n*20))); n.do({ arg x,i; ButtonView(w, Rect.newBy(20,10+(i*20),80,15), "pat"++(i+1).asString); w.at(i).backColor_(rgb(255,255,255)); w.at(i).action_({ w.at(i).toggle; if( w.at(i).value == 1, { tspawn.triggerSynth(x = Synth({ patterns.at(i).ar * EnvGen.kr(env) })); w.at(i).backColor_(rgb(255,176,176)); },{ x.release; w.at(i).backColor_(rgb(255,255,255)); }); });}); Synth.play({ output = TSpawn.ar(nil, 2); tspawn = output.source; output }); w.close; ) - -- Experience After-Life on the Bardo Plane of Existence: http://www.mdhosale.com/BookOfTheDead ------------------------------ Date: Tue, 27 Nov 2001 12:23:13 -0500 From: newton armstrong <---@---.---> Subject: Re: Pattern restart On 27/11/01 11:45 AM, "MarkDavid" wrote: > Not to intrude but here is aversion that automatically makes the buttons. > So, all you have to do is add patterns-MarkDavid thanks. it seems kind of improper to overwrite the item argument in a do statement with a Synth that lives inside the do statement, but it works. it's very simple to adapt this to read patterns from files, or in fact any workable patch that's enclosed in a function. but of course that might just turn out to be a less efficient version of MixerPlayer. ------------------------------ Date: Tue, 27 Nov 2001 12:37:45 -0500 From: newton armstrong <---@---.---> Subject: Re: Pattern restart people are probably tired of seeing the various iterations on this patch, but i'm posting this version because i think it's the best model. it incorporates improvements by julian, felix and markdavid. ( var numChannels, patterns, n, w, output, tspawn; numChannels = 2; patterns = [ Pbind(\freq, Pseq(#[2000, 300, 10000], inf), \dur, 0.1, \amp, 0.03), Pbind(\freq, Pseq(#[200, 3000, 1000], inf), \dur, 0.1, \amp, 0.03) ]; patterns = patterns.collect({ arg item, i; Pswitch1([nil, item], Pfunc({ w.at(i).value.asInt }) ); }); n = patterns.size; w = GUIWindow("", Rect.newBy(100,100,120,20+(n*20))); n.do({ arg i; var button, synth; button = ButtonView(w, Rect.newBy(20,10+(i*20),80,15), "pat"++(i+1).asString); button.backColor_(rgb(255,255,255)); button.action_({ button.toggle; if( button.value == 1, { tspawn.triggerSynth(synth = Synth({ patterns.at(i).ar(Event.protoEvent, numChannels) * EnvGen.kr(Env.asr(0.002, 1, 1)); })); button.backColor_(rgb(255,176,176)); },{ synth.release; button.backColor_(rgb(255,255,255)); }); }); }); Synth.play({ output = TSpawn.ar(nil, numChannels); tspawn = output.source; output }); w.close; ) ------------------------------ Date: Tue, 27 Nov 2001 19:42:39 +0000 From: Hairi <---@---.---> Subject: AngelFinger This is a multi-part message in MIME format. - --------------D70EBF37F1887E1640ECDF32 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello everybody. I am about to finish a first version of AngelFinger which is the follow-up project of SWARK. Attached you find it's read me. Please let me know if you want to test it. It will be ready in about a week. I cannot figure out how that swiki thing works. Are there instructions somewhere? What is the limit of file size for parking code there ? Is there information on the web about the October symposium in the UK ? cheers Hairi - --------------D70EBF37F1887E1640ECDF32 Content-Type: application/octet-stream; x-mac-type="53495435"; x-mac-creator="53495421"; name="AnFiReadMe.sit" Content-Transfer-Encoding: base64 Content-Description: Unknown Document Content-Disposition: attachment; filename="AnFiReadMe.sit" U3R1ZmZJdCAoYykxOTk3LTE5OTggQWxhZGRpbiBTeXN0ZW1zLCBJbmMuLCBodHRwOi8vd3d3 LmFsYWRkaW5zeXMuY29tL1N0dWZmSXQvDQoaAAUQAAAcdwAAAHIAAQAAAHLbqw2lpVJlc2Vy dmVkpaUApaWlpQEAADYAELduEfC4J9y8AAAAAAAAAAAAAAAAAAYm9AAARrMAABkgAAAAAA8A UmVhZE1lAAGhFFRFWFRTQ2ptAQABpgD4AAAAAAAAAAAAAIAAAAAAAAAAAAAN5AAAAn0AAAAA DwBCwdTdlLoRT8buFWHxN6amJyHgZjDJeoGh00r4+2zGTVyNxuugI9wAuI3e8o79UBjEsK6i SnQPCs+kchr9kulqIuhfVy4qvvz8DuNxWyANAM3lcod2sTKy7c1az8XSFleNr5RqGTzFD65o ei2F+SHBi8piyUF6DZmTOCJryAyOIqQ7YCRJU+GCJZywADUG40DZ0h2NQkiGeI8bv8Vpoi+L iE/0o3aej3d3XrWzeNGISe/64oLWbIZmZ2bDbmmnyk69W2IuPf+hG4IS0ZZYlckL8Q5Ja5LT FGLaLkK7qDmH5tzNuEVchj/JQgOtuBl/l/MIBsgvuJNeXayzCU8pFOg0vRGHkXzwnWD3ts1H kJhUk3buAvCTI7Sx8FV9oIDusx5XW9SJ/hTuiUoinGxIEp+DbbHHEa+YSj9vOGMUsLeQLrOJ MnEksAI70mgzjA1mVw10IjMSTp/vbTP+nqx4m6N2UGWHbtRn7IZR8QpSZL2Hv6wU8NImgew2 cWVpXyryQ1MWa0RoqAuK/DhmgS+fvLWwWmW4Tl5ZviEa+0hdSuOTqbibPXjAUdShQWgxOkR4 aMPnzF0faIviTrkSIxr+dKmfpT9sO87IA+gds+PTj4SnKxMz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oixVh6xCan+pC3o+kBHFse0+vVN+ BWTf1rifFOkwlNSzIXRl9VChhlxkKEZG5LIQQAtWXiuJy0EcPLDdLBz1vn0HmYgXOTH8o2nD LRymjb3D+HWFFVKoC7dKHWeyhPHoRQv+Iek4lIj15NfPToq2UbkxUeFoNhlI1szwbPAyk0wP sW3kKP1LQyup671tz884QYOTqi2Q3p1SFQfMgnk0GT/IgCzubKI/BRysQ6GxrbgXmAwA - --------------D70EBF37F1887E1640ECDF32-- ------------------------------ Date: Tue, 27 Nov 2001 20:30:33 +0100 From: Giorgio Robino <---@---.---> Subject: patch: audiotexture ( // audioTexture, // by Giorgio Robino, 24/11/2001, for SC 2.2.11 // // simply using audio-files (not necessarly in loop mode) for an overlap texture: // audioFilePlayEnv.value or simply DiskIn.ar transform the audio chunk file in a ugen function. // // dedicated to Alio Die (deep listening musician) CD: "password for ...". // funzioni e variabili globali var audioTexture, audioFilePlayEnv, audioFileLoad, audioFileLen; var sampleListNames, audioListLoad, audioListLen; var outFileName = "Macintosh HD:Desktop Folder:audioTexture.aif"; var outFileLength = 600; var outFadeIn = 4, outFadeOut = 4; // lista dei nomi dei file audio, // i campioni possono (non necessariamente) essere in LOOP, // ovvero file AIFF con LOOP POINTS settati. sampleListNames = [ "Macintosh HD:prove:Satz Exil Sils Maria:A1.aif", "Macintosh HD:prove:Satz Exil Sils Maria:A2.aif", "Macintosh HD:prove:Satz Exil Sils Maria:A3.aif", "Macintosh HD:prove:Satz Exil Sils Maria:A4.aif", "Macintosh HD:prove:Satz Exil Sils Maria:A5.aif", "Macintosh HD:prove:Satz Exil Sils Maria:A6.aif" //"Macintosh HD:prove:Bartok Sz 85:A1.aif", //"Macintosh HD:prove:Bartok Sz 85:A2.aif", //"Macintosh HD:prove:Bartok Sz 85:A3.aif", //"Macintosh HD:prove:Bartok Sz 85:A4.aif", //"Macintosh HD:prove:Bartok Sz 85:A5.aif", //"Macintosh HD:prove:Bartok Sz 85:A6.aif", //"Macintosh HD:prove:Bartok Sz 85:A7.aif", //"Macintosh HD:prove:Bartok Sz 85:A8.aif", //"Macintosh HD:prove:Bartok Sz 85:A9.aif", //"Macintosh HD:prove:Bartok Sz 85:A10.aif", //"Macintosh HD:prove:Bartok Sz 85:A11.aif", //"Macintosh HD:prove:Bartok Sz 85:A12.aif", //"Macintosh HD:prove:Bartok Sz 85:A13.aif" ]; ///////////////////////////////// // audioFileLoad.value (filename) // audioFileLoad = { arg filename; var fileHandle; fileHandle = SoundFile.new; fileHandle.readHeader(filename); fileHandle }; //////////////////////////////// // audioFileLen.value (fileName) // audioFileLen = { arg fileName; var audioFile; audioFile = SoundFile.new; audioFile.readHeader(fileName); // legge solo l'header // ritorna la durata in secondi del campione audio audioFile.duration; }; /////////////////////////////////// // audioListLoad.value (namesArray) // audioListLoad = { arg namesArray; var handleArray; handleArray = Array.new (namesArray.size); // inizializza l'array degli handle namesArray.size.do( {arg i; handleArray.add(audioFileLoad.value (namesArray.at(i))) }); // stampa informazioni di report handleArray.size.do( {arg i; { "sample" + (i+1) + ": " + namesArray.at(i) + ", " + handleArray.at(i).duration + "sec. "}.value.postcln }); handleArray }; /////////////////////////////////// // audioListLen.value (handleArray) // audioListLen = { arg handleArray; var lenArray; lenArray = Array.new (handleArray.size); // inizializza l'array degli handle handleArray.size.do( {arg i; lenArray.add(handleArray.at(i).duration) }); lenArray }; //////////////////////////////////////////////////////////////////////////// //// // audioFilePlayEnv.value (file, lengthSec, fadeIn, fadeOut, fadeMode, loopMode) // audioFilePlayEnv = { arg fileHandle, lengthSec, // la lunghezza di play puo' essere maggiore della // lunghezza del campione se loopMode = true fadeIn = 0.0001, fadeOut = 0, fadeMode = 'linen', loopMode = true; var env; // fadeMode maybe prefedined values, // as 'exponential', (classical soft crossfade) // 'welch', -2 (carica/scarica condensatore) and others, see Env help if (fadeMode != 'linen', { env = EnvGen.kr(Env.new ( [0.0001, 1, 1, 0.0001], [fadeIn, lengthSec - (fadeIn + fadeOut), fadeOut], fadeMode )) }, { env = EnvGen.kr(Env.linen(fadeIn, lengthSec - (fadeIn + fadeOut), fadeOut)) }); // ritorna il campione audio con fadeIn/fadeOut DiskIn.ar(fileHandle, loopMode) * env }; /////////////////////////////////////////////////// // audioTexture.value(sampleArray, density) // audioTexture = { arg sampleArray; var sampleHandle; var nextSampleIndex = -1, sustainTime, transitionTime, density; // determina i tempi in modo random sustainTime = { rrand (100, 180) }; transitionTime = { rrand (10, 20) }; density = { rrand (2, 4) }; // esegue tessitura di campioni audio OverlapTexture.ar( { // sceglie un campione ruotando in modo sequenziale sulla lista sampleHandle = { nextSampleIndex = nextSampleIndex + 1; sampleArray.wrapAt(nextSampleIndex) }.value; // riproduce il campione in loop audioFilePlayEnv.value (sampleHandle, sampleHandle.duration, 1, 1) // DiskIn.ar(sampleHandle, true) }, sustainTime.value, transitionTime.value, density.value, 2); }; ///////////////////// // audioTexture main // Synth.write ( { var samples; // Stampa i dati della composizione { "audioTexture, release: 24/11/2001" }.value.postcln; { "randSeed : " + thisThread.randSeed }.value.postcln; // carica in un array gli handle dei campioni samples = audioListLoad.value(sampleListNames); { "outFileName : " + outFileName }.value.postcln; { "outFileLength: " + outFileLength }.value.postcln; // audioTexture con inviluppo per un attacco e finale sfumato. audioTexture.value (samples) * EnvGen.kr(Env.linen(outFadeIn, outFileLength - (outFadeIn + outFadeOut), outFadeOut)) }, outFileLength, outFileName); ) ------------------------------ Date: Tue, 27 Nov 2001 19:32:08 +0000 From: Trojan F <---@---.---> Subject: hi-hat cutoff hi everyone, i'm new around these parts. i finally got around to buying sc yesterday after having, um, borrowed it for a few months. anyway i am not the best programmer ever and feel like i might get savaged for asking this question, but i'm stuck so here goes. i have been working on a drum machine program with gui roughly based on roland drum machines. one requirement of a drum machine is that hi-hat sounds and the like are able to cut each other off. i did get this working but it was tedious and slightly complicated: that is, whenever a hit was played, to calculate when the next note will be and base the decay time of the envelope on that. i can't help feeling there must be an easier way. is it not possible that, once a Ugen has started playing, i can say at a later point, "actually i want you to finish right now"? is this explaination clear? there is one demo program i saw where a spawn was given a maxVoices message, but if i utilised this then surely i would have to have a seperate spawn running for each instrument (there are 8) at the moment i have one spawn loop which scoops up all the Ugens needed for each particular beat and mixes them. anyway, if such a "cutoff" command exists i would appreciate being pointed in its direction, otherwise i'd be interested to know any alternative strategies... or maybe everyone's music is far too avant-guarde for things like hihats?! Trojan F ------------------------------ Date: Tue, 27 Nov 2001 13:18:56 -0700 From: Jeffrey P Shell <---@---.---> Subject: Re: hi-hat cutoff There is a Cutoff class, but I'm not sure if it would do exactly what you want. You might want to look at using TrigXFadeTexture (I think that's the name, I'm away from my SC machine right now) or at the very least trying to figure out its source. TrigXFadeTexture cross fades between sounds when its trigger goes off. Internally, it's just doing spawns and the code is in SC instead of being wrapped around a primitive, so its source may be helpful. On Tuesday, November 27, 2001, at 12:32 PM, Trojan F wrote: > hi everyone, i'm new around these parts. i finally got around to > buying sc > yesterday after having, um, borrowed it for a few months. > > anyway i am not the best programmer ever and feel like i might get > savaged > for asking this question, but i'm stuck so here goes. > > i have been working on a drum machine program with gui roughly based on > roland drum machines. one requirement of a drum machine is that hi-hat > sounds and the like are able to cut each other off. i did get this > working > but it was tedious and slightly complicated: that is, whenever a > hit was > played, to calculate when the next note will be and base the decay > time of > the envelope on that. i can't help feeling there must be an easier > way. is > it not possible that, once a Ugen has started playing, i can say > at a later > point, "actually i want you to finish right now"? > > is this explaination clear? > > there is one demo program i saw where a spawn was given a > maxVoices message, > but if i utilised this then surely i would have to have a seperate > spawn > running for each instrument (there are 8) at the moment i have one > spawn > loop which scoops up all the Ugens needed for each particular beat > and mixes > them. > > anyway, if such a "cutoff" command exists i would appreciate being > pointed > in its direction, otherwise i'd be interested to know any alternative > strategies... or maybe everyone's music is far too avant-guarde > for things > like hihats?! > > Trojan F > > ------------------------------ Date: Tue, 27 Nov 2001 22:03:21 +0100 From: Julian Rohrhuber <---@---.---> Subject: Re: AngelFinger > >I cannot figure out how that swiki thing works. Are there instructions >somewhere? http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/117 http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/4 >What is the limit of file size for parking code there ? no, not really. as long as it doesn't cross the gigabyte barrier.. - -- _. ------------------------------ Date: Tue, 27 Nov 2001 15:06:28 -0800 (PST) From: Chris Brown <---@---.---> Subject: hilbert transform? Has anyone looked into implementing linear freq shifting in SC? I saw a CSound version that uses a Hilbert transform to get quadrature outputs of an input sound. Can that be implemented in SC? thanks for any tips, Chris **************************************************** Chris Brown Assoc. Prof. of Music and Co-Director, Center for Contemporary Music (CCM) Mills College, Oakland, CA 94613 email: cbmus@mills.edu, phone: 510-430-2330; fax 510-430-3314 **************************************************** ------------------------------ Date: Tue, 27 Nov 2001 15:17:21 -0800 (PST) From: Chad Kirby <---@---.---> Subject: Re: hilbert transform? Here's what we use. It's more or less a direct port of some csound code that one of our students did a few years ago, probably the same code you saw. It's ugly, I know. Hilbert { *ar { arg in; var ay6, ay12; ay6 = FOS.ar( FOS.ar( FOS.ar( FOS.ar( FOS.ar( FOS.ar(in, -0.99922900, 1, 0.99922900), -0.99415879, 1, 0.99415879), -0.97643625, 1, 0.97643625), -0.90871182, 1, 0.90871182), -0.67793563, 1, 0.67793563), -0.07921014, 1, 0.07921014); ay12 = FOS.ar( FOS.ar( FOS.ar( FOS.ar( FOS.ar( FOS.ar(in, -0.99732703, 1, 0.99732703), -0.98817270, 1, 0.98817270), -0.95336481, 1, 0.95336481), -0.82519599, 1, 0.82519599), -0.43905106, 1, 0.43905106), 0.49495651, 1, -0.49495651); ^[ay6,ay12] * 12.dbamp // correct for severe attenuation } } Chad Kirby // Technical Coordinator for Digital Arts // CARTAH ckirby@u.washington.edu // 206.295.3592 ________ 1492. As children we were taught to memorize this year with pride and joy as the year people began living full and imaginative lives on the continent of North America. Actually, people had been living full and imaginative lives on the continent of North America for hundreds of years before that. 1492 was simply the year sea pirates began to rob, cheat, and kill them. Kurt Vonnegut : Breakfast of Champions On Tue, 27 Nov 2001 at 15:06, Chris Brown wrote: > > Has anyone looked into implementing linear freq shifting in SC? I saw a > CSound version that uses a Hilbert transform to get quadrature outputs of > an input sound. Can that be implemented in SC? > > thanks for any tips, > > Chris > > **************************************************** > Chris Brown > Assoc. Prof. of Music and Co-Director, Center for Contemporary Music (CCM) > Mills College, Oakland, CA 94613 > email: cbmus@mills.edu, phone: 510-430-2330; fax 510-430-3314 > **************************************************** > > ------------------------------ Date: Wed, 28 Nov 2001 01:00:48 +0000 From: Trojan F <---@---.---> Subject: Re: hi-hat cutoff hi jeffery thanks a lot for the input. i don't think either thing is suitable as both seem to need some preperation beforehand. (?) i think i kind of answered my own question to begin with. i am rewriting so that each instrument has its own spawn. there is some nasty clicking when one sound cuts off another, but on a hihat sound it's actually good to have that, and apart from anything else it means each channel can have its own "shuffle" value. Trojan F on 27/11/01 8:18 PM, Jeffrey P Shell at jshell@mac.com wrote: > There is a Cutoff class, but I'm not sure if it would do exactly > what you want. You might want to look at using TrigXFadeTexture (I > think that's the name, I'm away from my SC machine right now) or at > the very least trying to figure out its source. > > TrigXFadeTexture cross fades between sounds when its trigger goes > off. Internally, it's just doing spawns and the code is in SC > instead of being wrapped around a primitive, so its source may be > helpful. > > > On Tuesday, November 27, 2001, at 12:32 PM, Trojan F wrote: > >> hi everyone, i'm new around these parts. i finally got around to >> buying sc >> yesterday after having, um, borrowed it for a few months. >> >> anyway i am not the best programmer ever and feel like i might get >> savaged >> for asking this question, but i'm stuck so here goes. >> >> i have been working on a drum machine program with gui roughly based on >> roland drum machines. one requirement of a drum machine is that hi-hat >> sounds and the like are able to cut each other off. i did get this >> working >> but it was tedious and slightly complicated: that is, whenever a >> hit was >> played, to calculate when the next note will be and base the decay >> time of >> the envelope on that. i can't help feeling there must be an easier >> way. is >> it not possible that, once a Ugen has started playing, i can say >> at a later >> point, "actually i want you to finish right now"? >> >> is this explaination clear? >> >> there is one demo program i saw where a spawn was given a >> maxVoices message, >> but if i utilised this then surely i would have to have a seperate >> spawn >> running for each instrument (there are 8) at the moment i have one >> spawn >> loop which scoops up all the Ugens needed for each particular beat >> and mixes >> them. >> >> anyway, if such a "cutoff" command exists i would appreciate being >> pointed >> in its direction, otherwise i'd be interested to know any alternative >> strategies... or maybe everyone's music is far too avant-guarde >> for things >> like hihats?! >> >> Trojan F >> >> > ------------------------------ Date: Tue, 27 Nov 2001 21:47:54 -0800 From: THOMAS P MILEY <---@---.---> Subject: Indirect referencing I'm trying to get indirect referencing to work. I have an array of arrays, the second group being ones I want to update through the first, but get an unexpected result. Is this approach wrong? Is there a better way to do this? Any help is most appreciated. z7 = FloatArray.new; z6 = FloatArray.new; z5 = FloatArray.new; z4 = FloatArray.new; z3 = FloatArray.new; z2 = FloatArray.new; z1 = FloatArray.new; allArrays = allArrays.add(z7); allArrays = allArrays.add(z6); allArrays = allArrays.add(z5); allArrays = allArrays.add(z4); allArrays = allArrays.add(z3); allArrays = allArrays.add(z2); allArrays = allArrays.add(z1); allArrays.do( { arg array, i; forBy (0.0, 360.0, 5.0, { arg angle; array = array.add(CircleCalc.freq(sp.at(i), // some calculation sp.at(i), centerX, centerY, angle, 330.0)); // additional args }; ); array.postln; // THIS shows all values have been updated correctly }); z7.postln; // THIS only shows 1st 2 values in array, why? z6.postln; z5.postln; ------------------------------ Date: Wed, 28 Nov 2001 01:19:10 -0500 From: felix <---@---.---> Subject: Re: Indirect referencing > From: THOMAS P MILEY <---@---.---> > Reply-To: sc-users@lists.io.com > Date: Tue, 27 Nov 2001 21:47:54 -0800 > To: > Subject: Indirect referencing > > I'm trying to get indirect referencing to work. I have an array of arrays, > the second group being ones I want to update through the first, but get an > unexpected result. Is this approach wrong? Is there a better way to do > this? Any help is most appreciated. > > > z7 = FloatArray.new; > z6 = FloatArray.new; > z5 = FloatArray.new; > z4 = FloatArray.new; > z3 = FloatArray.new; > z2 = FloatArray.new; > z1 = FloatArray.new; > > allArrays = allArrays.add(z7); > allArrays = allArrays.add(z6); > allArrays = allArrays.add(z5); > allArrays = allArrays.add(z4); > allArrays = allArrays.add(z3); > allArrays = allArrays.add(z2); > allArrays = allArrays.add(z1); > > allArrays.do( > { arg array, i; > forBy (0.0, 360.0, 5.0, > { > arg angle; > array = array.add(CircleCalc.freq(sp.at(i), // some calculation right here you potentially / inevitably got a new array back from .add , but you didn't put that new object into the allArrays the first array that you put originally put in there is what is there, and that was sized by default ot be just a couple of items. if you know the precise size it will eventually be the create FloatArray.newClear(size); and just .add to it, trusting that it has enough space allocated > sp.at(i), centerX, centerY, angle, 330.0)); // additional args > }; > ); > array.postln; // THIS shows all values have been updated correctly > }); > > z7.postln; // THIS only shows 1st 2 values in array, why? > z6.postln; > z5.postln; > ------------------------------ Date: Tue, 27 Nov 2001 22:39:25 -0800 From: THOMAS P MILEY <---@---.---> Subject: Re: Indirect referencing Thanks for the quick response. When I do this: > FloatArray.newClear(size); > and just .add to it, trusting that it has enough space allocated and display the values, everything is 0, so has the .add added values to the end? Maybe I should replace rather than add? > From: felix <---@---.---> > Reply-To: sc-users@lists.io.com > Date: Wed, 28 Nov 2001 01:19:10 -0500 > To: > Subject: Re: Indirect referencing > > > >> From: THOMAS P MILEY <---@---.---> >> Reply-To: sc-users@lists.io.com >> Date: Tue, 27 Nov 2001 21:47:54 -0800 >> To: >> Subject: Indirect referencing >> >> I'm trying to get indirect referencing to work. I have an array of arrays, >> the second group being ones I want to update through the first, but get an >> unexpected result. Is this approach wrong? Is there a better way to do >> this? Any help is most appreciated. >> >> >> z7 = FloatArray.new; >> z6 = FloatArray.new; >> z5 = FloatArray.new; >> z4 = FloatArray.new; >> z3 = FloatArray.new; >> z2 = FloatArray.new; >> z1 = FloatArray.new; >> >> allArrays = allArrays.add(z7); >> allArrays = allArrays.add(z6); >> allArrays = allArrays.add(z5); >> allArrays = allArrays.add(z4); >> allArrays = allArrays.add(z3); >> allArrays = allArrays.add(z2); >> allArrays = allArrays.add(z1); >> >> allArrays.do( >> { arg array, i; >> forBy (0.0, 360.0, 5.0, >> { >> arg angle; >> array = array.add(CircleCalc.freq(sp.at(i), // some calculation > > right here you potentially / inevitably got a new array back from .add , > but you didn't put that new object into the allArrays > > the first array that you put originally put in there is what is there, and > that was sized by default ot be just a couple of items. > > if you know the precise size it will eventually be the create > FloatArray.newClear(size); > and just .add to it, trusting that it has enough space allocated > >> sp.at(i), centerX, centerY, angle, 330.0)); // additional args >> }; >> ); >> array.postln; // THIS shows all values have been updated correctly >> }); >> >> z7.postln; // THIS only shows 1st 2 values in array, why? >> z6.postln; >> z5.postln; >> > > > ------------------------------ End of sc-users-digest V1 #386 ******************************