From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #163 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 Tuesday, August 29 2000 Volume 01 : Number 163 ---------------------------------------------------------------------- Date: Sun, 27 Aug 2000 04:04:13 -0400 From: "christian.adam.hresko." <---@---.---> Subject: index for whatever reason, this explanation doesn't make sense to me (taken from the collections help file)... Evaluates function for each item in the collection. The function is passed two arguments, the item and an integer index. List[1, 2, 3, 4].do({ arg item, i; item.postln }); how is 'i' an integer index, and to what index is it pointing? (or better yet, how does 'i' know to 'point' to the first index?) i thought a function of this type would look more like: int myArray [4] = {1, 2, 3, 4}; int i; for(i = 0; i <= 3; i++) { cout << myArray[ i ] << endl; } sorry for the c / c++ like notation. hope you get the drift. cheers, christian - -- http://www.george_w_bush_killspeople.com ------------------------------ Date: Sun, 27 Aug 2000 12:01:22 -0400 From: "christian.adam.hresko." <---@---.---> Subject: LPF what am i doing wrong here? can't you change / modulate the cutoff frequency at runtime? ( // 2nd Order Lowpass Filter var w; { var userIn, sigOut; var s, n; w = GUIWindow.new("Lowpass Filter", Rect.newBy(233, 123, 246, 195)); s = SliderView.new( w, Rect.newBy(47, 107, 128, 20), "Cutoff", 0, 0, 4000, 50, 'linear'); n = NumericalView.new( w, Rect.newBy(47, 66, 64, 20), "Frequency", 0, 0, 4000, 50, 'linear'); StringView.new( w, Rect.newBy(47, 35, 128, 20), "Cutoff Frequency"); StringView.new( w, Rect.newBy(116, 66, 128, 20), "hertz"); s.action = {n.value = s.value}; n.action = {s.value = n.value}; userIn = AudioIn.ar([1,2]); sigOut = LPF.ar( in: userIn, freq: s.kr, mul: 1.0); sigOut }.play; w.close; ) cheers, christian - -- http://www.george_w_bush_killspeople.com ------------------------------ Date: Sun, 27 Aug 2000 12:52:57 -0400 From: Mark Ballora <---@---.---> Subject: Re: index >for whatever reason, this explanation doesn't make sense to me (taken >from the collections help file)... > >Evaluates function for each item in the collection. >The function is passed two arguments, the item and an integer index. > >List[1, 2, 3, 4].do({ arg item, i; item.postln }); > > >how is 'i' an integer index, and to what index is it pointing? (or >better yet, how does 'i' know to 'point' to the first index?) 'i' is a counter that keeps track of how many times the function has been performed. I've found it useful when I do something like take a list, perform an operation on each member and then output the value to a new list, as in: List[1,2,3,4].do({ arg item, i; otherList.put(i, [some operation with item]) }) I've done the same thing with the 'i' argument in Spawn, where I can spawn events based on values stored in a list. Mark ------------------------------ Date: Sun, 27 Aug 2000 12:58:18 -0400 From: Mark Ballora <---@---.---> Subject: Re: LPF >what am i doing wrong here? > >can't you change / modulate the cutoff frequency at runtime? Having a cutoff frequency at 0 can make the filter "blow up" and not work. Pick a minimum value above 0 and it works. Mark > >( // 2nd Order Lowpass Filter >var w; > { > var userIn, sigOut; > var s, n; > > w = GUIWindow.new("Lowpass Filter", Rect.newBy(233, 123, 246, 195)); > s = SliderView.new( w, Rect.newBy(47, 107, 128, 20), "Cutoff", 0, 0, >4000, 50, 'linear'); > n = NumericalView.new( w, Rect.newBy(47, 66, 64, 20), "Frequency", 0, >0, 4000, 50, 'linear'); > StringView.new( w, Rect.newBy(47, 35, 128, 20), "Cutoff Frequency"); > StringView.new( w, Rect.newBy(116, 66, 128, 20), "hertz"); > > s.action = {n.value = s.value}; > n.action = {s.value = n.value}; > > userIn = AudioIn.ar([1,2]); > > sigOut = LPF.ar( > in: userIn, > freq: s.kr, > mul: 1.0); > > sigOut > > }.play; >w.close; >) > >cheers, > >christian > >-- >http://www.george_w_bush_killspeople.com ------------------------------ Date: Sun, 27 Aug 2000 13:32:55 -0400 From: "christian.adam.hresko." <---@---.---> Subject: Re: index Mark Ballora wrote: > >for whatever reason, this explanation doesn't make sense to me (taken > >from the collections help file)... > > > >Evaluates function for each item in the collection. > >The function is passed two arguments, the item and an integer index. > > > >List[1, 2, 3, 4].do({ arg item, i; item.postln }); > > > > > >how is 'i' an integer index, and to what index is it pointing? (or > >better yet, how does 'i' know to 'point' to the first index?) > > 'i' is a counter that keeps track of how many times the function has > been performed. i'm guessing i is automatically initialized to 0? for example, in this simple for loop: int i; for(i = 0; i < = 100; i++) { cout << i << endl; } of course i is set to zero, incremented by 1 each time the loop is executed, and the loop is terminated when i reaches 100. (and prints out each 'step' in the loop... 0 - 100) i is a common notation for a counter in c / c++, so i understand it's origin. i'm just at a loss without an initialization, and a 'control statement.' (i.e. what is controlling i) hope that makes sense. cheers, christian - -- http://www.george_w_bush_killspeople.com ------------------------------ Date: Sun, 27 Aug 2000 13:35:11 -0400 From: "christian.adam.hresko." <---@---.---> Subject: Re: LPF Mark Ballora wrote: > >what am i doing wrong here? > > > >can't you change / modulate the cutoff frequency at runtime? > > Having a cutoff frequency at 0 can make the filter "blow up" and not work. > > Pick a minimum value above 0 and it works. > > Mark > thanks bunches mark. just out of curiosity, is it the math that 'blows up?' (is something being divided by zero?) cheers, christian - -- http://www.george_w_bush_killspeople.com ------------------------------ Date: Sun, 27 Aug 2000 14:03:25 -0400 From: Mark Ballora <---@---.---> Subject: Re: index - --============_-1244723088==_ma============ Content-Type: text/plain; charset="us-ascii" ; format="flowed" > > >i'm guessing i is automatically initialized to 0? > > >just at a loss without an initialization, and a 'control statement.' >(i.e. what is >controlling i) > Try this: List[1, 2, 3, 4].do({ arg item, i; ("item = "++item).postln; ("i = "++i).postln }) - --============_-1244723088==_ma============ Content-Type: text/html; charset="us-ascii" Re: index


i'm guessing i is automatically initialized to 0?

just at a loss without an initialization, and a 'control statement.' (i.e. what is
controlling i)

Try this:

List[1, 2, 3, 4].do({ arg item, i; ("item = "++item).postln; ("i = "++i).postln })
- --============_-1244723088==_ma============-- ------------------------------ Date: Sun, 27 Aug 2000 14:04:48 -0400 From: Mark Ballora <---@---.---> Subject: Re: LPF > > >thanks bunches mark. > >just out of curiosity, is it the math that 'blows up?' (is something being >divided by zero?) > I think it's something like that, yes. You can do the same thing in Max/MSP -- send a filter a bad value and it can just konk out. M ------------------------------ Date: Sun, 27 Aug 2000 11:27:41 -0700 From: cramakrishnan@acm.org Subject: Re: index > i'm guessing i is automatically initialized to 0? Take a look at the method defination of List::do (it actually dispatches to ArrayedCollection::do -- highlight ArrayedCollection::do in SC and hit Cmd-J). - - sekhar - -- C. Ramakrishnan cramakrishnan@acm.org ------------------------------ Date: Sun, 27 Aug 2000 13:17:00 -0600 From: David Cottle <---@---.---> Subject: Re: index Hi, I come from a C background and this confused me too at first. I misunderstood two things: where do these arguments come from? Answer is they are generated automatically. As part of the function. The second thing was the name. I didn't understand that you can name them anything you want. Try these: List[34, 5, 345, 89].do({ arg item, count; item.postln; count.postln }); List["this", "that", "theother", "another"].do( { arg each, number; each.postln; number.postln }); ------------------------------ Date: Sun, 27 Aug 2000 17:11:32 -0400 From: "christian.adam.hresko." <---@---.---> Subject: arrays / index / pre - increment mark, sekhar, and david... okay, everything makes sense now. although i noticed you can't declare a post - increment iteration in the control statement. (no big deal...) this whole discussion also answered a few questions i had about arg. i was looking through numerous functions and couldn't figure out what the arg(ument) statement was 'doing.' i should do more snooping within SC. now that i'm getting more into SC - like programming style, i just hope i don't start doing this on my comp sci midterms / finals. thanks again guys. cheers, christian : still trying to figure out why colleen was kicked off the island. hehe... - -- http://www.george_w_bush_killspeople.com ------------------------------ Date: Sun, 27 Aug 2000 20:00:39 EDT From: JoJoBuBu@aol.com Subject: Telex USB Digital Audio Converter (P-500) I am currently running an Ibook which does not come with any audio input. I would like to run real time audio inputs and so am considering purchasing the Telex USB Digital Audio Converter (P-500) ... US$ 69.00 which converts from USB to 1/4 " audio in. It can be found at http://www.usbstuff.com/speakers.html Do I need ASIO drivers for this? Are ASIO drivers available for this product? Will this work , and sound professional, with supercollider? I've tried the company but they have not been tremendously helpful. Hopefully someone on the list has tried this product or a similar one. Thanks, Andy ------------------------------ Date: Sun, 27 Aug 2000 18:50:15 -0600 From: David Cottle <---@---.---> Subject: Re: arrays / index / pre - increment Hi, > i should do more snooping within SC. I wrote some materials for a course that was attended by students with no knowledge of code. You might find it useful: http://www.byu.edu/music/personnel/cottled/CACwSC.sea.hqx http://www.byu.edu/music/personnel/cottled/DSwSC.sea.hqx ------------------------------ Date: Sun, 27 Aug 2000 20:53:22 -0400 From: Jeffrey P Shell <---@---.---> Subject: Re: Telex USB Digital Audio Converter (P-500) > I am currently running an Ibook which does not come with any audio input. I > would like to run real time audio inputs and so am considering purchasing the > Telex USB Digital Audio Converter (P-500) ... US$ 69.00 > which converts from USB to 1/4 " audio in. It can be found at > > http://www.usbstuff.com/speakers.html > > Do I need ASIO drivers for this? > Are ASIO drivers available for this product? > Will this work , and sound professional, with supercollider? MacOS 9.0.4 lets you choose devices on the USB chain for sound in (if the devices allow it). The Roland ED UA-30 plugged right in and worked right off. (I believe ASIO drivers are available for it, but $50 from a third party). The downside of the UA-30 is that it completely takes over as the sound-out channel too, and since it's a mixer unit the dry input I was pumping through supercollider was being mixed (and drowning out) Supercolliders outs. There might be a way around this, but I haven't found it yet. But it's worked great to digitally mix out from Supercollider right into Minidisc. ------------------------------ Date: Sun, 27 Aug 2000 21:12:29 -0400 From: "christian.adam.hresko." <---@---.---> Subject: Re: arrays / index / pre - increment David Cottle wrote: > Hi, > > > i should do more snooping within SC. > > I wrote some materials for a course that was attended by students with no > knowledge of code. You might find it useful: > > http://www.byu.edu/music/personnel/cottled/CACwSC.sea.hqx > > http://www.byu.edu/music/personnel/cottled/DSwSC.sea.hqx i've actually looked over a bit of it. (i downloaded the CAC files when you originally posted the link to the list) very good material and very well written. i'll have to download the rest of it and give it a thorough reading. it wasn't until the past month that i've had time to start digging into SC. i think my problem might be my 'knowledge' of code. i keep trying to transfer my c / c++ skills over to SC, but that's anti - productive to a degree. i've been trying my best not to do this, but at the same time i have to keep track of all the c / c++ stuff for classes. (school that is...) i guess i'm just stubborn. command y command j these have been extremely helpful tools in SC. i should utilize these more often. thanks again for the advice david. i'm the only one at my school using SC (seriously...) so this list is basically my support line. along with the help files and documentation of course. well, classes start up again tomorrow. what joy. linear algebra should be pretty neat though. and discrete structures. i hope. cheers, christian - -- http://www.george_w_bush_killspeople.com ------------------------------ Date: Mon, 28 Aug 2000 11:53:33 +0200 From: <---@---.---> (joel ryan) Subject: Re: Telex USB Digital Audio Converter (P-500) Anyone with some idea of the sample i/o latency of this or other of the USB audio devices that are finally starting to work with the Mac? jRyan At 8:53 PM -0400 8/27/00, you wrote: > > I am currently running an Ibook which does not come with any audio input. I > > would like to run real time audio inputs and so am considering purchasing the > > Telex USB Digital Audio Converter (P-500) ... US$ 69.00 > > which converts from USB to 1/4 " audio in. It can be found at > > > > http://www.usbstuff.com/speakers.html > > > > Do I need ASIO drivers for this? > > Are ASIO drivers available for this product? > > Will this work , and sound professional, with supercollider? > > MacOS 9.0.4 lets you choose devices on the USB chain for sound in (if the > devices allow it). The Roland ED UA-30 plugged right in and worked right > off. (I believe ASIO drivers are available for it, but $50 from a third > party). > > The downside of the UA-30 is that it completely takes over as the sound-out > channel too, and since it's a mixer unit the dry input I was pumping through > supercollider was being mixed (and drowning out) Supercolliders outs. There > might be a way around this, but I haven't found it yet. But it's worked > great to digitally mix out from Supercollider right into Minidisc. /////////////////////// Joel Ryan STEIM :: Ballett Frankfurt :: Institute of Sonology Achtergracht 19, 1017WL Amsterdam +31 (20) 624-3886 +31 (20) 626-4262 fax http://www.frankfurt-ballett.de/joel.html http://www.steim.nl /////////////////////////////////////////// ------------------------------ Date: Mon, 28 Aug 2000 20:47:18 +0200 From: Staffan Liljegren <---@---.---> Subject: fun with sc3... I'm really having fun with this beast. Here is a simple image synth I did with complex variables. Works like a dance : // trying complex coordinates ( var x, z; z = ImageSynth(Pic.new(Rect.newBy(0,0,320,200), 32), Synth.new({ var x, y, t, scale, rot, p, q; scale = SinOsc.ar(0.0001, 0, 0.5, 1); //scale = MouseX.kr([0.001,20]); rot = SinOsc.ar(0.13, 0, 2pi); #x, y, t = XY.ar(scale, scale, rot: rot); q = Complex(x,y); "complex".postln; q.dump; // don't ask ... (q*q*q).theta.sin/q.squared.rho; }) ); z.start; z.next; x = GUIScreen.new("pic synth", Rect.newBy(80,80,320,200), z.pic); x.sched(0, inf, { z.next; x.refresh; 0.02 }); ) Cheers, Staffan Liljegren ------------------------------ Date: Tue, 29 Aug 2000 04:13:49 -0500 (CDT) From: "AUDIOSYNTH.COM" <---@---.---> Subject: BOUNCE sc-users@lists.io.com: Non-member submission from [Mic Berends ] (fwd) - ---------- Forwarded message ---------- Date: Mon, 28 Aug 2000 10:58:01 -0500 From: owner-sc-users@lists.io.com To: owner-sc-users@lists.io.com Subject: BOUNCE sc-users@lists.io.com: Non-member submission from [Mic Berends ] >From sc-users-owner Mon Aug 28 10:57:59 2000 Received: from relay1.pair.com (relay1.pair.com [209.68.1.20]) by lists.io.com (8.9.3/8.9.1a) with SMTP id KAA30338 for ; Mon, 28 Aug 2000 10:57:59 -0500 Received: (qmail 24133 invoked from network); 28 Aug 2000 15:57:27 -0000 Received: from d83b429a.dsl.flashcom.net (HELO ifx.com) (216.59.66.154) by relay1.pair.com with SMTP; 28 Aug 2000 15:57:27 -0000 X-pair-Authenticated: 216.59.66.154 Message-ID: <39AA8B1F.B3087F79@ifx.com> Date: Mon, 28 Aug 2000 08:54:08 -0700 From: Mic Berends <---@---.---> Reply-To: mic@ifx.com Organization: Interactive Effects X-Mailer: Mozilla 4.74 (Macintosh; U; PPC) X-Accept-Language: en,pdf MIME-Version: 1.0 To: sc-users@lists.io.com Subject: Re: Telex USB Digital Audio Converter (P-500) References: <34.9b56cd0.26db05a7@aol.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit only samples up to 22k... :( ------------------------------ End of sc-users-digest V1 #163 ******************************