From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #145 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 16 2000 Volume 01 : Number 145 ---------------------------------------------------------------------- Date: Fri, 14 Jul 2000 15:09:11 -0400 From: "crucial" <---@---.---> Subject: Re: DiskIn Spawn wierdness > Chad Kirby says.... > It almost works: if you check the box 10 times, it will >play 6-8 of those times, but nothing the rest of the time. I don't see a >pattern that will predict when it will or won't play. ( // a rewrite, but it still exhibits the same problem var w, env, b1, tspawn; // Read in a file b1 = SoundFile.new; b1.read(":Sounds:floating_1"); env = Env.new([1,1,0],[0.1,0.1], 'welch', 1 ); w = GUIWindow.new("Test", Rect.newBy(128, 64, 400, 240)); CheckBoxView.new( w, Rect.newBy(60, 40, 50, 20), "B1") .action_({arg th; if(th.value == 1,{ tspawn.source.trigger },{ tspawn.source.releaseAll }) }); Synth.play({ tspawn= TSpawn.ar( { arg spawn, i, synth; EnvGen.kr( env) * DiskIn.ar( b1, false) }, 2, nil, 0.0 ) }); w.close; ) ( // used preload instead of read // problem fixed. but i couldn't tell you why exactly. // you can't read it in if the file is long anyway, // but you can preload to get a head start on things. var w, env, b1, sig, tspawn; // Read in a file b1 = SoundFile.new; b1.preload(":Sounds:floating_1"); env = Env.new([1,1,0],[0.1,0.1], 'welch', 1 ); w = GUIWindow.new("Test", Rect.newBy(128, 64, 400, 240)); CheckBoxView.new( w, Rect.newBy(60, 40, 50, 20), "B1") .action_({arg th; if(th.value == 1,{ tspawn.source.trigger },{ tspawn.source.releaseAll }) }); Synth.play({ tspawn= TSpawn.ar( { arg spawn, i, synth; EnvGen.kr( env) * DiskIn.ar( b1,false) }, 2, nil, 0.0 ) }); w.close; ) ( // using PlayBuf instead, but its going to loop var w, env, b1, tspawn; // Read in a file b1 = SoundFile.new; b1.read(":Sounds:floating_1"); env = Env.new([1,1,0],[0.1,0.1], 'welch', 1 ); w = GUIWindow.new("Test", Rect.newBy(128, 64, 400, 240)); CheckBoxView.new( w, Rect.newBy(60, 40, 50, 20), "B1") .action_({arg th; if(th.value == 1,{ tspawn.source.trigger },{ tspawn.source.releaseAll }) }); Synth.play({ tspawn= TSpawn.ar( { arg spawn, i, synth; EnvGen.kr( env) * PlayBuf.ar( b1.data) }, 2, nil, 0.0 ) }); w.close; ) > >( >var w, env, b1; >// Read in a file >b1 = SoundFile.new; >b1.readHeader(":Sounds:floating_1"); >b1.readData; > >env = Env.new([1,1,0],[0.1,0.1], 'welch', 1 ); > >w = GUIWindow.new("Test", Rect.newBy(128, 64, 400, 240)); >CheckBoxView.new( w, Rect.newBy(60, 40, 50, 20), "B1", 0, 0, 1, 0, 'linear'); > >Synth.play({ > var offtrig, trig, spawns; > spawns = Array.newClear(1); > trig = w.at(0).kr(0); > offtrig = Trig1.kr( (trig - 1).abs, 0.1); > > // stop sound when check un-checked > Sequencer.kr( {arg i; > if( i>0, { a = spawns.at(0); > if( a.notNil, {"sound off".postcln; > a.releaseAll; spawns.put( 0, nil )} > ) } ); nil }, offtrig ); > > // start sounds when check checked > TSpawn.ar( { arg spawn, i, synth; > spawns = spawns.put( 0, spawn); > "sound on".postcln; > EnvGen.ar( env, > DiskIn.ar( b1, false) ) > }, 2, nil, trig ) // trigger >}); >w.close; >) > >Chad Kirby // Technical Coordinator for Digital Arts // CARTAH >ckirby@u.washington.edu // 206\616-6258 >________ >He who has never hoped can never despair. > George Bernard Shaw (1856-1950) > > > crux. _____(( http://crucial-systems.com _________________))_______ ------------------------------ Date: Fri, 14 Jul 2000 13:54:35 -0700 From: Alberto de Campo <---@---.---> Subject: Re: DiskIn Spawn wierdness > ( // used preload instead of read > // problem fixed. but i couldn't tell you why exactly. > // you can't read it in if the file is long anyway, > // but you can preload to get a head start on things. when you tell the disk "read now!", with diskin, it may be asleep, half asleep, or awake. so it takes an unpredictable amount of time before it really begins streaming off the disk. when you preload, it's no problem if the disk needs half a second to wake up, since you can start playback out of the preload buffer for a while. best, alberto ------------------------------ Date: Fri, 14 Jul 2000 21:04:11 -0500 From: James McCartney <---@---.---> Subject: version 2.2.9 available SC 2.2.9 MacBinary: SC 2.2.9 BinHex: SCPlay 2.2.9 MacBinary: SCPlay 2.2.9 BinHex: Another very minor release. The vast majority of my effort recently has been going into version 3. - --- Changes in Version 2.2.9 There was a problem in the ControlIn.sc file in version 2.2.8. The PACE reauthorization bug should be fixed now. Several bugs reported by Alberto de Campo involving the Alter menu were fixed. A debug line was being printed by MultiTap. ------------------------------ Date: Sat, 15 Jul 2000 09:18:36 -0500 From: James McCartney <---@---.---> Subject: Re: Why Doesn't Program #4 Produce a Sweeping Filter of a Sawtooth It doesn't work because the Delay outputs zeroes initially and a zero hertz input to a filter blows up the math. Use the Peep ugen to figure out what something is outputting. Peep posts the value of an output at regular intervals. q = BPF.ar (ai, freqs.at(4), bandwidth, 200 ); Peep.ar(freqs.at(4), "freq"); Peep.ar(q, "BPF"); q; - ----- You can fix your problem with the following change: DelayN.kr ( ... ).max(sawMin) - ------ This is needlessly complex: LinExp.kr (LFSaw.kr (1/sawPeriod, (sawMax/2) - sawMin, sawMax/2), sawMin, sawMax, sawMin, sawMax), change to: LinExp.kr ( LFSaw.kr(1/sawPeriod), -1, 1, sawMin, sawMax ), - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Sat, 15 Jul 2000 13:11:57 -0500 From: Gary Morrison <---@---.---> Subject: Re: Why Doesn't Program #4 Produce a Sweeping Filter of a Sawtooth Excellent. Thanks for figuring that out finally, and for the tip about peep and the (obvious in hindsight) simplification of the exponential sawtooth waves. Speaking of simplifying those sawtooth waves, is there any way to delay the LFSaw.kr invocations themselves rather than burning a lot of memory on delaying their outputs. Perhaps events or something like that? ------------------------------ Date: Sat, 15 Jul 2000 19:11:43 -0500 From: James McCartney <---@---.---> Subject: Re: version 2.2.9 available In case you tried to get the binhexed version earlier.. It seems the binhexed version didn't make it up initially. It is there now. > SC 2.2.9 BinHex: > - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Sat, 15 Jul 2000 19:22:45 -0500 From: James McCartney <---@---.---> Subject: Re: Why Doesn't Program #4 Produce a Sweeping Filter of a Sawtooth on 7/15/00 1:11 PM, Gary Morrison at mr88cet@texas.net wrote: > Speaking of simplifying those sawtooth waves, is there any way to delay the > LFSaw.kr invocations themselves rather than burning a lot of memory on > delaying > their outputs. Perhaps events or something like that? Version 3 will have the ability to create and patch in new ugens to a running synth. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Sat, 15 Jul 2000 19:40:38 -0500 From: James McCartney <---@---.---> Subject: ? ------------------------------ Date: Sun, 16 Jul 2000 02:14:52 -0400 From: "crucial" <---@---.---> Subject: Re: ? > > > > > > > Forgive the lack of other meaningful content, but.... WOW !!!!!!!! now if only video projectors could come down in price. _____(( http://crucial-systems.com _________________))_______ ------------------------------ Date: Sun, 16 Jul 2000 02:25:40 -0400 From: "crucial" <---@---.---> Subject: Re: DiskIn Spawn wierdness / 24bit question > > >> ( // used preload instead of read >> // problem fixed. but i couldn't tell you why exactly. >> // you can't read it in if the file is long anyway, >> // but you can preload to get a head start on things. > >when you tell the disk "read now!", with diskin, it may be >asleep, half asleep, or awake. so it takes an unpredictable >amount of time before it really begins streaming off the disk. True, but in this case it never comes at all. Mysterious. And the disk would appear to be awake being that we just played from it. I've done a fair bit of stuff cutting up sound files in random ways, but its always got to be arhythmic if we can't guarantee the start time. I imagine when we can read sound files inside threads we can preload each section and get it to come in sample accurate. > >best, >alberto > > _____(( http://crucial-systems.com _________________))_______ ------------------------------ Date: Sun, 16 Jul 2000 02:31:53 -0400 From: "crucial" <---@---.---> Subject: Re: ? > > > > > > > ... will we be able to trigger a printer to print ? _____(( http://crucial-systems.com _________________))_______ ------------------------------ Date: Sun, 16 Jul 2000 02:36:35 -0400 From: "crucial" <---@---.---> Subject: 24bit question Apologies for so many posts, but I forgot the 24bit question... Is 24bit SDII some kind of kludge ? Is it not a 'real' header format ? (Not being a multiple of 16). It would be nice to be able to write these files to bring into Logic audio for quick editing. (though I've become awfully sensitive as of late to damaging the bit depth). _____(( http://crucial-systems.com _________________))_______ ------------------------------ Date: Sun, 16 Jul 2000 13:20:40 +0100 From: Arie van Schutterhoef <---@---.---> Subject: Re: impressive > - -that looks more than promising... after nato this is the second example making clear that Power Macs can (at last) compete with SGI's for graphics! impressive 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: Sun, 16 Jul 2000 17:45:17 +0000 From: Jem Finer <---@---.---> Subject: GUI items as input to ImpulseSequencer > 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_3046614317_642986_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit As a first step towards making some kind of rhythm sequencer I'm simply trying to get an ImpulseSequencer to accept an array of values obtained from a GUI. This code doesn't work because ImpulseSequencer stream.value must return an Integer or Float. yet beats.at(0).class.postln tells me it's a Float. What am I doing wrong ? Thanks, Jem ( var w,beats; w = GUIWindow.new("panel", Rect.newBy(119, 574, 258, 99)); 8.do({arg i;CheckBoxView.new( w, Rect.newBy(13 + (26 * i), 33, 22, 22), "CheckBoxView", 1, 0, 1, 0, 'linear')}); beats = List.fill(8,0); beats = beats.collect({arg item,i;w.at(i).value}); //beats.at(0).class.postln; play({ arg synth; var t; t = LFPulse.ar(8); //synth.repeat(0,1/t,{beats = beats.collect({arg item,i;w.at(i).value})}); Decay2.ar( ImpulseSequencer.ar(`beats, t), 0.001, 0.5, FSinOsc.ar(150, 0.2)) }); w.close ) - --MS_Mac_OE_3046614317_642986_MIME_Part Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable GUI items as input to ImpulseSequencer As a first step towards making some kind of rhythm sequencer I'm simply= trying to get an ImpulseSequencer to accept an array of values obtained fro= m a GUI.
This code doesn't work because

ImpulseSequencer stream.value must return an Integer or Floa= t.

yet beats.at(0).class.postln tells me it's a Float.

What am I doing wrong ?

Thanks,

Jem


(   
  var w,beats;
  w =3D GUIWindow.new("panel", Rect.newBy(119= , 574, 258, 99));
  8.do({arg i;CheckBoxView.new( w, Rect.newBy(13 + (2= 6 * i), 33, 22, 22), "CheckBoxView", = 1, 0, 1, 0, 'linear')});
  
  beats =3D List.fill(8,0);
  beats =3D beats.collect({arg item,i= ;w.at(i).value});
  //beats.at(0).class.postln;


play({
  arg synth;
  var t;
  t =3D LFPulse.ar(8);
  //synth.repeat(0,1/t,{beats =3D beats.collect({arg item,i;w.at(i).value})});
  Decay2.ar(    &nbs= p;    
      ImpulseSequencer= .ar(`beats, t),
      0.001, 0.5, FSin= Osc.ar(150, 0.2))
  
});
w.close

)
=20 - --MS_Mac_OE_3046614317_642986_MIME_Part-- ------------------------------ Date: Sun, 16 Jul 2000 23:01:23 +0100 From: Arie van Schutterhoef <---@---.---> Subject: Re:(bloody) impressive >> >impressive - -actually: I want to paraphrase that: more than bloody impressive (thank you, James); [...sorry about this exclamation...] (you'll understand... sort of.... [hopefully]) 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 <<<<<<<<<<<<<<<<<<<<<<<<<-////||\\\\->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------ End of sc-users-digest V1 #145 ******************************