From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #318 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, July 8 2001 Volume 01 : Number 318 ---------------------------------------------------------------------- Date: Fri, 06 Jul 2001 08:23:52 -0500 From: James McCartney <---@---.---> Subject: Re: soundfile as wavetable on 7/6/01 6:41 AM, newton armstrong at newton@hard.net.au wrote: > tomonori yamasaki wrote: > >> like this? make a signal buffer and do .asWavetable... I did it with >> delayline but you can just load up with soundfile > > What I'm interested in doing is a bit different. Basically, I want to > convert short soundfiles to wavetables for use in some waveshaping > instruments, so I'm looking for an algorithm that will squeeze the (entire) > soundfile into an appropriately sized table. Appropriate size is, in this > instance, the first power of two lower than the length of the original > soundfile. This needs to be done without truncation and with minimal data > loss. > You are going to have to use a sample interpolation algorithm. Usually this involves convolving many samples around each input sample with a sinc function to get one output sample. For a cyclic table actually sinc is not the ideal but instead the buzz formula sin(x)/sin(t) because it is cyclic also. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 6 Jul 2001 16:25:59 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: MyRibosome >http://134.100.176.42:80/swiki/MusicTechnology/uploads/301/ >file size is 0k, according to this directory listing... plus I get "document >contains no data" error. can you check it again? this was broken. It should work now. > >well, if I put your "proteinBioSynthesis" into default lib folder (SC2.2.10, >not SCPlay and re-compile, I get "out of memory" error. something in this >code is messing up with memory, if this is not so hungry... or, have you >modified some other classes? yes, some minor things are different, but don't they get compressed, too? ProteinBioSynthesis is not very big, it just is a number of Dictionaries and some Pattern classes. I'm in the process of reworking them, but the old ones should not really be a problem. One thing I forgot to mention: File.nextN is still broken in SC2.2.10: it should be nextN { arg n; ^String.fill(n, { this.next; }); } instead of nextN { arg n; String.fill(n, { this.next; }); } but your error looks like something else. I have tried ProteinBioSynthesis classes with a brand new version of SC2.2.10 and it compiled fine (G3). To make it work properly though, you'd have to correct the method above. > >>From: julisn <---@---.---> >>To: sc-users@lists.io.com >>Subject: Re: MyRibosome >>Date: Fri, Jul 6, 2001, 5:32 AM >> > >> >> >> Dror Feiler wrote: >> >>> >>>>i get "danger out of memory" error. assigning 250MB is not enough? >>> >>> >>> >>>what computer do you use? >>> >>>I remember that kind of problem reported with SCPlay on a G4. >>> >>> >>> >>>did anyone else here have the same problem? >>> >> >>> >>I use a Titanium and have the same problem. >>> >> >>> >>Dror >>> > >>> >Does SCPlay2.2.10 run on your computer? >>> >>> Yes I can run SCPlay 2.2.10 on my computer >>> >>> Dror >> >> - does the Default.lib work that I posted on >> http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/301? >> - can you open the Default.lib of MyRibosome with SCPlay 2.2.10? >> >> >> >> ------------------------------ Date: Fri, 6 Jul 2001 17:25:04 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: MyRibosome > >> >>well, if I put your "proteinBioSynthesis" into default lib folder (SC2.2.10, >>not SCPlay and re-compile, I get "out of memory" error. something in this >>code is messing up with memory, if this is not so hungry... or, have you >>modified some other classes? there is a freshly compressed library-only-version on http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/MyRibosome there are no extra classes, only one change (in File.nextN ) now I have moved the program out of the run method into initLib, so you have to call it by selecting it from the lib... ------------------------------ Date: Fri, 06 Jul 2001 19:44:06 +0200 From: Alberto de Campo <---@---.---> Subject: Re: soundfile as wavetable Hi, ben wrote: > me too me too! :) > -- > ben milstein > mintyfresh > www.soundmangle.com - www.elmconceptions.com > > > From: newton armstrong <---@---.---> > > Reply-To: sc-users@lists.io.com > > Date: Fri, 06 Jul 2001 09:44:26 +1000 > > To: > > Subject: soundfile as wavetable > > > > I want to make a function that converts soundfiles to wavetables. It should > > compress the number of frames in the soundfile to the next lower power of 2 > > without any truncation. Does anybody have an algorithm for this kind of > > thing? I'm not sure which samples to drop, or how to interpolate. You could use PlayBuf's linear interpolation for a quick'n'dirty interim solution. In SC3 PlayBuf also has optional cubic interpolation. ( // make a table from a soundfile's signal: var filename, sound, signal, signalSizeP2, adjustedSig, table; filename = ":Sounds:floating_1"; sound = SoundFile.new; if (sound.read(filename), { signal = sound.data.at(0); // new signal size is next smaller power of two. signalSizeP2 = signal.size.nextPowerOfTwo div: 2; [ signal.size, signalSizeP2 ].postln; adjustedSig = Synth.collect( { PlayBuf.ar(signal, Synth.sampleRate, signal.size / signalSizeP2) }, signalSizeP2 / Synth.sampleRate ); table = adjustedSig.asWavetable; table.plot("floatAsTable"); },{ (filename ++ " not found.\n").post }); ) best, adc ------------------------------ Date: Fri, 06 Jul 2001 19:06:30 -0700 From: nicolocollinsi <---@---.---> Subject: Re: soundfile as wavetable I like ben's solution, but here' s some poor naive code that does what you want- add cubic interpolation yourself is you like sorry about the messiness, but you should be able to get it to work cheers ( var source,signal,targetsize,size,mult; s= SoundFile.new; if(not(s.read(":Sounds:input")),{"failure".postln}); source= s.data.at(0); source.plot; //source.size is longer than the sample with some sample formats! size=source.size; size.postln; targetsize=source.size.asInteger.nextPowerOfTwo*2; targetsize.postln; signal=Signal.newClear(targetsize); mult=size/targetsize; signal.waveFill( {arg x,i; var val,index,floor,next,prop; index= x*mult; //float index floor=index.asInteger; if(floor<(size-1),{next= floor+1},{next=floor}); prop=index-floor; //linear interp val= ((1.0-prop)*(source.at(floor))) + (prop*(source.at(next))); /*x.postln;index.postln;floor.postln;prop.postln;next.postln;val.postln;*/ val } ,0,targetsize); signal.plot; w= signal.asWavetable; //convert Signal to wavetable w.write(":nick:wavetables:output"); ) ------------------------------ Date: Fri, 6 Jul 2001 21:54:16 +0200 From: Julian Rohrhuber <---@---.---> Subject: MyRibosome 0.2 a revosited version is available on: http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/MyRibosome fixes: the Pattern lib has changed (I'll put the new code on the swiki soon, too) sometimes SCPlay would quit when a Dialog appeared. the occasional (?) incompatibility with G4 is still unresolved. ------------------------------ Date: Fri, 6 Jul 2001 17:24:46 -0400 From: Phil C <---@---.---> Subject: test, ignore I have tried subscribing before, so I am trying to make sure it worked this time... ------------------------------ Date: Fri, 06 Jul 2001 14:25:13 -0700 From: "C. Ramakrishnan" <---@---.---> Subject: Pboolnet After reading this article "Boolean Networks for the Generation of Rhythmic Structure": http://farben.latrobe.edu.au/mikropol/volume6/dorin_a/dorin_a.html I decided to implement a Boolean network pattern in SC. The class and help are at: http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/302 - - sekhar - -- C. Ramakrishnan cramakrishnan@acm.org ------------------------------ Date: Fri, 6 Jul 2001 23:29:48 +0200 From: Arie van Schutterhoef <---@---.---> Subject: Re: test, ignore >I have tried subscribing before, so I am trying to make sure it worked this >time... - -It did... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................. ^ 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: Sat, 07 Jul 2001 07:49:00 +1000 From: newton armstrong <---@---.---> Subject: Re: soundfile as wavetable Thanks to all who responded - there's many useful things to be getting on with. If anyone has any pointers to on-line source code for sample interpoltation algorithms, I'd be interested to follow them up as well. ------------------------------ Date: Fri, 06 Jul 2001 18:09:40 -0400 From: christian adam hresko <---@---.---> Subject: Re: Pboolnet "C. Ramakrishnan" wrote: > After reading this article "Boolean Networks for the Generation of > Rhythmic Structure": > http://farben.latrobe.edu.au/mikropol/volume6/dorin_a/dorin_a.html > > I decided to implement a Boolean network pattern in SC. > > The class and help are at: > > http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/302 > > - sekhar > > -- > C. Ramakrishnan cramakrishnan@acm.org from the class comments: // 0 is false right? I can never remember... yes. 0 is false, 1 is true. cheers, christian ------------------------------ Date: Fri, 06 Jul 2001 18:31:42 -0400 From: christian adam hresko <---@---.---> Subject: yes? "Computer games don't affect kids. I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." Kristian Wilson, Nintendo, Inc, 1989 ------------------------------ Date: Sat, 07 Jul 2001 02:11:33 +0100 From: LUThER_SKIZZO <---@---.---> Subject: Re: yes? on 6/7/01 11:31 pm GMT, christian adam hresko at godpup@ix.netcom.com apparently typed: > "Computer games don't affect kids. I mean if Pac-Man affected us as > kids, we'd all be running around in darkened rooms, munching magic pills > and listening to repetitive electronic music." > > Kristian Wilson, Nintendo, Inc, 1989 > > > > > > Yes We're in the shit mate. Brilliant quote. - -- LUThER ------------------------------ Date: Sat, 07 Jul 2001 00:32:28 -0400 From: christian adam hresko <---@---.---> Subject: no more cube more apple goodness: CUPERTINO, California—July 3, 2001— Apple® today announced that it will suspend production of the Power Mac™ G4 Cube indefinitely. The company said there is a small chance it will reintroduce an upgraded model of the unique computer in the future, but that there are no plans to do so at this time. think different(ly). go bankrupt. cheers, christian ------------------------------ Date: Sat, 7 Jul 2001 15:11:29 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: Pboolnet >After reading this article "Boolean Networks for the Generation of >Rhythmic Structure": > http://farben.latrobe.edu.au/mikropol/volume6/dorin_a/dorin_a.html > >I decided to implement a Boolean network pattern in SC. > >The class and help are at: > > http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/302 > >- sekhar > >-- >C. Ramakrishnan cramakrishnan@acm.org great! this is beautiful. ------------------------------ Date: Sat, 7 Jul 2001 19:45:35 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: Pboolnet do you know the reason why so many boolean networks start repeating so soon? the following patch shows it: ( a = { Array.fill(7, { [[0,1].choose, [\and, \or, \xor, \not].choose] }).flat }; x = Array.fill(4, { Pboolnet(a.value, inf); }); y = 0; x.do({ arg item; y = y + item }); z = y.asStream; 100.do({ z.next.postln }); ) ------------------------------ Date: Sat, 07 Jul 2001 14:33:19 -0700 From: cramakrishnan@acm.org Subject: Re: Pboolnet Julian Rohrhuber writes: > do you know the reason why so many boolean networks start repeating so soon? Yes. That would be because i'm a moron. :) Bug fixed (i was never updating the previous state, the network was always computing the next configuration off the first one). Good catch! I also corrected the handling of the not operation to work correctly. It's all still at: http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/302 - - sekhar - -- C. Ramakrishnan cramakrishnan@acm.org ------------------------------ Date: Sat, 07 Jul 2001 15:05:31 -0700 From: cramakrishnan@acm.org Subject: [OT] Le Chant des Etoiles From the microsound list -- music from the great big supercollider in the sky: http://real.sri.ch/ramgen/tsr/rg/2001/rg_07052001.rm?start=%220:13:08.12%22&end=%220:15:08.000%22 - - sekhar - -- C. Ramakrishnan cramakrishnan@acm.org ------------------------------ Date: Sun, 8 Jul 2001 03:22:04 +0200 From: ssh <---@---.---> Subject: Re: external disk - -| Hi all - -| - -| Has anyone set up SC on an external disk - ie. firewire/USB hard - -| disk. I am looking at making the install portable for use in - -| installations and performances where the machine would be supplied. - -| Any experiences would be welcome. - -| -- yeah, it's working totally fine, just try it ;) getting better and better carry-ing wise ! experiences somebody else ? f ------------------------------ Date: Sun, 8 Jul 2001 12:28:52 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: Pboolnet the reason why it doesn't find ListPattern is that the file contains another class, BooleanNetworkNode, that subclasses from Object directly. It is not possible to define two classes subclassing different classes in a file. ( see http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/302 ) ------------------------------ Date: Sun, 08 Jul 2001 21:36:07 -0700 From: nicolocollinsi <---@---.---> Subject: Re: soundfile as wavetable nicolocollinsi wrote: > I like ben's solution Quick apology- that should be Alberto de Campo! Cheers ------------------------------ End of sc-users-digest V1 #318 ******************************