From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #70 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 Monday, November 1 1999 Volume 01 : Number 070 ---------------------------------------------------------------------- Date: Fri, 15 Oct 1999 14:33:26 -0600 From: James McCartney <---@---.---> Subject: Re: file playback woes... At 12:45 PM -0600 10/15/99, Mark Polishook wrote: > offset = (signal.size).rand - (0.2 * sound.sampleRate); PlayBuf is incorrectly generating a NaN when the above generates a negative offset. When that NaN gets into the reverb feedback it wipes it out. (NaN multiplied or added to any number is NaN.) The following will only generate a positive offset and I think may be what you intended anyway : offset = (signal.size - (0.2 * sound.sampleRate)).rand; I'll fix PlayBuf. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Fri, 15 Oct 1999 13:01:51 -0700 From: Mark Polishook <---@---.---> Subject: Re: file playback woes... > The following will only generate a positive offset and I think may be > what you intended anyway : > > offset = (signal.size - (0.2 * sound.sampleRate)).rand; yes, this is what i intended...thanks :) and just for reference, what, exactly, is a NaN? (what does the acronym stand for?) - -mp ------------------------------ Date: Fri, 15 Oct 1999 16:15:47 -0600 From: James McCartney <---@---.---> Subject: Re: file playback woes... At 2:01 PM -0600 10/15/99, Mark Polishook wrote: >> The following will only generate a positive offset and I think may be >> what you intended anyway : >> >> offset = (signal.size - (0.2 * sound.sampleRate)).rand; > >yes, this is what i intended...thanks :) > >and just for reference, what, exactly, is a NaN? (what does the acronym >stand for?) Not a Number. It is what you get if you try to calculate 0/0, or in this case read data that is not a valid FP number. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 16 Oct 1999 09:57:59 +0100 From: finer@easynet.co.uk Subject: Re: sc play auto start >At 10:24 AM -0600 10/15/99, finer@easynet.co.uk wrote: >>Hello, >> >>Is there any way in which sc play could be persuaded to automatically - so >>that if it was put in the startup items folder it would apple - R itself >>and switch itself on ? > >Easy. Just put this.run; at the end of the Main::startUp method. > Brilliant ! Thanks, Jem ------------------------------ Date: Sun, 17 Oct 1999 03:30:33 +0900 From: "merz foobar" <---@---.---> Subject: stop-ing a patch more gracefully Hi, I am pretty new to SC 2.x, though i used SC 1.X a bit (and actually still use it as i have no time to port all my old patches). Anyway, i am not sure if this question has been dealt with already or not, so please excuse this if it is a dumb question. I looked through many of the examples and have not seen an example of what i am looking for. Is there any more elegant way to stop a patch without cutting the music short in it's tracks? Could you use Command-. to stop SC, but say another key combo to cue the last event or two? Otherwise it seems that we are doomed to fading everything out or stopping events mid-stream. I am doing music for a wacky play here and the performance is bound to change from night to night. I would like to perhaps use some of my patches in a live setting, instead of bouncing everything to disk or whatever. This way i can watch the action on stage and when i see something happen i can anticipate the start and end of certain actions and bring my patch to an end more gracefully. I am wondering, most of the examples just sort of pull the plug when you hit Command-period. I wish there was some way to have SC understand that it should stop after it is done with the current gesture and not smack dab in the middle of it. Cheers, kevin Free, fast e-mail accessible anytime, anywhere http://www.imaginemail.com ------------------------------ Date: Sat, 16 Oct 1999 13:50:32 -0600 From: James McCartney <---@---.---> Subject: Re: stop-ing a patch more gracefully At 12:30 PM -0600 10/16/99, merz foobar wrote: >Hi, > >I am pretty new to SC 2.x, though i used SC 1.X a bit (and >actually still use it as i have no time to port all my old >patches). Anyway, i am not sure if this question has been dealt >with already or not, so please excuse this if it is a dumb >question. I looked through many of the examples and have not >seen an example of what i am looking for. > >Is there any more elegant way to stop a patch without cutting >the music short in it's tracks? Could you use Command-. to stop >SC, but say another key combo to cue the last event or two? >Otherwise it seems that we are doomed to fading everything out >or stopping events mid-stream. > >I am doing music for a wacky play here and the performance is >bound to change from night to night. I would like to perhaps >use some of my patches in a live setting, instead of bouncing >everything to disk or whatever. This way i can watch the action >on stage and when i see something happen i can anticipate the >start and end of certain actions and bring my patch to an end >more gracefully. > >I am wondering, most of the examples just sort of pull the plug >when you hit Command-period. I wish there was some way to have >SC understand that it should stop after it is done with the >current gesture and not smack dab in the middle of it. You could do this in many different ways. There are examples in the gui examples file. See: "using GUI items to turn on and off a process" You could also do this with patterns. Here is a simple pattern class that will repeat while a function returns true: Pwhile : FuncFilterPattern { asStream { ^Routine.new({ arg inval; while({ func.value },{ inval = pattern.embedInStream(inval); }); }); } } Then you just have to supply some condition: ... Pwhile({ checkbox.value > 0 }, mypattern ).play; --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Sun, 17 Oct 1999 12:20:59 -0600 From: James McCartney <---@---.---> Subject: PACE problems on OS 9 and new machines. The PACE copy protection will freeze upon launch on any of the new ROM in RAM machines under OS 9 or on the new G4s and iBooks under OS 8.6. This happens with all PACE protected apps, not just SC. I have received a beta copy of the PACE software that supposedly works around this problem, but unfortunately it does not quite work the way it is supposed to. So until I get some working code from PACE, SC is incompatible with those configurations. Hopefully this gets resolved soon. This may prompt me to go with my own serialization method if it drags on too long. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sun, 17 Oct 1999 19:37:40 +0100 From: finer@easynet.co.uk Subject: Re: sc play auto start >At 10:24 AM -0600 10/15/99, finer@easynet.co.uk wrote: >>Hello, >> >>Is there any way in which sc play could be persuaded to automatically - so >>that if it was put in the startup items folder it would apple - R itself >>and switch itself on ? > >Easy. Just put this.run; at the end of the Main::startUp method. > Brilliant ! Thanks, Jem ------------------------------ Date: Mon, 18 Oct 1999 11:29:44 -0600 From: James McCartney <---@---.---> Subject: off to ICMC I'll be off to Beijing on Tuesday morning. Hope to see some of you there. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 18 Oct 1999 15:04:30 EDT From: MByrne1204@aol.com Subject: Re: off to ICMC Hi James, We're leaving Wednesday. See you there. Madelyn ------------------------------ Date: Mon, 18 Oct 1999 16:16:57 -0400 From: Mark Ballora <---@---.---> Subject: Re: off to ICMC ICMC yiding you yisi. zhu ni wan de lu kuai! >I'll be off to Beijing on Tuesday morning. >Hope to see some of you there. > > > --- james mccartney james@audiosynth.com http://www.audiosynth.com >If you have a PowerMac check out SuperCollider2, a real time synth program: > ------------------------------ Date: Tue, 19 Oct 1999 11:37:22 +0100 From: finer@easynet.co.uk Subject: Files and choose new library Hello, Imagine a simple patch to read an item from a file : k = File("info","rb"); k.seek(12,0); k.getInt32).postln; The file, "info", lives in the SuperCollider folder. It works fine. Now imagine trying to make this into a class - part of the process of making a compressed library for SCPlay. ReadAFile{ *ar{ var k; k = File("info","rb"); k.seek(12,0); k.getInt32).postln; } } So far so good - I put this in its own folder along with an alias to common and a version of main which will call ReadAFile.ar. 'choose new library' works perfectly BUT when I hit command - R I get this error : ERROR: Message 'acquire' not understood. RECEIVER: nil ARGS: Instance of Array { (09001298, gc=80, fmt=01, flg=81, set=00) } CALL STACK: Object::doesNotUnderstand arg this = nil arg selector = 'acquire' arg args = [*0] Process::toolboxAcquire arg this = File::prFileRequestSync arg this = arg selector = 'getInt32' arg optionalData = nil var result = nil I thought this might be because the file "info" was not in the same folder as the new library items - but putting the file in that folder makes no difference. Furthermore, once the above error has occurred it becomes impossible to read the file through the original method until one has quit and restarted SC. Why should this problem occur - that one can happily read the file until one tries to compile the file reading patch as part of a new library ? Thanks, Jem ------------------------------ Date: Tue, 19 Oct 1999 09:53:28 -0400 From: Mark Ballora <---@---.---> Subject: Re: Files and choose new library >I thought this might be because the file "info" was not in the same folder >as the new library items - but putting the file in that folder makes no >difference. >Furthermore, once the above error has occurred it becomes impossible to >read the file through the original method until one has quit and restarted >SC. > >Why should this problem occur - that one can happily read the file until >one tries to compile the file reading patch as part of a new library ? > >Thanks, > >Jem I had a problem reading a file into SCPlay earlier. This was James' response: >The interpreter primitive is not implemented in SCPlay. >You cannot interpret text in SCPlay, which is what 'executeFile' does. >Make those files into methods in your Main class. Yours sounds like a related problem. I solved mine by just pasting the contents of the file into the SCPlay class definition -- it made it a long definition, but it didn't matter since I never had to look at it again once it was part of a compressed library. Hope that's of some help. Mark ------------------------------ Date: Tue, 19 Oct 1999 17:20:04 +0100 From: finer@easynet.co.uk Subject: Files and SCPlay - a request ! James, I gather that : >The interpreter primitive is not implemented in SCPlay. >You cannot interpret text in SCPlay, which is what 'executeFile' does. Is there any way that the interpreter primitive could be implemented in SCPlay. My file is over 200 Mb . oops. Hope Beijing was/is good. Thanks, Jem ------------------------------ Date: Fri, 22 Oct 1999 14:25:45 -0700 From: Mark Polishook <---@---.---> Subject: turning things off? James, In the example below, myFunc2 plays for about 2 minutes when I trigger TSpawn from a CheckBoxView. How can I force it (myFunc) to turn off before all the patterns it contain run their course? In other words, how can I turn it on and off (within the space of a few seconds) several times in a row and/or just let it run its course, to be re-triggered as necessary, without accumulating more and more CPU usage. - --- ( myFunc1 = { ... freq-modulated LFSaw .... }; myFunc2 = { ....more code - Spawns, Pbinds, etc. .... }; Synth.play({ Pause.ar( myFunc1, aCheckBoxView2.kr(0) ) + Tspawn.ar( { myFunc2 }, 2, 1, aCheckBoxView2.kr(0) }) ) Thanks, Mark ------------------------------ Date: Sun, 24 Oct 1999 02:22:17 -0400 From: Mic Berends <---@---.---> Subject: OMS makes SC crash badly. 2.3.6 on my PBG3 + SC 2.2.3 under OS8.6 is not good for me, no errors just complete locking of the computer. was a bugger to trace, so if you've been having problems like i have since 2.1 disable it and make yourself happy. perhaps James would consider adding FreeMIDI support if MOTU would be a bit more open with their SDK, unfortunately newer versions of FreeMIDI no longer emulate OMS but switch with it. OMS also crashes the world when other apps try to access it. i know there's a 2.3.7 but not what it's supposed to fix and most revs lately have been to deal with new macs & OSes... i'm going to want MIDI in though so i'll give it a go and report back. Cheers, Mic. - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v ^ Mic Berends : in the end, : Tomorrow Maximum v ^ MINDESIGN limited : there can be : Heaven Kissing EP v ^ http://www.mindesign.com/ : only one. : available now. v ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Sun, 24 Oct 1999 02:24:27 -0400 From: Mic Berends <---@---.---> Subject: SC 2.2.3 newbie ?s + possible bugs. (Signal) overdub seems to be broken; i use it in exactly the same context as overwrite which works fine. *** two questions on the following: 1. why doesn't osc1.ar play the wavetable, it errors out; using osc.ar with appropriate args works fine. 2. how can i make "a" into a wavetable and add it to "t" by uncommenting "t = t + a"? i would like it to wrap at 1 as well. the Signal stuff seems overly cumbersome given the new Wavetable functionality... ( // declarations var a, t; // fill the array a = Array.series(256, 0, (1/256)); // generate a sine wave table t = Wavetable.sineFill(256, [1]); // t = t + a {[(doesn't work)]} { Osc1.ar(t, 1000) }.play • ERROR: Osc1 table not a Signal. ) thanks for any help! Cheers, Mic. - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v ^ Mic Berends : in the end, : Tomorrow Maximum v ^ MINDESIGN limited : there can be : Heaven Kissing EP v ^ http://www.mindesign.com/ : only one. : available now. v ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Sun, 24 Oct 1999 09:47:26 +0100 From: finer@easynet.co.uk Subject: Re: OMS makes SC crash badly. I still use OMS 2.3.2 - never gives any problem at all. Jem >2.3.6 on my PBG3 + SC 2.2.3 under OS8.6 is not good for me, no errors just >complete locking of the computer. was a bugger to trace, so if you've been >having problems like i have since 2.1 disable it and make yourself happy. >perhaps James would consider adding FreeMIDI support if MOTU would be a >bit more >open with their SDK, unfortunately newer versions of FreeMIDI no longer emulate >OMS but switch with it. OMS also crashes the world when other apps try to >access it. i know there's a 2.3.7 but not what it's supposed to fix and most >revs lately have been to deal with new macs & OSes... i'm going to want >MIDI in >though so i'll give it a go and report back. > >Cheers, >Mic. > >-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v >^ Mic Berends : in the end, : Tomorrow Maximum v >^ MINDESIGN limited : there can be : Heaven Kissing EP v >^ http://www.mindesign.com/ : only one. : available now. v >^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Sun, 24 Oct 1999 17:04:27 -0400 From: Mic Berends <---@---.---> Subject: further on the newbie path... okay, let me describe what i am trying to do: it is an extrapolation of Lawrence Ball's Harmonic Mathematics technique, which, if i am grokking it correctly, simply amounts to pushing a sawtooth wave vertically through a wavetable by iterative adds with wrapping or reflecting of values >1 or <-1. his BASIC code: FOR x= 1 to 256 Fraction(x)=Fraction(x)+x IF Fraction(x)<=256 THEN GOTO L1 Fraction(x)=Fraction(x)-256 Array(x)=Array(x)+1 IF Array(x)>limit(say,32767) THEN Array(x)=Array(x)-limit L1: update sample as readtable(Array(x)) NEXT x very different method of working in SC due to structure and using floats. i'm not even entirely sure how the above code is supposed to work, but my process is as i explained above. i'm trying to do this in real-time as opposed to concatenating a longer table for sample output... my SC code: ( // declarations var a, b; // fill wavetables b = Signal.sineFill(1024, [1]); a = Signal.newClear(1024); a.waveFill({ arg x; (x*2)-1 }, 0, 1 ); // make a sawtooth wave b.asWavetable // unsure if this is necessary or even legal // this is the function i want to iterate with wrapping / reflecting (b = a + b; { Osc1.ar(b, 1) } ).play ) strangely enough it seems to make no difference if it use Osc or Osc1, and i cannot change the pitch at all with Osc so something is buggered. i have no idea how to wrap wavetables values in an add and have had much difficulty with things as follows - methods that i thought should have worked are commented out followed by what "did work": ( // declarations var a, b, t, x; // fill wavetables // t = Wavetable.sineFill(1024, [1]); // [not a Signal? can't do math ops on...] t = Array.series(1024, 0, (1/1024)); // [seems like tables created @ 2x specified size...] // a = Signal.newClear(1024).fill(t).plot; // [doesn't work, says wrong type] a = Signal.newClear(1024); a.waveFill({ arg x; (x*2)-1 }, 0, 1 ); b = Signal.sineFill(1024, [1]); // b.overDub(a, 0); // [overDub broken, overWrite in same context works fine] b = a + b; // [doesn't work, how to do with wrap and with bounce/reflect at >1 ?] // b.asWavetable // [doesn't work to massage data into Osc-friendly form, no complaints from the interpreter though...] // a.plot; // b.plot; // [why don't these work?] // t.plot; // SignalWindow.new(signals: [ a, b, t ] ); // [this opens window but no graphing occurs] { Osc.ar(b, 220, 0) }.play //{ Osc1.ar(x, 10000) }.play // [doesn't work] ) thanks heaps for any assistance! Cheers, Mic. - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v ^ Mic Berends : in the end, : Tomorrow Maximum v ^ MINDESIGN limited : there can be : Heaven Kissing EP v ^ http://www.mindesign.com/ : only one. : available now. v ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Mon, 25 Oct 1999 11:08:10 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: further on the newbie path... Hi Mic, maybe this is helpful for you: have you tried using modulo, like this: a.waveFill({ arg x; (x*2) % 2 -1 }, 0, 1); all the conversion difficulties I had as well, I think you can work with s.waveFill({ arg x, i; a.wrapAt(t.asInteger) }, 0, 1); // t is an array; best, Julian > okay, let me describe what i am trying to do: > it is an extrapolation of Lawrence Ball's Harmonic Mathematics technique, which, > if i am grokking it correctly, simply amounts to pushing a sawtooth wave > vertically through a wavetable by iterative adds with wrapping or reflecting of > values >1 or <-1. > > his BASIC code: > > FOR x= 1 to 256 > Fraction(x)=Fraction(x)+x > IF Fraction(x)<=256 THEN GOTO L1 > Fraction(x)=Fraction(x)-256 > Array(x)=Array(x)+1 > IF Array(x)>limit(say,32767) THEN Array(x)=Array(x)-limit > L1: > update sample as readtable(Array(x)) > NEXT x > > very different method of working in SC due to structure and using floats. i'm > not even entirely sure how the above code is supposed to work, but my process is > as i explained above. i'm trying to do this in real-time as opposed to > concatenating a longer table for sample output... > > my SC code: > > ( > // declarations > var a, b; > > // fill wavetables > b = Signal.sineFill(1024, [1]); > a = Signal.newClear(1024); > a.waveFill({ arg x; (x*2)-1 }, 0, 1 ); // make a sawtooth wave > b.asWavetable // unsure if this is necessary or even legal > > // this is the function i want to iterate with wrapping / reflecting > (b = a + b; > { Osc1.ar(b, 1) } > ).play > ) > > strangely enough it seems to make no difference if it use Osc or Osc1, and i > cannot change the pitch at all with Osc so something is buggered. i have no > idea how to wrap wavetables values in an add and have had much difficulty with > things as follows - methods that i thought should have worked are commented out > followed by what "did work": > > ( > // declarations > var a, b, t, x; > > // fill wavetables > > // t = Wavetable.sineFill(1024, [1]); // [not a Signal? can't do math ops on...] > t = Array.series(1024, 0, (1/1024)); // [seems like tables created @ 2x > specified size...] > > // a = Signal.newClear(1024).fill(t).plot; // [doesn't work, says wrong type] > a = Signal.newClear(1024); > a.waveFill({ arg x; (x*2)-1 }, 0, 1 ); > > b = Signal.sineFill(1024, [1]); > > // b.overDub(a, 0); // [overDub broken, overWrite in same context works fine] > b = a + b; // [doesn't work, how to do with wrap and with bounce/reflect at >1 ?] > > // b.asWavetable // [doesn't work to massage data into Osc-friendly form, no > complaints from the interpreter though...] > > // a.plot; > // b.plot; // [why don't these work?] > // t.plot; > > // SignalWindow.new(signals: [ a, b, t ] ); // [this opens window but no > graphing occurs] > > { Osc.ar(b, 220, 0) }.play > //{ Osc1.ar(x, 10000) }.play // [doesn't work] > ) > > thanks heaps for any assistance! > > Cheers, > Mic. > > -- > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v > ^ Mic Berends : in the end, : Tomorrow Maximum v > ^ MINDESIGN limited : there can be : Heaven Kissing EP v > ^ http://www.mindesign.com/ : only one. : available now. v > ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Mon, 25 Oct 1999 19:13:50 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: further on the newbie path... that was a typo of course, it should say s.waveFill({ arg x, i; t.wrapAt(x.asInteger) }, 0, 1); // t is an array; > Hi Mic, > maybe this is helpful for you: > > have you tried using modulo, like this: > a.waveFill({ arg x; (x*2) % 2 -1 }, 0, 1); > > all the conversion difficulties I had as well, I think you can work with > s.waveFill({ arg x, i; a.wrapAt(t.asInteger) }, 0, 1); // t is an array; > > best, > Julian > ------------------------------ Date: Mon, 25 Oct 1999 19:14:02 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: further on the newbie path... that was a typo of course, it should say s.waveFill({ arg x, i; t.wrapAt(x.asInteger) }, 0, 1); // t is an array; > Hi Mic, > maybe this is helpful for you: > > have you tried using modulo, like this: > a.waveFill({ arg x; (x*2) % 2 -1 }, 0, 1); > > all the conversion difficulties I had as well, I think you can work with > s.waveFill({ arg x, i; a.wrapAt(t.asInteger) }, 0, 1); // t is an array; > > best, > Julian > ------------------------------ Date: Tue, 26 Oct 1999 02:44:32 -0400 From: Mic Berends <---@---.---> Subject: advanced newbie technique. (drunken monkey style) hi Julian! thanks for the response. of course i have to get into this whilst everyone is @ ICMC... :| Julian Rohrhuber wrote: > have you tried using modulo, like this: > a.waveFill({ arg x; (x*2) % 2 -1 }, 0, 1); why is this preferable to my: a.waveFill({ arg x; (x*2)-1 }, 0, 1 ); (i'm not all that clear on what modulo is; the output numbers and plot look the same, what is the difference? it is still float values...) there is a problem with both of them that i get Signal[-1 .. 0.998047] when i want Signal [-1 .. 1], correct? > all the conversion difficulties I had as well, I think you can work with > s.waveFill({ arg x, i; t.wrapAt(x.asInteger) }, 0, 1); // t is an array; this give me nothing no matter what (t) i feed it. i am using .series to build (t), which makes an ArrayedCollection instead of an Array, could this be the problem? it seems like the two methods i need most, Signal.asWavetable and Signal.overDub are broken, but i have to assume i just don't know what's going on... thanks again! Cheers, Mic. P.S. i'm really surprised that nothing about manipulating wavetables or additive synthesis has come up on the list before! it seems one of SC's most powerful features, once you get past all the fantastic UGens that James has written... - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v ^ Mic Berends : in the end, : Tomorrow Maximum v ^ MINDESIGN limited : there can be : Heaven Kissing EP v ^ http://www.mindesign.com/ : only one. : available now. v ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Tue, 26 Oct 1999 15:51:38 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: advanced newbie technique. (drunken monkey style) hi Mic ! > > > Julian Rohrhuber wrote: > > have you tried using modulo, like this: > > a.waveFill({ arg x; (x*2) % 2 -1 }, 0, 1); > > why is this preferable to my: > a.waveFill({ arg x; (x*2)-1 }, 0, 1 ); > (i'm not all that clear on what modulo is; the output numbers and plot look the > same, what is the difference? it is still float values...) > Signal[-1 .. 0.998047] > when i want Signal [-1 .. 1], correct? > > modulo creates a numberspace that bites in itīs own tail. so the number follwowing % is the one that is not element of the possible outcomes (I think...) . Reaching that number it jumps back to zero. Itīs a nice mathematical concept. > s.waveFill({ arg x, i; t.wrapAt(x.asInteger) }, 0, 1); // t is an array; > > this give me nothing no matter what (t) i feed it. i am using .series to build(t), > which makes an ArrayedCollection instead of an Array, could this be the problem? // I tried it again, it works for me like this: ( s = Signal.newClear(512); t = Array.fill(512, { arg i; i/512 }); s.waveFill({ arg x, i; t.wrapAt(x.asInteger) }, 0, 512); // t is an array; s.plot; ) > > > P.S. i'm really surprised that nothing about manipulating wavetables or > additive synthesis has come up on the list before! it seems one of SC's most > powerful features, once you get past all the fantastic UGens that James has written... true, maybe because Pattern was created and this was a lot to discuss Cheers, Julian ------------------------------ Date: Wed, 27 Oct 1999 01:59:00 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re :drunken crane style here some other experiment with Signal as filter, starting from the FFT Examples: ( // variation of random fft filtering var filterWindow, w, h; var fftsize, numffts, fftoffsets; var overlapWindow, cosineTable; var src1, fft, ifft, out; numffts = 2; // number of overlapped FFTs fftsize = 512; // length of FFT buffer w = GUIWindow.new("win", Rect.newBy(649, 251, 266, 160)); ButtonView.new( w, Rect.newBy(124, 85, 71, 40), "more", 0, 0, 1, 0, 'linear'); ButtonView.new( w, Rect.newBy(206, 61, 40, 29), "reset", 0, 0, 1, 0, 'linear'); SliderView.new( w, Rect.newBy(14, 51, 163, 16), "shift", fftsize, fftsize/3, fftsize, 1, 'linear'); filterWindow = Signal.fill(fftsize, { if (0.01.coin, 1.0, 0.0) }); w.at(0).action = { var z; z = Signal.fill(fftsize, { if (0.01.coin, 1.0, 0.0) }); filterWindow.overDub(z, 0)}; w.at(1).action = { var z; z = Signal.fill(fftsize, { if (0.01.coin, 1.0, 0.0) }); filterWindow.overWrite(z, 0)}; w.at(2).action = { var z; z = filterWindow; filterWindow.overWrite(z, w.at(2).value)}; //moves about peaks //h = HarmonicsDialog.new(filterWindow.asWavetable); //this doesn't work,why? { // make offsets for staggering overlapped FFTs fftoffsets = Array.series(numffts, 0, fftsize/numffts); // make a signal analysis/synthesis window overlapWindow = Signal.welchWindow(fftsize); // make cosine table required for FFT cosineTable = Signal.fftCosTable(fftsize); src1 = LFPulse.ar(SinOsc.kr(0.4,0,200,300), 0.3, 0.4); // transform src1 fft = FFT.ar(fftsize, fftoffsets, cosineTable, overlapWindow, nil, src1, 0.0); // inverse transform ifft = IFFT.ar(fftsize, fftoffsets, cosineTable, filterWindow, overlapWindow, fft.real, fft.imag); // if h is uncommented, .asSignal is needed for filterWindow out = Mix.ar(ifft.real); // mix overlapped outputs out/numffts }.scope(0.1); //h.close; w.close; ) cheers, julian ------------------------------ Date: Wed, 27 Oct 1999 18:57:59 -0400 From: Scott Wilson <---@---.---> Subject: GUIUtils Hi all, After compiling the GUIUtils library, I get the following error when executing Bang-R, or any of the example libraries. I checked back, and this seems to be a problem with earlier versions of SC as well. Poking around a bit hasn't yet tracked down the source of the problem. Any thoughts? Scott Wilson ERROR: Message 'streamContentsLimit' not understood. RECEIVER: class String (03CC9610) { instance variables [18] name : Symbol 'String' nextclass : class StringView (03D75E78) superclass : Symbol 'RawArray' subclasses : nil methods : instance of Array (03E07128, size=28, set=05) instVarNames : nil classVarNames : nil iprototype : nil cprototype : nil instanceFormat : Integer 8 instanceFlags : Integer 0 instanceRawSize : Integer 0 classIndex : Integer 377 classFlags : Integer 3 maxSubclassIndex : Integer 377 rawInitFunc : Integer 0 filenameSymbol : Symbol 'Macintosh:Desktop Folder:SC2.2.3:Common:Collections:String.sc' lineNo : Integer 1 } ARGS: Instance of Array { (043A8438, gc=02, fmt=01, flg=00, set=01) indexed slots [2] 0 : instance of Function (043A8408, size=0, set=01) 1 : Integer 200 } CALL STACK: Object::doesNotUnderstand arg this = class String arg selector = 'streamContentsLimit' arg args = [*2] Object::asString arg this = [*4] var string = nil var limit = 200 SoundModel::makearcode arg this = arg inclass = class SinOsc arg inspecs = [*4] arg indefaults = [*4] var args = nil var code = nil SoundModel::compilesoundfromclass arg this = arg inclass = class SinOsc arg inspecs = [*4] arg indefaults = [*4] arg methodname = 'ar' var code = nil SoundModel::parseclass arg this = arg inclass = class SinOsc arg extraspecs = nil var method = Meta_SinOsc::ar var spfs = [*5] var defs = [*5] var parsize = 4 var par = 0.000000 Meta_SoundModel::fromclass arg this = class SoundModel arg inclass = class SinOsc arg extraspecs = nil arg name = nil Meta_SoundModel::new arg this = class SoundModel arg object = class SinOsc arg extraspecs = nil arg name = nil SoundLib::getsoundmodel arg this = arg soundname = 'sinOsc' ... ------------------------------ Date: Thu, 28 Oct 1999 09:23:12 +0100 From: rkuivila@mail.wesleyan.edu (Ron Kuivila) Subject: Some NaN related bugs/problems Hi James, It looks like Gate is not initialized on start up. So, it returns a deal breaking NaN in the following code: Synth.play({ thisSynth.sched(0.1, {x.poll.postln;}); SinOsc.ar(400,0,x = Gate.kr(TabletX.kr(0.001,1,'exponential') - 0.001, TabletButton.kr)); }) Also, the Butterworth hipass is unstable with low cutoff frequencies. For example: { HPF.ar(Saw.ar(200,0.1),0, 5) }.play; dies immediately. Here are a couple of minor wishes: 1. It would be nice to have an efficient way to force exponential faders to zero. For example, there might be a warp type 'clippedExponential' that subtracts the minimum from the result. 2. It would also be nice to have a 'reset' message for Ugens that just looks for any NaN's in the Ugens variables and sets them to 0 (or maybe a specified value). RJK ------------------------------ Date: Thu, 28 Oct 1999 13:09:58 +0200 From: andreas pieper <---@---.---> Subject: 1212 io, signalview hi, is there a way to prevent sc from crashing with the korg 1212 board when i saturate the cpu (way) over 100%? using the mac sound hardware is much more forgiving in this respect. another thing which keeps me scratching my head: whats the deal with the zoom parameter in SignalView? i just wanted to display a sample in a signalview, and with the given signal.size (and the signalview dimensions) i failed to calculate the right zoom value to display the whole sample. brzk, a andreas pieper mego@url.de pgp fingerprint A7B1 721D 65E6 1A2D BA28 4112 28B2 C3B8 ------------------------------ Date: Thu, 28 Oct 99 13:30:31 -0000 From: Mark Trayle <---@---.---> Subject: VxPocket support? Hi, Does Supercollider support the VxPocket card? - -MT Mark Trayle CalArts School of Music Composition and New Media Chair, Composition Program http://shoko.calarts.edu/~met tel: +1.661.255.1050 x2546 / fax: +1.661.255.0938 ------------------------------ Date: Sat, 30 Oct 1999 19:30:52 -0400 (EDT) From: Matthew Rogalsky <---@---.---> Subject: polling Array values I have not found a reference in any of the documentation which would answer this question: I have an Array with values being continuously changed. I see the values changing in GUI numerical views, polling the array elements inside a trepeat. However, when I try to use the array values to, for instance, control the freq. of an oscillator: SinOsc.ar(myArray.at(0)); all I get is the value the array was initialized with. This question is similar to one I asked not long ago, to which the answer was: use a Plug to get the changing value. But wrapping myArray.at(0) in a Plug still does not give me the changing value. Wrapping in a Plug a numerical view which I am updating from the array DOES give me the changing value, but since the views are only being updated 10 times a second the changes are not smooth... thanks for any pointers Matt Rogalsky ------------------------------ Date: Sun, 31 Oct 1999 08:24:51 +0000 From: Martin Robinson <---@---.---> Subject: Re: polling Array values Matt, How are the values in the array being continuously changed? It's difficult to work out what you're doing but taken this example: ( Synth.play({ var array, sines; array = Array.rand(5, 100, 1000.0); sines = SinOsc.ar(array, 0, array.size.reciprocal); thisSynth.trepeat(0, 0.1, { array.put(array.size.rand, exprand(100, 1000.0)) }); Mix.ar(sines) }) ) where one value in 'array' is updated 10 times a second. Only the initial values are heard (as per your example). If you wrap each value in 'array' in a Plug, you then change the value by changing the 'source' of the Plug. a = Plug.kr(1) makes a plug 'a' with a source of 1 (i.e. it outputs 1 at control rate). a.source_(0) // (or equivalently a.source = 0) sets the source of the Plug 'a' to 0 so 'a' now outputs 0 at control rate. Applying this to the above axample we get: ( Synth.play({ var array, sines; array = Array.rand(5, 100, 1000.0); array = array.collect({ arg item, i; Plug.kr(item, 0) // no lagging }); sines = SinOsc.ar(array, 0, array.size.reciprocal); thisSynth.trepeat(0, 0.1, { array.at(array.size.rand).source_(exprand(100, 1000.0)) }); Mix.ar(sines) }) ) So, you may need to modify the way in which the values in your array are updated e.g. from: array.put(i, newValue) // where 'array' is an array of floats or ints to: array.at(i).source_(newValue) // where 'array' is an array of Plugs I've probably totally missed you're point but hopefully this is of some use. Martin >>>>>>Martin Robinson :: (Ex)tractor :: && ________ >>><<<_sonicArts.at(middlesexUniversity.london.uk); ______ <><><>__this.liveElectronics.interFaces.diffusion ____ >><<>>___extractor.artistsInResidence.at(breweryArtsCentre) ___ >>><<>____kendal :: 19 - 20 - 21 :: november :: 1 9 9 9 __ || ------------------------------ Date: Sun, 31 Oct 1999 13:14:03 -0500 From: Mic Berends <---@---.---> Subject: Re: advanced newbie technique. (drunken deutschlander style) g'day Julian! happy Oktoberfest! Julian Rohrhuber wrote: > modulo creates a numberspace that bites in itīs own tail. so the number follwowing % is > the one that is not element of the possible outcomes (I think...) . Reaching that number > it jumps back to zero. Itīs a nice mathematical concept. my experience of modulo is that it gives the remainder of an integer division... the above sort of seems like a functional description of that, but i don't know! have to ask James when he gets back how this is implemented... > // I tried it again, it works for me like this: > ( > s = Signal.newClear(512); > t = Array.fill(512, { arg i; i/512 }); > s.waveFill({ arg x, i; t.wrapAt(x.asInteger) }, 0, 512); // t is an array; > s.plot; > ) yes, that's it, except for the part to get the data into negative land. still can't get Osc to accept the data, no way no how even after using this.asWavetable in as many permutations as i could find. i've stopped banging my head against the wall and shall simply wait for everyone to return from the ICMC! cool example. Cjeers, Mic. - -- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v ^ Mic Berends : in the end, : Tomorrow Maximum v ^ MINDESIGN limited : there can be : Heaven Kissing EP v ^ http://www.mindesign.com/ : only one. : available now. v ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ------------------------------ Date: Mon, 1 Nov 1999 19:40:47 -0500 (EST) From: Landon Rose <---@---.---> Subject: Re: VxPocket support? Mark- I use one with a PB 2400 and it works fine with SC. >Hi, >Does Supercollider support the VxPocket card? > >-MT > > >Mark Trayle >CalArts School of Music Composition and New Media >Chair, Composition Program >http://shoko.calarts.edu/~met >tel: +1.661.255.1050 x2546 / fax: +1.661.255.0938 ------------------------------ End of sc-users-digest V1 #70 *****************************