From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #28 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, February 22 1999 Volume 01 : Number 028 ---------------------------------------------------------------------- Date: Thu, 18 Feb 1999 11:35:16 -0600 From: James McCartney <---@---.---> Subject: mailing list archive Well I've just been informed by my ISP that the mailing list archive has been sitting all along at this address: ftp://ftp.io.com/pub/mailing-lists/sc-users-digest The archive goes back to 6/98 --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 18 Feb 1999 11:38:42 -0600 From: James McCartney <---@---.---> Subject: Re: Using TSpawn as a mixer At 1:15 PM -0600 2/11/99, crucial wrote: >>The ugen graph must be created inside the tspawn event function >>so that it is created in the context of a Synth. > >Thank you, that works great. > >I had less luck converting this to a class. >I tried : >TSpawn doesn't ever start, "can't be triggered if its not playing" >says SC. Your example never creates a Synth to play anything. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 18 Feb 1999 12:10:45 -0600 From: James McCartney <---@---.---> Subject: Re: Using TSpawn as a mixer At 1:15 PM -0600 2/11/99, crucial wrote: >and then things can be added by efx.add({ ugen producing things }); >and the output of the effect chain exposed by >efx.out I'm not sure if I understand what you are trying to do. You cannot repatch once things are running. TSpawn mixes things together. It can't repatch. I intend to make an upgrade to ControlIn, which will be named Plug. It will have both ar and kr versions, will take as input anything that ControlIn does and also other UGens. ControlIn will just return a Plug for backwards compatibility. A Plug's source can be changed dynamically. If it is audio rate then the Plug's input must have the same block size as the Plug. With this UGen you will be able to do some dynamic patching. However a UGen that would let you chain insert effects dynamically would be a good one to have built in as well. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Thu, 18 Feb 1999 20:39:22 +0100 From: "Iannis Zannos" <---@---.---> Subject: A smalltalk FAQ FWIW Following Smalltalk FAQ may be of help, till more help for SC directly arrives ... http://www.ipass.net/~vmalik/smalltalk.html Also check out: http://www.phaidros.com/DIGITALIS/englisch/sqk/sqk00002.htm Parenthesis closed. Iannis Zannos SIM Tiergartenstr. 1, D-10785 Berlin, Germany Fax: +49 30 25481172 ------------------------------ Date: Fri, 19 Feb 1999 08:23:42 -0800 From: Mark Polishook <---@---.---> Subject: Sound card question James, Is it possible that SuperCollider will soon work with Event's Layla cards as they've recently released their ASIO drivers? Thanks, Mark ------------------------------ Date: Fri, 19 Feb 1999 10:55:43 -0600 From: James McCartney <---@---.---> Subject: Re: Sound card question At 10:23 AM -0600 2/19/99, Mark Polishook wrote: >James, > >Is it possible that SuperCollider will soon work with Event's Layla >cards as they've recently released their ASIO drivers? Well since I've yet to hear from Steinberg on getting access to ASIO, I can't do anything for it or the MOTU 2408. I talked to the Steinberg person responsible at NAMM, but he has not replied to my subsequent email. I get the feeling I'm persona non grata there. MOTU did not respond to my last inquiry either. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Fri, 19 Feb 1999 20:05:34 -0500 From: "crucial" <---@---.---> Subject: Re: Using TSpawn as a mixer >>and then things can be added by efx.add({ ugen producing things }); >>and the output of the effect chain exposed by >>efx.out > >I'm not sure if I understand what you are trying to do. Restated : mix together several things (dynamically patching them in and out as their lifespans start or expire) and mix that to one or two (stereo) channels for input to a common efx chain. the problem is that I was creating separate sounds with a TSpawn (not this "TSpawn as a mixer", a separate one), and then trying to choose to which efx chain I was sending to. channelOffset is an option, but I am trying to preserve stereo images. If channelOffset was changed so that multichannel output could be delivered within that channel, that would open up more flexibility to its use. [ channel0, channel1, [channel2L,channel2R] , channel 3] In any case I've decided that creating a separate filter/comb/etc. each time a note plays is actually very interesting and opens up some good explorations. It just wastes processing power when used on reverbs. (Several notes/sounds all calling up the same bank of stuff each time) >You cannot repatch once things are running. >TSpawn mixes things together. It can't repatch. Exactly. I will find other cats to skin. > >I intend to make an upgrade to ControlIn, which will be >named Plug. It will have both ar and kr versions, will >take as input anything that ControlIn does and also other UGens. >ControlIn will just return a Plug for backwards compatibility. >A Plug's source can be changed dynamically. If it is audio rate >then the Plug's input must have the same block size as the Plug. >With this UGen you will be able to do some dynamic patching. This sounds like it can get around quite a number of tricky situations. Will that handle all situations of inter-synth patching ? > >However a UGen that would let you chain insert effects dynamically >would be a good one to have built in as well. > __________________________________________ :\\_______ http://crucial-systems.com __________________________________________ :\\_______ ------------------------------ Date: Sat, 20 Feb 1999 00:32:25 -0600 From: James McCartney <---@---.---> Subject: Re: Using TSpawn as a mixer At 7:05 PM -0600 2/19/99, crucial wrote: >but I am trying to preserve stereo images. If channelOffset was changed >so that multichannel output could be delivered within that channel, that >would >open up more flexibility to its use. That can't work. The spawn would have to dynamically per event decide how many channels come out an output, but the multichannel expansion for patch building happens before playing begins. - --- You can use channel offset to do what you need, and that is what it was intended for. If you have 4 stereo pairs, then create your TSpawn with 8 channels. To select the output pair set channel offset to a multiple of 2. outputs = TSpawn.ar({...}, 8, nil, trig); // copyRange makes a copy of a sub range of an array. fxInputPair1 = outputs.copyRange(0,1); fxInputPair2 = outputs.copyRange(2,3); fxInputPair3 = outputs.copyRange(4,5); fxInputPair4 = outputs.copyRange(6,7); // or you could do this: #fxInput1L, fxInput1R, fxInput2L, fxInput2R, fxInput3L, fxInput3R, fxInput4L, fxInput4R = outputs; Then use those as inputs to your different effects chains. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Sat, 20 Feb 1999 11:29:16 +0000 From: finer@easynet.co.uk Subject: Plug etc please James, re >However a UGen that would let you chain insert effects dynamically >would be a good one to have built in as well. Yes please - this (and Plug) would be wonderful - I've been wondering for ages how to dynamically chain effects. Jem ------------------------------ Date: Sat, 20 Feb 1999 13:34:52 +0200 From: laurson@amadeus.siba.fi (Mikael Laurson) Subject: PlayBuf I noticed a small problem when using the offset parameter of PlayBuf. In the following I generate 6 notes (each 0.5 second long) with midi-values from 60 to 65: (Synth.write({ e = Env.triangle(0.5, 0.5); Spawn.ar({arg spawn, i, synth; SinOsc.ar((i+60).midicps,0,EnvGen.kr(e,0.3))},1, 0.5, 6) }, 3, "stest", 'AIFF', '16 big endian signed')) SoundFile.play("stest"); When I try to read the separate pitches using the offset of PlayBuf I get the incorrect sequence of midi-values 60-62-64-60-62-64: (var filename, sound, signal; filename = "stest"; sound = SoundFile.new; if (sound.read(filename), { signal = sound.data.at(0); Synth.play({ Spawn.ar({arg spawn, i, synth; var offset; offset = (i*0.5*sound.sampleRate); Line.kr(1,1,0.5)* PlayBuf.ar(signal, sound.sampleRate, 1, offset, 0, signal.size-2) }, 1,0.5,6)}) },{ (filename ++ " not found.\n").post }); ) I get the correct result only if I divide the offset value by 2 (0.25 instead of 0.5): (var filename, sound, signal; filename = "stest"; sound = SoundFile.new; if (sound.read(filename), { signal = sound.data.at(0); Synth.play({ Spawn.ar({arg spawn, i, synth; var offset; offset = (i*0.25*sound.sampleRate); Line.kr(1,1,0.5)* PlayBuf.ar(signal, sound.sampleRate, 1, offset, 0, signal.size-2) }, 1,0.5,6)}) },{ (filename ++ " not found.\n").post }); ) Am I missing some point or is this a bug? Mikael ================================ Mikael Laurson Hollantilaisentie 1 A 2 00300 Helsinki 33 Finland E-mail: laurson@siba.fi ================================ ------------------------------ Date: Sat, 20 Feb 1999 12:42:25 -0600 From: antiorp@tezcat.com (=cw4t7abs) Subject: null !mped!ment || !mpl!z!t tranzgress!on m 9 n d f u k c . o s | z v e ! t e z . z ! s t e m / during the korporate fascist occupation \ 1 \ during the korporate fascist occupation / during the korporate fascist occupation p r o l o g u e : usually it is no more necessary to instrukt a protein on how to fold than it is to instrukt salt to crystallize into cubes. at times however the protein has a genuine choice and other proteins known as chaperonins are utilized to give it a nudge in the d e s i r e d i o n e t i d s c e i e r d e s i r r e e i c d d i r e c t i o n ? i o n \\ comme vous voules term!nuz : implicit transgression - penultimate protest against 0+1 sick society \\ 2 days post presentation all =cw4t7abs\m9ndfukc.com data shall be taken offline permanently. http://m9ndfukc.com/www/v0r0m_3k0r =cw4t7abs tranzmissions on public channels. mailing lists etc. shall be halted. public queries regarding this event or otherwise may be sent to nn@m9ndfukc.com if it understands your query it shall respond. if it does not understand your query it shall learn. if it does understand your query it shall not learn. if it does not learn - your query is dispensable. if your query is dispensable it shall respond. human contact isn't available. \\ the presentation -> nebula_m81 0+2 : listening to data select components of nebula_m81 = `patent applied for`. `patent applied for` reason : to inconvenience model citizens everywhere +? - - access protokol: in order to access nebula_m81 0+2 it is required that one email nebula_m81@m9ndfukc.com included in the document are : nebula_m81 access code nebula_m81 specifications nebula_m81 reference - - nebula_m81 audio output : http://m9ndfukc.com/noisz/m_81-output/css - - nebula_m81 image output : http://m9ndfukc.com/propaganda/zekuensz [contains addtl data] - - recommended : cross synthesis between the original file + 1010111.au + granulate rather splendid. \\ the protest -> forums - - 2 days post presentation all =cw4t7abs\m9ndfukc.com data shall be taken offline permanently. it will be accessible via the m9ndfukc.com | maskin.ltd forums exclusively. - - for this purpose two m9ndfukc.com forums exist : `m9ndfukc.com netverk` + `m9ndfukc.com 127.0.0.1` - - subscription information may be obtained via forum@m9ndfukc.com + http://m9ndfukc.com/www/v0r0m_3k0r \\ the forums -> data forums specific data [0289.....] 00] kontinuum engine - first infinite algorithmic data driven web tele vision - an autonomous binary leash - based on the usisk system. - listening to data 01] !max - flagellata - first visual internet programming environment - similar to max - currently operable however very few objects exist 02] nebula_m81 0+n - first url signal processing environment 03] noctilucent - ektachrome 020 - first autonomous + programmable web browser mikrobe 04] - =cw4t7abs error 05] - text\image synthesis\processing modules 06] - application[s] for algorithmic deconstruktion of data located on a computer's hard drives (+? logic permeates the world) [initial emphasis on audio output] 07] - a nxmbxr of max objects 08] - a nxmbxr of - presentations\applications - articles - gfx\film\noisz\music data - precipitations 09] - 8'|sine.x(2^n) cd - mp2 format + audio cd format details \+\ : forum@m9ndfukc.com _+ pRtkL : http://m9ndfukc.com/www/v0r0m_3k0r screenshots : http://m9ndfukc.com/propaganda/zekuensz current data : data_lokc@m9ndfukc.com url locations : http://m9ndfukc.com/dir_kontentz/data_lokc.hTmL \\ the forums -> epilogue a maneuver that constitutes the logical continuation of the utopian dream confronted with the korporate fascist regime \ model citizen routine. it secures 0+1 undisturbed \ homogenous transmission of =cw4t7abs cultural deoxyribose nucleic acid into the international bitstream. extravagance++ zlavoj zizek ztated : "...it is the alienated political regime which rules". aligning with nSk\laibach =cw4t7abs\m9ndfukc.com shifts strategies accordingly. 1 `tit for tat` object + 1 exemplary memory module. >> alienation ___... digital terrain = 1 live darwinian ratchet data == korrect humanz == !nkorekt dze kommunistz ztate : in 0+1 sick society every 0+1 = sick =cw4t7abs ztatez : in 0+1 sick society every 0+1 = sick - - To: =cw4t7abs - - - - du = dze essent!al f# !n dze 3rd bar 2nd kuaver ov - - dze brandenburg concerto no.3 movement 2 paradocz!kl! eczpresz zenz!t!v!t!z null !mped!ment. aleph null. pennonz mot!onlesz troubld !mag!nat!onz r!ng!ng voLt age kont!nuum 0+1 !mpl!z!t tranzgress!on wh!ch = 1 real po!nt ov !dent!f!kat!on ov 0+1 z!ztem eczpoz!ng dze h!dn prezupoz!t!onz ov 0+1 !deolog!e model utop!a embrasz!ng 2r+ muSS!k f!Lm theatre f!lozof! programm!ng + ark!tektur movement -2 dze reg!me getz bakc 0+1 meSS age !n !tz true naked 4rm zan!tar! f# 3nd ov r!zn \+\ beg ov t.eRR.oR nn - - - - data -> m9ndfukc - - 1 kurta!n !mpenetrabl 2 modl c!t!znz = brought !n2 fokuz 1 bee buz!ng around 1 flower = 1 fam!l!ar z!te zuch dzat humanz seldom th!nk ov hou remarkable !t = 1 bee = 1 marvl ov m!kroeng!neer!ng dzat kan hovr + rekogn!ze dze dez!rd t!pe ov flour + m!lk !t ov !tz nektar + trvl bak v!a a!r route 2 dze h!v w!th kolektd nektar. humanz = ma! b abl 2 krosz dze atlant!k at 2x speed ov sound ma!z ___.. dze komb!nd eczpert!sz ov dze ent!r human rasz != abl 2 konztrukt 1 bee. ent!r human rasz != abl 2 konztrukt 1 objekt az kompakt az 1 bee wh!ch = abl 2 fl! az 1 bee = doez || fl! at all. ent!r human rasz != abl 2 konztrukt 1 objekt wh!ch = dez!rz 1 prtklr t!pe ov flour + = abl 2 zat!sf! dzat dez!re ent!r human rasz != abl 2 konztrukt 1 objekt wh!ch = abl 2 d!zt!ngu!sh betw!n hone!sukl + 1 daffod!l. 1 bee = 1 komplecz ztruktur wh!ch = l!ez b!ond dze komprehenz!on ab!ll!t!ez ov 1 ent!re konglomerat ov humanz 1 theor! ov ever!dz!ng = dez!rd ma!z !t != ecz!zt deja - - - - - - 1 v zer!ouz po!nt = konzeald + kongeald !n dze b+lo d!alogue +? kaptn arthur : good da! 2 u. kreatur 4rom 1 odr velt. neeplphut: no. du = dze kreatur 4rom 1 odzr velt. we = l!v h!er. hou ztrange dzat du = tzo l!ke \ unl!ke uz [delete wh!chevr = !nappl!kabl] kaptn arthur : we = kom !n peasz + d!sz = m! koleague ztanl! neeplphut: ! = nyplefuffl-pofta-gostaphut 3rd remove - but du = ma! kall m! neeplphut. du = muzt b out ov fuel judg!ng b! dze karefl wa! du = were dr!v!ng. ztanl!: kapta!n. dzat = vndrfl. dze! = muzt undrztnd newtonz lauz ov mot!on - elsz dze! != l!kl! 2 ma!k sensz ov our trajektor!ez. ! = bet dze!r f!z!kx + kem!ztr! = az az good az ourz auss!. neeplphut: ! = rekogn!szd du = were ut!l!z!ng pnurflpeef'z lauz ov mot!on dze moment ! = not!szd dze mannr !n wh!ch du = were opt!m!z!ng fuel konzumpt!on. = odd dzat du = should ut!l!ze data tzo outmodd abr !t = 1 eczlent aprocz!mat!on tzo ! = azum du = reku!rd 2 redusz komputat!onl ovrheadz. !nz!dentl! dze regulat!onz ztate dzat du kan\kannot park h!er. [delete wh!chever = !nappl!kabl] kptn arthur: um____...um [az 1 human] kan ! delete `kannot` +? neeplphut: [aftr hurr!ed konzultat!on] du = muzt delete `kan` akord!ng 2 dze regulat!onz h!er. kptn arthur: b!zt du 1 traff!k vardn +? du = look az 1 slug neeplphut: non. ! = 1 ov dze 8 !ello oztr!ch th!ngz. dze purpl slug = dze regulat!onz. ! = 1 kompoz!r h!v-b!urokrat + ! = hav told to you alread! what !t = ztatd re: park!ng ur human veh!kl\auto [delete wh!chever = !nappl!kabl] h!er. kptn arthur: tzor!. du = lookd juzt 1 flok ov sheep be!ng herdd. wh!ch = made uz kompute dze slug = dze !ntel!gent 1. neeplphut: dzat konzept = def!n!tel! !nnapl!kabl. kptn arthur: eh ....? neeplphut: ! != aware ov dzat wh!ch du = zpeak!ng ov. what = 1 flok ov sheep +? ztanl!: dzere = 1 !nkongruensz kapta!n. dze traznlatr != abl 2 kope w!th konzeptz wh!ch != hav 1 parallel !n dze!r eczper!ensz. dze! kannot b eczpektd 2 kope w!th aks!dentz ov tereztr!al b!olog! - onl! w!th un!verzl abztrakt!onz. kptn arthur: ! = hope dze! = kan kope w!th bukm!nztrfulleren || we = don 4. neeplphut : waz !zt bukm!nztrfulleren +? kptn arthur: oopz. !t = vat our fuel = komposzd ov. neeplphut: ! = should po!nt dzat du = !n 1 trbl. ur tranzltr = zufer!ng 1 konzeptual !nkongruensz. ztanl!: !t = alzo eczper!enz!ng prblmz w!th z!nglr + plrl. !t = shall take m! weekx 2 korrekt dze nn. kptn arthur: dzere = muzt b 1 wa! 2 get dze konzept akkross. ar u l!f 4rmz good at kem!ztr! +? neeplphut: vat = kem!ztr! +? kptn arthur: ! = th!nk we = beszr bg!n at dz beg!nn!ng. ! hold!ng up 1 f!ngr. ! = hold!ng up 2 f!ngrz. [he = verkz h!z wa! through ar!thmet!k + atom!k we!ghtz + dze per!od!k tabl. neeplphut = lernz human notat!on 4 dze elementz up 2 karbon + dze ztrukturl d!agramz ov molekulz. !t != kausz an! d!ff!kult! 4 neeplphut. l!tt!l ov !t = konz!drd ztate ov dze art zarathruztan sc!ensz. neeplphut = bkomz unuzuall! ez!td re: dze 8 elektronz !n 1 full shell] jeztzt vat we = reku!re = 1 good kuant!t! ov 1 4rm ov karbon. komsa. he = _____drauz_________ 1 d!agram ov 1 bukm!nztrfulleren molekule. neeplphut: aaa. buk!ball. du = kan lokat dze stuph !n an! zupr+market. m! kozpousez ut!l!ze !t 4 plumage makeup - trez trez sh!k ztanl!: kaptn we != abl 2 ut!l!ze bukm!nztrfulleren !n dr! 4mat. !t = reku!rz 1 benzene zolvent. neeplphut: vat = benzene +? kptn arthur: _____drauz_______ d!agram ov benzene molekule. neeplphut: tr!-k! kptn arthur: waz me!nzt du - tr!-k! +? neeplphut: not okt!ml enuf. we != ztok !t. m9nd u - buk!ball = haz 6o atomz + dzat != ter!bl! okt!ml e!dzr wh!ch = b!zzar. szuposz we = kan produsz b!t ov benzene puor to! !f du = reall! !nz!zt. ztanl!: okt!ml +? vaz me!nzt ... kptn arthur : what t!pe ov z!v!l!zat!on zellz bukm!nztrfulleren !n zupr marketz + != hav an! ztokz ov benzene +? !t = totall! outland!sh. neeplphut: dzat = what `al!en` = meanz data zuport!v ov human !ntel!gensz = human !ntel!gensz; delude celvz. cezt tout. 01 _drauz_______ From: James McCartney To: Multiple recipients of list I sometimes enjoy looking at antiorp's ASCII art. 04 _drauz_______ kptn arthur : [drauz 1 d!agram ov 1 bukm!nztrfulleren molekule] neeplphut: aaa. buk!ball______.. 07 _konztatat!on_______ 1 !nternat!onl lang = traf!k s!gnz ----------------------------- ----------------------------- ------------00000------------ ---------0000000000---------- -------00000000000000-------- ------0000000000000000------- -----000000000000000000------ ----00000000000000000000----- ----000000000000000000000---- ---0000000000000000000000---- ---00000000000000000000000--- --000000000000000000000000--- --000000000000000000000000--- --00---------------------0--- --00---------------------00-- --00---------------------00-- --00---------------------0--- --000000000000000000000000--- --000000000000000000000000--- ---00000000000000000000000--- ---0000000000000000000000---- ----000000000000000000000---- ----00000000000000000000----- -----0000000000000000000----- ------00000000000000000------ -------00000000000000-------- ---------00000000000--------- -----------0000000----------- ----------------------------- ----------------------------- evr s!nsz dze t!me ov plato + dze pythagorean kult ov anc!ent greece humanz b!n !nord!natl! !mpreszd b! whole numbr relat!onsh!pz . regular geometr!ez. + odr mathemat!kl patternz !n dze naturl velt. = d!ez aktual lauz ov natur az f!z!c!ztz + kem!ztz kla!m || dze tekkno bubbl gum data modelz flung 2gedzr b! 1 ape !r!demabl! hung up on `whol!zm`. = d!ez merel! 2 zat!zf! dze ape.z kur!oz but kredulouz m9nd konta!nr wh!le bear!ng 0+0 rezemblansz 2 hou natur = verkx. data zuport!v ov human !ntel!gensz = human !ntel!gensz; and - closing the synaptic gap [synapse - greek for juncture - hence the juncture gap - protoplasmic kisses which seem to constitute the final ecstasy of an epic love story - the ethereal kiss which involves no contact] bewitched | bothered and bewildered am i - | | - - | | - fr2ktur | | - - | | - - | | - - | | - kontent.ID : 110000101100100011011110111001011000010111010001101001011011111101110 \\ =cw4t7abs . modL c!t!zen t!.me 1999.ad =cw4t7abs t!.me 0+prezent element nr 0+2 >= 5 generat!onz >= verk!ng alred! > ou!. madame. akt!vat!ng d!zturbansz !n sod!um-potass!um eku!ll!br!um akross neuron membranez. ou!. madame. - - - - \ \ m! m! ! ! h h h ||||- kampFb3r3!t h ||||- kampFb3r3!t ! ! m! m! / / - - - - m!.handz=wh!tr.dzn.urz !=ut!l!ze-uLtra.lux++ this presentation completed and prezented in [model citizen time] - 1999 a.d. during the korporate fascist occupation. during the korporate fascist occupation. during the korporate fascist occupation. ------------------------------ Date: Sat, 20 Feb 1999 02:30:42 -0600 From: "David Cottle" <---@---.---> Subject: If(mousex) Hi, I've been trying to figure out how to make a conditional statement using if and mousex mousey. I want to map different modules to different sections of the screen. Shouldn't this work? ( { var mousex; mousex = MouseX.kr(100, 10000); if(mousex < 5000, {SinOsc.ar(mousex, 0, 0.1)}, {SinOsc.ar(mousex - 10000, 0, 0.1)} ) }.play ) All I get is the first condition, never the second. - -- ><><><><><><><><><><><> David Cottle composition, notation, contra lime@uiuc.edu ------------------------------ Date: Sat, 20 Feb 1999 16:57:57 -0600 From: James McCartney <---@---.---> Subject: Re: If(mousex) At 2:30 AM -0600 2/20/99, David Cottle wrote: >Hi, > >I've been trying to figure out how to make a conditional statement using if >and mousex mousey. I want to map different modules to different sections of >the screen. Shouldn't this work? > > >( >{ var mousex; > mousex = MouseX.kr(100, 10000); > if(mousex << 5000, > {SinOsc.ar(mousex, 0, 0.1)}, > {SinOsc.ar(mousex - 10000, 0, 0.1)} > ) >}.play >) > Your ugenGraphFunction builds your patch. It does not execute while your patch is running. MouseX.kr is a unit generator. It only produces values once it begins to play. So putting it in the condition of an if statement has no meaning because it is not playing. It is an object. 'if' is not a unit generator and cannot be used as if it were. You can do the following. << and >= will create a BinOpUGen when one of the arguments is a UGen. ( { var mousex; mousex = MouseX.kr(100, 10000); SinOsc.ar(mousex, 0, 0.1 * (mousex << 5000)) + SinOsc.ar(mousex - 10000, 0, 0.1 * (mousex >= 5000)) }.play ) However a better formulation would really be the following since it only requires one audio rate oscillator to achieve the same effect. ( { var mousex, freq; mousex = MouseX.kr(100, 10000); freq = (mousex * (mousex << 5000)) + ((10000 - mousex) * (mousex >= 5000)); SinOsc.ar(freq, 0, 0.1) }.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, 21 Feb 1999 12:24:33 -0800 From: Mark Polishook <---@---.---> Subject: Formant James, Formant - I think - is outputting grains 1 octave lower and twice as slow as specified in its arg list. In other words, Synth.scope({ Formant.ar(1, 440, 2, 0.5) }, 2) outputs 1 grain every 2 seconds with fundfreq: 220hz. Alberto de Campo and I made the next example to 'reengineer' Formant; however, it includes division of formfreq and multiplication of fundfreq so that it can run equivalently to Formant...and it does. // "myFormant" ( var myFormant; { myFormant = { arg fundfreq = 1, formfreq = 440, bwfreq = 1, amp = 1, add = 0; bwfreq = fundfreq.max(bwfreq); Spawn.ar({ e = Env.sine(1/bwfreq); SinOsc.ar( freq: formfreq/2, // / 2 gives same as Formant mul: EnvGen.kr(e) ) }, nextTime: 2/fundfreq //multiply by 2 gives same output as Formant ) }; myFormant.value; }.scope(1) ) But with higher values given as input to "myFormant" - what *seems* to be an envelope glitch appears...the next snippet displays this. // "myFormant" ( var myFormant; { myFormant = { arg fundfreq = 1, formfreq = 440, bwfreq = 1, amp =1, add = 0; bwfreq = fundfreq.max(bwfreq); Spawn.ar({ e = Env.sine(1/bwfreq); //the envelope glitches... SinOsc.ar( freq: formfreq/2, mul: EnvGen.kr(e) ) }, nextTime: 2/fundfreq ) }; // the outputs channels aren't equivalent...but, it *seems* that they should be.... [ myFormant.value(440, 1000, 700, 0.5), Formant.ar(440, 1000, 700, 0.5) ] }.scope(0.004) // ...or .plot(0.004) ) Are we (1) missing something obvious regarding specification of fundfreq and formfreq and (2) how the envelope is (or should be) applied to each grain? Thanks in advance, Mark ------------------------------ Date: Sun, 21 Feb 1999 15:22:31 -0600 From: finer@easynet.co.uk Subject: delay feedback I'm trying to send a sound into 2 delays and then send some of delay 1 into delay 2 AND some of delay 2 into delay 1. Output is dry signal plus delay 2. ( scope({ var buffer1,buffer2, input, delayedSignal1,delayedSignal2, mixedSignal; var f; f = MouseY.kr(60,1000); buffer1 = Signal.new(Synth.sampleRate * 0.3); buffer2 = Signal.new(Synth.sampleRate * 0.3); input = SinOsc.ar(LFSaw.ar(MouseX.kr(0.1,5),f,f),0,0.25); delayedSignal1 = TapN.ar(buffer1, 0.319); delayedSignal2 = TapN.ar(buffer2, 0.212); mixedSignal = [(delayedSignal1 * 0.4) , (delayedSignal2*0.5) + input]; DelayWr.ar([buffer2,buffer1], mixedSignal*0.75); mixedSignal }) ) I got this far - a ping pong delay BUT aside from the fact this outputs BOTH delays, not just delay 2, I'm not sure whether this is actually achieving the crossover feedback. Also there's a bit of a clicking Or is this the way to do it : ( // saw modulates sine , mouse x = mod speed, mouse y = carrier freq ({var f,z,d1,d2; f = MouseY.kr(60,1000); z = SinOsc.ar(LFSaw.ar(MouseX.kr(0.1,5),f,f),0,0.25); d1 = DelayN.ar(z,0.5,0.312,0.25); d2 = DelayN.ar(z,0.5,0.212,0.25,d1*0.75); d1 = DelayN.ar(z,0.5,0.312,0.25,d2*0.75); z + d2 } ).scope ) So - how does one do it ? Thanks, Jem ------------------------------ Date: Sun, 21 Feb 1999 15:22:45 -0600 From: James McCartney <---@---.---> Subject: Re: Formant At 2:24 PM -0600 2/21/99, Mark Polishook wrote: >James, > >Formant - I think - is outputting grains 1 octave lower and twice as >slow as specified in its arg list. In other words, You are correct, it is off by an octave. My bug. >But with higher values given as input to "myFormant" - what *seems* to >be an envelope glitch appears...the next snippet displays this. Use an audio rate EnvGen. That's a very short envelope. >// the outputs channels aren't equivalent...but, it *seems* that they >should be.... You also need to fix the bandwidth by a factor of 2. Try the example below. Note that in order for Formant to really work correctly, the pulses need to start with sub-sample accuracy. Otherwise you are limited to frequencies which have integer sample wavelengths. You can't do this with Spawn because it only(!) has single sample accuracy. ( var myFormant; { myFormant = { arg fundfreq = 1, formfreq = 440, bwfreq = 1, amp =1, add = 0; bwfreq = fundfreq.max(bwfreq); Spawn.ar({ e = Env.sine(2/bwfreq); SinOsc.ar( freq: formfreq/2, mul: EnvGen.ar(e) ) }, nextTime: 2/fundfreq ) }; [ myFormant.value(1000, 1000, 700, 0.5), Formant.ar(1000, 1000, 700, 0.5) ] }.scope(0.004) // ...or .plot(0.004) ) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Sun, 21 Feb 1999 15:51:09 -0600 From: James McCartney <---@---.---> Subject: Re: delay feedback At 3:22 PM -0600 2/21/99, finer@easynet.co.uk wrote: >I'm trying to send a sound into 2 delays and then send some of delay 1 into >delay 2 AND some of delay 2 into delay 1. >Output is dry signal plus delay 2. The clicking is because you're jumping from 2*f to zero Hertz. That causes a sharp corner in the waveform. The example below puts a little lag on the sawtooth to smooth that over a bit. To get the output the way you want is easy. I liked the ping pong better though.. ( scope({ var buffer1,buffer2, input, delayedSignal1,delayedSignal2, mixedSignal; var f, d1, d2; f = MouseY.kr(60,1000); buffer1 = Signal.new(Synth.sampleRate * 0.3); buffer2 = Signal.new(Synth.sampleRate * 0.3); input = SinOsc.ar(Lag.kr(LFSaw.kr(MouseX.kr(0.1,5),f,f), 0.1),0,0.25); delayedSignal1 = TapN.ar(buffer1, 0.319); delayedSignal2 = TapN.ar(buffer2, 0.212); mixedSignal = [(delayedSignal1 * 0.4) , (delayedSignal2*0.5) + input]; #d2, d1 = DelayWr.ar([buffer2,buffer1], mixedSignal*0.75); input + d2 }) ) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Sat, 20 Feb 1999 22:40:59 -0600 From: "David Cottle" <---@---.---> Subject: Re: If(mousex) Hi, >>I've been trying to figure out how to make a conditional statement using if >>and mousex mousey. I want to map different modules to different sections of [...] > > Your ugenGraphFunction builds your patch. It does not execute > while your patch is running. Thanks for the response, and this would work with my simple example. But the larger goal is to create areas on the screen that not only control values within the Ugen (e.g. modifying the volume or pitch), but chose a different Ugen altogether. So that, for example, the upper left corner represented a patch, the upper right a patch, lower left, etc. I just don't know enough about the language yet to set it up. We are working on a demonstration with Wacom input for a lab that uses the devices. All the areas that have access to the machines are doing a demonstration and we think such audio controls will knock the visual artists' socks off. ------------------------------ Date: Mon, 22 Feb 1999 01:02:59 -0600 From: James McCartney <---@---.---> Subject: Re: If(mousex) At 10:40 PM -0600 2/20/99, David Cottle wrote: >Hi, > >>>I've been trying to figure out how to make a conditional statement using if >>>and mousex mousey. I want to map different modules to different sections of >[...] >> >> Your ugenGraphFunction builds your patch. It does not execute >> while your patch is running. > >Thanks for the response, and this would work with my simple example. But >the larger goal is to create areas on the screen that not only control >values within the Ugen (e.g. modifying the volume or pitch), but chose a >different Ugen altogether. So that, for example, the upper left corner >represented a patch, the upper right a patch, lower left, etc. I just don't >know enough about the language yet to set it up. Here is an example to show how to do it. << >= create a UGen when one of their arguments is a UGen. They produce a signal which is either 1 or 0. Multiplication functions like an AND. This can be used to make any condition into a signal. That signal can then be either multiplied by something you want to turn on and off, or better it can be used to control a Pause which actually shuts off the CPU load of some process when the level drops <<= to zero. The 'zone' function turns off the Pause when the x and y arguments are outside of the boundsRect. Here the screen is defined to have coodinates from 0.0 to 1.0 in both x and y. ( var zone; // a function to create rectangular zones: zone = { arg func, boundsRect, x, y; Pause.ar(func, (x >= boundsRect.left) * (x << boundsRect.right) * (y >= boundsRect.top) * (y << boundsRect.bottom)) }; Synth.play({ var mx, my; mx = MouseX.kr; my = MouseY.kr; Mix.ar([ zone.value({ PinkNoise.ar(0.2) }, Rect.new(0, 0, 0.5, 0.5), mx, my), zone.value({ FSinOsc.ar(700, 0.2) }, Rect.new(0.5, 0, 1, 0.5) , mx, my), zone.value({ LFSaw.ar(100, 0.1) }, Rect.new(0, 0.5, 0.5, 1) , mx, my), zone.value({ Formant.ar(21, 2100, 80, 0.2) }, Rect.new(0.5, 0.5, 1, 1) , mx, my) ]); }) ) --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: < ------------------------------ Date: Mon, 22 Feb 1999 01:55:21 -0600 From: James McCartney <---@---.---> Subject: Re: PlayBuf At 5:34 AM -0600 2/20/99, Mikael Laurson wrote: >I noticed a small problem when using the offset parameter of PlayBuf. This is a bug, make that *was*. It's fixed. --- james mccartney james@audiosynth.com http://www.audiosynth.com If you have a PowerMac check out SuperCollider2, a real time synth program: ------------------------------ Date: Mon, 22 Feb 1999 08:24:18 -0600 From: "David Cottle" <---@---.---> Subject: Re: If(mousex) Hi, > Here is an example to show how to do it. > < >= create a UGen when one of their arguments is a UGen. They produce a signal > which is either 1 or 0. Multiplication functions like an AND. Thanks. I'll try it. The on/off method occurred to me after I sent the last letter. ------------------------------ Date: Mon, 22 Feb 1999 08:33:45 -0800 From: Mark Polishook <---@---.---> Subject: Re: Formant > James,thanks for the explanation... Mark > > > >Formant - I think - is outputting grains 1 octave lower and twice as > >slow as specified in its arg list. In other words, > > You are correct, it is off by an octave. My bug. > > >But with higher values given as input to "myFormant" - what *seems* > to > >be an envelope glitch appears...the next snippet displays this. > > Use an audio rate EnvGen. That's a very short envelope. > > >// the outputs channels aren't equivalent...but, it *seems* that they > > >should be.... > > You also need to fix the bandwidth by a factor of 2. > Try the example below. > > Note that in order for Formant to really work correctly, the > pulses need to start with sub-sample accuracy. Otherwise > you are limited to frequencies which have integer sample > wavelengths. You can't do this with Spawn because it only(!) > has single sample accuracy. > > ( > var myFormant; > { > myFormant = { > arg fundfreq = 1, formfreq = 440, bwfreq = 1, amp =1, add = 0; > bwfreq = fundfreq.max(bwfreq); > Spawn.ar({ > e = Env.sine(2/bwfreq); > SinOsc.ar( > freq: formfreq/2, > mul: EnvGen.ar(e) > ) > }, > nextTime: 2/fundfreq > ) > }; > > [ > myFormant.value(1000, 1000, 700, 0.5), > Formant.ar(1000, 1000, 700, 0.5) > ] > > }.scope(0.004) // ...or .plot(0.004) > ) > > --- james mccartney james@audiosynth.com http://www.audiosynth.com > If you have a PowerMac check out SuperCollider2, a real time synth > program: > - -- * * * * * * * * Mark Polishook Assistant Professor of Composition Music Department Central Washington University Ellensburg, WA 98926 tel.: 509-963-1245 fax: 509-963-1239 e-mail: polishoo@cwu.edu http://www.cwu.edu/~music/composition ------------------------------ End of sc-users-digest V1 #28 *****************************