From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #334 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 Saturday, July 28 2001 Volume 01 : Number 334 ---------------------------------------------------------------------- Date: Thu, 26 Jul 2001 23:05:32 -0600 From: David Cottle <---@---.---> Subject: Help with String.sc Hi, I wrote a rather robust little function that parses pitch classes. I wanted to add it to String.sc, but then it gives me the error that isAlpha is not understood. I'm assuming it has to do with the hierarchy of the compile process. How can I add this function so I can use it like "midicps?" I've included the entire test function, but I just want the pcs.do in the String library. ( var check; check = Array.fill(196, {arg count; var pcstring; pcstring = ["c", "d", "e", "f", "g", "a", "b", "C", "D", "E", "F", "G", "A", "B"].at(count%14); pcstring = pcstring ++ ["", "s", "#", "+", "ss", "##", "++", "*", "f", "b", "-", "bb", "ff", "--"].at((count/14).floor.asInteger); pcstring = pcstring ++ "3"; pcstring; }); check.do( {arg pcs; var midi; midi = -10; //give midi an invalid midi number //to indicate first char has not been parsed. //I have to use -10 because Cbb will make midi -2. pcs.post; " ".post; pcs.do({arg eachChar, i; //look at each character if(eachChar.isAlpha.and(midi == -10), {midi = eachChar.digit - 10; midi = [9, 11, 0, 2, 4, 5, 7].at(midi);}); //parse first character if(i > 0, //for all other characters { if(eachChar.isDecDigit, //if a number, then it's the octave {midi = midi + (eachChar.digit + 1 * 12);}); //Otherwise it's one of these, change midi accordingly. if((eachChar == $#).or(eachChar == $s).or(eachChar == $+), {midi = midi + 1;}); if((eachChar == $b).or(eachChar == $f).or(eachChar == $-), {midi = midi - 1;}); if(eachChar == $*, {midi = midi + 2}); }); }); midi.postln; }) ) - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "Work as though no one is watching. Love as though you don't need the money. Dance as though you've never been hurt" ‹Overheard at Santa Barbara Weekend ------------------------------ Date: Fri, 27 Jul 2001 01:15:17 -0400 From: "crucial" <---@---.---> Subject: Re: help with real time looping patch > THIS MESSAGE IS IN MIME FORMAT. Since your mail reader does not understand this format, some or all of this message may not be legible. - --MS_Mac_OE_3079041317_1319749_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Caveats: its dirt simple. loops N beats, restarting the recording every N beats. works for .ar or .kr the .ar and the .kr method do not have identical interfaces, just because i didn't get back to fixing it. the .kr one is the more recently done. you will have to remove the Buffer.forb(audio,maxBeats) and substitute some code that creates a large enough buffer for you. my Buffer does some pooling and auto allocating. >I was wondering if anyone's ever created a SC patch they're willing to share which >emulates what something like Lexicon's JamMan does. Actually what I'm even more >interested in is something like the Polar thing in Digital Performer. Basically a >real time looping thing where you can create new passes in real time according to a >certain tempo and are able to tell it how long the loop should be and be able to have >control over features like panning, etc.. >This is one of the things I'd really like to do with SC, but at this point my >knowledge is so limited that I don't even really know where to start and it would >take me a really long time to figure out how to do this. > >Thank you, >Andrei > > > _____(( http://crucial-systems.com _________________))_______ - --MS_Mac_OE_3079041317_1319749_MIME_Part Content-type: application/mac-binhex40; name="KrLooper.sc" (This file must be converted with BinHex 4.0) :#dYb6'p[F'9b,R0M!&4&@&463fTY!*!%"!%!!!DJV!"-Efp`CA)JH`d0#3d*+Q& b)(XJBA*R)'PZF(9dFcd`,M!XFQ9M6'9fC@`p-#i`,("MD&*KG'P[26%Z-$X0#3d *#ACKFL"LG@CQCA)XCf9d9'9YF'ml$3N*BR9QCQ9b)$dJ3R9QCQ9b,QC[FQ)SD@j `GA4c,$3T1`d*#5m[FQ9M6'9fC@`J25"bC@0-CACPE#jbEh9ZC#Ja,M!T1`d*#@G PG&4PEA"[)$dJ4f9d9'9YF'mZDh)l$3N*$3N*8Q9MEh*N3R9Q,Q&b+'*eCQCPFL` JD@j`GA4c,#!0#C!$FQ9M6'9fC@`J,#m[FQ9M$3Q3!b!S-5ebC@0-CACPE#!T,#m [F(*P$3Q3!b!J5@e`G@acC5jVFLKRCA48C@e`Eb!U)#Ja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!!3!N!-*`!#3"`-E!!X!#3!%!*!$#3#3#!-J!!X!#32S!*!$#3#3"-!!N!- $*`!,!!N$k!#3!`N!N!J$+`!,!!N!"!#3!`N!N!J$-`!,!!N$k!#3!`N!N!J$33! ,!!N!"!#3!`N!N!6!!*!$!dX!#`!*!!3!N!-*!*!)!e)!#`!*!!3!N!-*`!#3"`0 I!!X!#3!%!*!$#3#3#!0R!!X!#3!%!*!$#F!!N!F$E3!,!!N!"!#3!`N!N!J$G`! ,!!N!"!#3!`R!!*!(!i-!#`!*!!3!N!-*!*!)!i8!#`!*!!3!N!-*`!#3"`1R!!X !#3!%!*!$#3#3#!1U!!X!#3!%!*!$#3#3"-!!N!-$X3!,!!N!"!#3!`N!N!J$[!! ,!!N!"!#3!`N!N!6!!*!$!m%!#`!*!!3!N!-*!*!)!rB!#`!*!!3!N!-*`!#3"`2 j!!X!#3!%!*!$#3#3$!%!N!-'@J!!"9S!N!0'!Z6mU!#q!*!$(!"'!!&cG(PX!*! $%P0299!!N!-H!)$rr`#3#B$rr`!!"9B!N!5[CM: - --MS_Mac_OE_3079041317_1319749_MIME_Part-- ------------------------------ Date: Fri, 27 Jul 2001 01:25:33 -0400 From: andrei@world.std.com Subject: test test ------------------------------ Date: Fri, 27 Jul 2001 02:12:05 -0500 From: James McCartney <---@---.---> Subject: Re: Help with String.sc on 7/27/01 12:05 AM, David Cottle at cottle@cerlsoundgroup.org wrote: > Hi, > > I wrote a rather robust little function that parses pitch classes. I wanted > to add it to String.sc, but then it gives me the error that isAlpha is not > understood. I'm assuming it has to do with the hierarchy of the compile > process. How can I add this function so I can use it like "midicps?" not understood by what? post the entire error. I don't know what you mean by use like midicps. midicps operates on numbers and is a built in UnaryOpUGen. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 02:14:01 -0500 From: James McCartney <---@---.---> Subject: Re: Help with String.sc Also post the method that you actually added to String. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 16:45:53 -0700 From: Mark Ballora <---@---.---> Subject: just for fun... ( // Just Major Thirds plus bamboo windchimes Synth.play({ arg synth; var sineEnv, chime, chimeEnv, chimeFreq, echoFreq; sineEnv=Env.new(#[1, 1, 0], #[1.6, 0.001]); chimeEnv=Env.new(#[1, 1, 0], #[0.35, 0.001]); // Rate of chime events - automatic or controlled by mouse horizontal chimeFreq= // MouseX.new(0.5, 3); 1; // Rate of chime echoes - automatic or controlled by mouse vertical echoFreq= // MouseY.new(0.05, 1.0); 0.1; chime = { arg f; x=Decay2.ar(Impulse.ar(0), 0.01, 0.3, GrayNoise.ar(15)); x=Mix.ar(Resonz.ar(x, [f, f*0.634, f*0.259, 60, 341], 0.008, 0.3)); x=LPF.ar(x, 2000); x }; Spawn.ar({ arg spawn, i; var freq, absfreq; spawn.nextTime = chimeFreq.value+(chimeFreq.value+0.5).rand; freq=750+750.rand; x=chime.value(freq); y=Mix.ar(Decay2.ar(Impulse.ar(0), 0.3, 1.55, FSinOsc.ar([freq*0.5, freq*(5/8)], [0.2, 0.4]))); b=CombN.ar(x, 4, LFNoise0.kr(0.5, 1.85, 2.15), 1.5); t=Pan2.ar(EnvGen.ar(chimeEnv,b)+EnvGen.ar(sineEnv,y), 0.75.rand2); s=Spawn.ar({ arg spawn, i; var freq2, mult; spawn.nextTime=echoFreq.value+(echoFreq.value).rand; mult=#[1, 2, 1.5, 1.6, 0.625].choose; freq2=freq*mult; a=chime.value(freq2); Pan2.ar(EnvGen.ar(chimeEnv, a*0.5.rand), 0.75.rand2); }, 2, nil, 8+7.rand); s+t Ŭ }, 2, nil); }); ) ------------------------------ Date: Fri, 27 Jul 2001 03:24:25 -0600 From: "David Cottle" <---@---.---> Subject: Re: Help with String.sc By "use like midicps" I mean make it a method. I understand one is working with strings the other with numbers. I also mean midicps is very useful, and I would like a similar conversion between pitchclass and midi, midi and pitchclass. I haven't done midicps yet, but it should be a cinch. Pitch class and octave. > Also post the method that you actually added to String. Here is the method. I added it to String.sc, which has already been modified some, and resides in my DefaultLibrary folder. pcsmidi {arg pcs; var midi; midi = -10; //give midi an invalid midi number ... I get it. I forgot to replace the arg pcs with "this." Here's the version that works. (I'm sure you could find a more efficient method if you wanted to add it. But it is robust, in that it will take every conceivable pitch class string including "cbbb" or "bb" or "ff" (F flat). The only rule is pitch must be first. Even C4+ will work.) I make midi = -10 to start with because it first didn't work with midi = 0 (just used to test whether the first character had been parsed) because midi = 0 was C. So I made it -1 but then it broke down with Cb (-1). So I went to 10 as an absurd limit. Now you can write "Cbbbbbbbbb4". In a very long just intonation piece you might get that. pcmidi {var midi; midi = -10; //give midi an invalid midi number //to indicate first char has not been parsed. //I have to use -10 because Cbb will make midi -2. this.do({arg eachChar, i; //look at each character if(eachChar.isAlpha.and(midi == -10), {midi = eachChar.digit - 10; midi = [9, 11, 0, 2, 4, 5, 7].at(midi);}); //parse first ch if(i > 0, //for all other characters { if(eachChar.isDecDigit, //if a number, then it's the octave {midi = midi + (eachChar.digit + 1 * 12);}); //Otherwise it's one of these, change midi accordingly. if((eachChar == $#).or(eachChar == $s).or(eachChar == $+), {midi = midi + 1;}); if((eachChar == $b).or(eachChar == $f).or(eachChar == $-), {midi = midi - 1;}); if(eachChar == $*, {midi = midi + 2}); }); }); ^midi; } - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org (Speaking of 4'33" and aleatory in general.) "Its an invitation, not a command." ‹Peter Gutmann ------------------------------ Date: Fri, 27 Jul 2001 03:33:20 -0600 From: "David Cottle" <---@---.---> Subject: Re: Help with String.sc > > Also post the method that you actually added to String. I also realize I don't need the "midi == -10" nonsense. I can just use "i == 0". I think I originally was working toward allowing pitchclass that started with something other than pitch (e.g. "#C4", wrong, but I wanted to include it because I see it so much in theory classes), but settled on the single rule that PC must be first. I couldn't get past the "bb" example or "bf." Even if you can figure how to parse the flat first, which is the pitch, which is the accidental? B-flat, or F-flat? So pitch has to be first - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "It is not enough for you to love [power, the system]. It has to love you." ‹Shostakovich ------------------------------ Date: Fri, 27 Jul 2001 03:39:04 -0600 From: "David Cottle" <---@---.---> Subject: Re: Help with String.sc > I would like a similar conversion between pitchclass and midi, midi and > pitchclass. I haven't done midicps yet, but it should be a cinch. Pitch I mean I haven't done midipc (midi to pitch class). - -- ><><><><><><><><><><><> 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: Fri, 27 Jul 2001 04:03:16 -0600 From: "David Cottle" <---@---.---> Subject: midipc Hi, here is the midipc: midipc { arg acc = 0; var pc, oct; //acc forces accidental, -1 is flat, 0 is default, 1 is sharp if(acc == 1, {pc = ["B#", "C#", "D", "D#", "E", "E#", "F#", "G", "G#", "A", "A#", "B"].at(this%12);}, { if(acc == -1, {pc = ["C", "Db", "D", "Eb", "Fb", "F", "Gb", "G", "Ab", "A", "Bb", "B"].at(this%12);}, {pc = ["C", "C#", "D", "Eb", "E", "F", //default "F#", "G", "Ab", "A", "Bb", "B"].at(this%12);} ); } ); pc = pc ++ ((this/12).floor - 1).asString; ^pc } - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "No one leaves until all the fat ladies sing" -Graffito "That's a long time" -Graffito response ------------------------------ Date: Fri, 27 Jul 2001 04:09:43 -0600 From: "David Cottle" <---@---.---> Subject: midip, and midipc This is more correct, since pitch class does not include octave: //midi to pitch string midips { arg acc = 0; var pc, oct; //acc forces accidental, -1 is flat, 0 is default, 1 is sharp if(acc == 1, {pc = ["B#", "C#", "D", "D#", "E", "E#", "F#", "G", "G#", "A", "A#", "B"].at(this%12);}, { if(acc == -1, {pc = ["C", "Db", "D", "Eb", "Fb", "F", "Gb", "G", "Ab", "A", "Bb", "B"].at(this%12);}, {pc = ["C", "C#", "D", "Eb", "E", "F", //default "F#", "G", "Ab", "A", "Bb", "B"].at(this%12);} ); } ); pc = pc ++ ((this/12).floor - 1).asString; ^pc } //midi to pitch class string midipcs { arg acc = 0; var pc, oct; //acc forces accidental, -1 is flat, 0 is default, 1 is sharp if(acc == 1, {pc = ["B#", "C#", "D", "D#", "E", "E#", "F#", "G", "G#", "A", "A#", "B"].at(this%12);}, { if(acc == -1, {pc = ["C", "Db", "D", "Eb", "Fb", "F", "Gb", "G", "Ab", "A", "Bb", "B"].at(this%12);}, {pc = ["C", "C#", "D", "Eb", "E", "F", //default "F#", "G", "Ab", "A", "Bb", "B"].at(this%12);} ); } ); ^pc } Ok, back to bed. - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org (Speaking of 4'33" and aleatory in general.) "Its an invitation, not a command." ‹Peter Gutmann ------------------------------ Date: Fri, 27 Jul 2001 14:44:14 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: midipc >Hi, > >here is the midipc: > > midipc { arg acc = 0; var pc, oct; > //acc forces accidental, -1 is flat, 0 is default, 1 is sharp > > if(acc == 1, > {pc = ["B#", "C#", "D", "D#", "E", "E#", > "F#", "G", "G#", "A", "A#", "B"].at(this%12);}, > { > if(acc == -1, > {pc = ["C", "Db", "D", "Eb", "Fb", "F", > "Gb", "G", "Ab", "A", "Bb", "B"].at(this%12);}, > {pc = ["C", "C#", "D", "Eb", "E", "F", //default > "F#", "G", "Ab", "A", "Bb", "B"].at(this%12);} > ); > } > ); > pc = pc ++ ((this/12).floor - 1).asString; > ^pc > } maybe it would be good to use symbols instead of strings, so that later you can retranslate these note symbols with an identitydictionary. so it could be [\F#, \G, \Ab ...], pc = \G; dict.at(pc) ... ------------------------------ Date: Fri, 27 Jul 2001 08:25:57 -0500 From: James McCartney <---@---.---> Subject: Re: midipc on 7/27/01 7:44 AM, Julian Rohrhuber at sa6a014@rzaixsrv2.rrz.uni-hamburg.de wrote: > \F# not legal syntax. # is not alphanumeric. 'F#' - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 08:27:20 -0500 From: James McCartney <---@---.---> Subject: Re: midip, and midipc on 7/27/01 5:09 AM, David Cottle at cottle@cerlsoundgroup.org wrote: > .at(this%12) .wrapAt(this) is more efficient. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 15:31:40 +0200 From: Julian Rohrhuber <---@---.---> Subject: swiki adress Hi James, I just checked the link on the audiosynth page and found that it points to the wrong swiki (the test swiki).. it should be http://134.100.176.45:8080/MusicTechnology/6 or better http://swiki.hfbk.uni-hamburg.de:8080/MusicTechnology/6, as ips can change (well names too, ...) ------------------------------ Date: Fri, 27 Jul 2001 09:33:35 -0400 (EDT) From: "Ronald J. Kuivila" <---@---.---> Subject: compiler bug in SC2 Hi James, Here is a weird bug: 1. put Main.sc inside a folder inside DefaultLibrary 2. start-up SuperCollider 3. Now create a new empty text file and save it into DefaultLibrary Now, once you start synthesis, any attempt to type new text gives an error! RJK ------------------------------ Date: Fri, 27 Jul 2001 08:37:02 -0500 From: James McCartney <---@---.---> Subject: Re: midip, and midipc Shorter methods. take advantage of indexing and eliminate duplicate code. midipcs { arg acc = 0; //acc forces accidental, -1 is flat, 0 is default, 1 is sharp ^#[["C", "Db", "D", "Eb", "Fb", "F", "Gb", "G", "Ab", "A", "Bb", "B"], ["C", "C#", "D", "Eb", "E", "F", //default "F#", "G", "Ab", "A", "Bb", "B"], ["B#", "C#", "D", "D#", "E", "E#", "F#", "G", "G#", "A", "A#", "B"] ].clipAt(acc + 1).wrapAt(this); } midipc { ^this.midipcs ++ div(this, 12) } on 7/27/01 5:09 AM, David Cottle at cottle@cerlsoundgroup.org wrote: > This is more correct, since pitch class does not include octave: > > //midi to pitch string > midips { arg acc = 0; var pc, oct; > //acc forces accidental, -1 is flat, 0 is default, 1 is sharp > > if(acc == 1, > {pc = ["B#", "C#", "D", "D#", "E", "E#", > "F#", "G", "G#", "A", "A#", "B"].at(this%12);}, > { > if(acc == -1, > {pc = ["C", "Db", "D", "Eb", "Fb", "F", > "Gb", "G", "Ab", "A", "Bb", "B"].at(this%12);}, > {pc = ["C", "C#", "D", "Eb", "E", "F", //default > "F#", "G", "Ab", "A", "Bb", "B"].at(this%12);} > ); > } > ); > pc = pc ++ ((this/12).floor - 1).asString; > ^pc > } > > //midi to pitch class string > midipcs { arg acc = 0; var pc, oct; > //acc forces accidental, -1 is flat, 0 is default, 1 is sharp > > if(acc == 1, > {pc = ["B#", "C#", "D", "D#", "E", "E#", > "F#", "G", "G#", "A", "A#", "B"].at(this%12);}, > { > if(acc == -1, > {pc = ["C", "Db", "D", "Eb", "Fb", "F", > "Gb", "G", "Ab", "A", "Bb", "B"].at(this%12);}, > {pc = ["C", "C#", "D", "Eb", "E", "F", //default > "F#", "G", "Ab", "A", "Bb", "B"].at(this%12);} > ); > } > ); > ^pc > } > - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 09:56:23 -0400 (EDT) From: koonce@Princeton.EDU (Paul C Koonce (koonce@Princeton.EDU)) Subject: Re: Initializing MIDI controllers When using MIDIController, the initial output values appear to be the minumum value until updated by the first change in the controller. Is there a way to initialize a MIDI controller object to something other than the min value, much the way you would with a slider in a GUI window? Paul Koonce ------------------------------ Date: Fri, 27 Jul 2001 10:02:50 -0400 From: Andrei <---@---.---> Subject: where's my post ? I sent a message with a jpeg attachement to the list yesterday and I never saw it come through. Is there some policy against sending that type of attachement to this list ? Andrei ------------------------------ Date: Fri, 27 Jul 2001 08:18:58 -0600 From: David Cottle <---@---.---> Subject: Re: midip, and midipc > > Shorter methods. take advantage of indexing and eliminate duplicate code. Very nice. I love elegant code. I'm still in the sledgehammer school. One correction: > midipc { > ^this.midipcs ++ div(this, 12) ^this.midipcs ++ (div(this, 12) - 1) - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "This obsession with old music, tends to make all music listening safe and unadventurous since it deals so largely in the works of the accepted masters. Filling our halls with familiar sounds induces a sense of security in our audiences; they are gradually losing all need to exercise freely their own musical judgement." ‹ Copland ------------------------------ Date: Fri, 27 Jul 2001 10:11:17 -0500 From: James McCartney <---@---.---> Subject: Re: where's my post ? on 7/27/01 9:02 AM, Andrei at andrei@world.std.com wrote: > I sent a message with a jpeg attachement to the list yesterday and I never > saw it come through. Is there some policy against sending that type of > attachement to this list ? > > Andrei > You cannot post messages > 40K - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 11:00:51 -0500 From: James McCartney <---@---.---> Subject: Re: Initializing MIDI controllers on 7/27/01 8:56 AM, Paul C Koonce koonce@Princeton.EDU at koonce@Princeton.EDU wrote: > > When using MIDIController, the initial output values appear to be the > minumum value until updated by the first change in the controller. Is there > a way to initialize a MIDI controller object to something other than the > min value, much the way you would with a slider in a GUI window? > > Paul Koonce > > > You could use an OSC message to send yourself a MIDI controller. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 13:21:10 -0500 From: James McCartney <---@---.---> Subject: Re: Why are Macs better for music? on 7/27/01 1:15 PM, James McCartney at asynth@io.com wrote: > Check this : > > http://mambo.peabody.jhu.edu/~karlmac/publications/latency-icmc2001.pdf > > "Apple MacOS X was the second best performing system > on the tests without load and the best performing system on > the tests with load." "Finally, many of these tests were performed on equipment generously donated through the Intel Technology for Education 2000 Program." ouch.. ;-D - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 13:15:32 -0500 From: James McCartney <---@---.---> Subject: Re: Why are Macs better for music? Check this : http://mambo.peabody.jhu.edu/~karlmac/publications/latency-icmc2001.pdf "Apple MacOS X was the second best performing system on the tests without load and the best performing system on the tests with load." MacOSX CoreAudio: 2.83 msec total throughput latency both under load and without load using a MOTU 2408. systems tested : · Microsoft Windows 98 · Microsoft Windows 2000 · Microsoft Windows ME · Apple MacOS 8 · Apple MacOS 9 · Apple MacOS X · Linux 2.2 · Linux 2.4 - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 15:02:18 -0400 From: christian adam hresko <---@---.---> Subject: Re: Why are Macs better for music? James McCartney wrote: > on 7/27/01 1:15 PM, James McCartney at asynth@io.com wrote: > > > Check this : > > > > http://mambo.peabody.jhu.edu/~karlmac/publications/latency-icmc2001.pdf > > > > "Apple MacOS X was the second best performing system > > on the tests without load and the best performing system on > > the tests with load." > > "Finally, many of these tests were performed on equipment generously donated > through the Intel Technology for Education 2000 Program." > > ouch.. ;-D > wow, those are impressive numbers. i retract. btw, its seems like PD will be ported to OS X fairly soon. it's not really competition, but simply another program to compliment what SC does. cheers, christian ------------------------------ Date: Fri, 27 Jul 2001 21:25:06 +0200 From: Arie van Schutterhoef <---@---.---> Subject: Re: Why are Macs better for music? >btw, its seems like PD will be ported to OS X fairly soon. - -in similar vein, ircam's jMax has been done already. >it's not really competition, - -for more structural things, combined with audio/dsp applications SC is still the only one... >but simply another program to compliment what SC does. - -in what way? 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: Fri, 27 Jul 2001 14:38:01 -0500 From: James McCartney <---@---.---> Subject: Re: Why are Macs better for music? on 7/27/01 1:15 PM, James McCartney at asynth@io.com wrote: > MacOSX CoreAudio: 2.83 msec total throughput latency both under load and > without load using a MOTU 2408. OK I can't tell from the paper if the MOTU 2408 was used for the OSX test or not, just that it was installed on that machine. I've not yet heard of a native driver for it for OSX, so that makes me wonder. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 21:39:02 +0200 From: Arie van Schutterhoef <---@---.---> Subject: Re: Why are Macs better for music? >MacOSX CoreAudio: 2.83 msec total throughput latency both under load and >without load using a MOTU 2408. - -Strange how once everyone talked (2/3 years ago) about Be OS as the 'media os', an area now seemingly to be occupied by OS X. The only trace now left of Be OS, is as an embedded os for Sony's new internet invention. Which makes Be future even more uncertain as embedded os, considering Linux being increasingly preferred for this. Nice reminder of that 'big plans' shouldn't stop with 'press releases only' (meaning all the audio companies, like Steinberg, emagic promising to port their programs to it), but action is most important thing... anyway, 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: Fri, 27 Jul 2001 21:42:52 +0200 From: Arie van Schutterhoef <---@---.---> Subject: Re: Why are Macs better for music? >I've not yet heard of a >native driver for it for OSX, so that makes me wonder. - -Are there already native drivers available for any other card? 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: Fri, 27 Jul 2001 15:20:20 -0500 From: James McCartney <---@---.---> Subject: Re: Why are Macs better for music? on 7/27/01 2:42 PM, Arie van Schutterhoef at arsche@xs4all.nl wrote: >> I've not yet heard of a >> native driver for it for OSX, so that makes me wonder. > -Are there already native drivers available for > any other card? > AvS OSX has built in support for USB spec audio and MIDI but there are no audio devices that support the spec at this time, AFAIK. Roland has announced drivers for developers only. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 16:33:55 -0500 From: "t. krakowiak" <---@---.---> Subject: question for Joel Hi! were You using sc while doing "Live at Les Instants Chavires" ? ------------------------------ Date: Fri, 27 Jul 2001 23:00:01 +0200 From: Arie van Schutterhoef <---@---.---> Subject: Re: Why are Macs better for music? >OSX has built in support for USB spec audio and MIDI but there are no audio >devices that support the spec at this time, AFAIK. > >Roland has announced drivers for developers only. - -Will ASIO remain important? The bandwidth firewire is offering would make it a good replacement. Yamaha seem to like OS X, so mLAN the next phase for audio I/O. 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: Fri, 27 Jul 2001 15:34:28 -0600 From: David Cottle <---@---.---> Subject: Re: midip, and midipc > Shorter methods. take advantage of indexing and eliminate duplicate code. > [...] > "F#", "G", "G#", "A", "A#", "B"] > ].clipAt(acc + 1).wrapAt(this); I don't understand why you use clipAt. Can't I just use .at? ].at(acc + 1).wrapAt(this); - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "Imagination is more important than knowledge." ‹Einstein ------------------------------ Date: Fri, 27 Jul 2001 16:56:13 -0500 From: James McCartney <---@---.---> Subject: Re: Why are Macs better for music? on 7/27/01 4:00 PM, Arie van Schutterhoef at arsche@xs4all.nl wrote: > -Will ASIO remain important? Shouldn't. CoreAudio is the standard API for OSX. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 16:58:03 -0500 From: James McCartney <---@---.---> Subject: Re: midip, and midipc on 7/27/01 4:34 PM, David Cottle at cottle@cerlsoundgroup.org wrote: > I don't understand why you use clipAt. So that any negative number means flat and any positive number means sharp. If someone passes -2 for acc then using .at will fail. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 27 Jul 2001 21:50:34 -0700 From: "tomonori yamasaki" <---@---.---> Subject: Re: help with real time looping patch http://www.mindfrog.net/tomonori/src/looper.sit perview version. (I'll give "Audio.In" version if you give me your patch.) - ---------- >From: "crucial" <---@---.---> >To: sc-users@lists.io.com >Subject: Re: help with real time looping patch >Date: Thu, Jul 26, 2001, 10:15 PM > > > Caveats: > > its dirt simple. loops N beats, restarting the recording every N beats. > > works for .ar or .kr > > the .ar and the .kr method do not have identical interfaces, just because > i didn't get back to fixing it. > > the .kr one is the more recently done. > > you will have to remove the Buffer.forb(audio,maxBeats) > and substitute some code that creates a large enough buffer for you. > my Buffer does some pooling and auto allocating. > > > >>I was wondering if anyone's ever created a SC patch they're willing to share which >>emulates what something like Lexicon's JamMan does. Actually what I'm even more >>interested in is something like the Polar thing in Digital Performer. Basically a >>real time looping thing where you can create new passes in real time > according to a >>certain tempo and are able to tell it how long the loop should be and be > able to have >>control over features like panning, etc.. >>This is one of the things I'd really like to do with SC, but at this point my >>knowledge is so limited that I don't even really know where to start and it would >>take me a really long time to figure out how to do this. >> >>Thank you, >>Andrei >> >> >> > > > _____(( > http://crucial-systems.com > _________________))_______ > ------------------------------ Date: Sat, 28 Jul 2001 15:32:47 -0700 From: Mark Ballora <---@---.---> Subject: James' "More early space" patch Thanks for posting those three patches last week, James. I had a close look at the third one this morning, which was a fine learning experience. In the last of the OverlapTexture functions that are chosen from the array, the variable "p" doesn't seem to be defined. But it still makes sound... { var z, f1, f2, f3, in, out; f1 = 100; f2 = 6000.0; z = Array.fill(2, { `[ // sine oscil bank specification : y = Array.fill(p, { exprand(f1, f2) } ), // frequencies nil, Array.fill(p, { 2.0 + 4.0.rand }) // ring times ] }); f3 = XLine.kr(exprand(40.0, 300.0), exprand(40.0, 300.0), 12); in = LFPulse.ar(f3, rrand(0.1, 0.9), 0.002 * LFNoise2.kr(8.0.rand).max(0)); out = Klank.ar(z, in).distort * 0.5; } ------------------------------ Date: Sat, 28 Jul 2001 05:33:50 -0600 From: "David Cottle" <---@---.---> Subject: Re: midip, and midipc > on 7/27/01 4:34 PM, David Cottle at cottle@cerlsoundgroup.org wrote: > >> I don't understand why you use clipAt. > > So that any negative number means flat and any positive number means sharp. > If someone passes -2 for acc then using .at will fail. Got it. - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "I am told Wagner is much better than it sounds." ‹Mark Twain (paraphrase) ------------------------------ Date: Sat, 28 Jul 2001 09:00:03 -0500 From: James McCartney <---@---.---> Subject: Re: James' "More early space" patch on 7/28/01 5:32 PM, Mark Ballora at ballora@psu.edu wrote: > the variable "p" doesn't seem to be defined. That is a mistake. That function is the same as the "sidereal time" example. p = 15 in that example. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ End of sc-users-digest V1 #334 ******************************