From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #119 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, May 15 2000 Volume 01 : Number 119 ---------------------------------------------------------------------- Date: Fri, 12 May 2000 14:07:36 -0700 (PDT) From: Chris Brown <---@---.---> Subject: writing to streams what's wrong with this? var saveData; saveData = IOStream.new; [1,2,3,4].storeOn(saveData); saveData.postln; results in ERROR: 'put' should have been implemented by IOStream... Object:subclassResponsibility... **************************************************** Chris Brown Assoc. Prof. of Music and Co-Director, Center for Contemporary Music (CCM) Mills College, Oakland, CA 94613 email: cbmus@mills.edu, phone: 510-430-2330; fax 510-430-3314 **************************************************** ------------------------------ Date: Fri, 12 May 2000 16:50:30 -0500 From: James McCartney <---@---.---> Subject: Re: writing to streams on 5/12/00 4:07 PM, Chris Brown at cbmus@mills.edu wrote: > > what's wrong with this? > > var saveData; > saveData = IOStream.new; > [1,2,3,4].storeOn(saveData); > saveData.postln; > > results in ERROR: > > 'put' should have been implemented by IOStream... > > Object:subclassResponsibility... IOStream is an abstract base class. You must use one of its subclasses that do implement 'put': File, CollStream, LimitedWriteStream - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Sat, 13 May 2000 13:16:49 +0200 From: Christian =?iso-8859-1?Q?M=FChlethaler?= <---@---.---> Subject: Re: again:pause - --------------AA06A39EE971FA351E2A3E06 Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353" Content-Transfer-Encoding: 7bit James McCartney wrote: > on 5/8/00 3:30 AM, chmuehlethaler at chmuehlethaler@freesurf.ch wrote: > > > Pause.ar(Pan4.ar( FSinOsc.ar(100 + 50.rand),xpos:goods1.at(0),ypos: > > goods1.at(1)),level:goods1.at(2)) > > Pause takes a Function as an argument. > > Pause.ar({ Pan4.ar( FSinOsc.ar(100 + 50.rand),xpos:goods1.at(0),ypos: > goods1.at(1)) },level:goods1.at(2)) > thank you, James. that's one part of the problem. The other part: how can I pause a whole patch of Ugens like the function "out" in my example? out = { arg a, b, amplitude; //a: y-distance of (sound - ear b: x-distance of (sound - ear) var inAC, inBD, inAfalls, inBfalls, inCfalls, inDfalls, inA, inB, inC, inD; var xpos, ypos; d = (b/a); e = (a/b); f = (e > ( -1)); // falls f*g = 1; (beide true:) g = (e < 1); // sound liegt in B oder D falls f*g = 1 inBD = (f*g); // sound liegt in B oder D inBfalls = (b >= 0); // sound liegt in B inDfalls = (1 - inBfalls); // sonst: sound liegt in D inAC = (1 - inBD); // sound liegt in A oder C inAfalls = (a >= 0); // sound liegt in A inCfalls = (1 - inAfalls); // sonst: sound liegt in C inA = (inAC * inAfalls); inB = (inBD * inBfalls); inC = (inAC * inCfalls); inD = (inBD * inDfalls); xpos = ((inA * d) + inB - (inC * d) - (inD)); ypos = (inA + (inB * e) - inC - ( inD * e)); [xpos, ypos]; // return }; if the distance of a sound to the cursor (ear) is big enough, the sound couldn't be hear distance = sound.dist(ear); amplitude = 1/((( distance < 1) * 1) + ((distance >= 1)* distance)).squared; //if distance < 1, amplitude stays 1 amplitude = (amplitude > sw)*amplitude; //amplitude = 0 if smaller than sw; sw = schwellenwert in this case, the whole computation of the position of the sound in the function "out" and "in" isn't be used. if I can pause it, it would be able to save resources and to put much more sounds in my sound garden. I'd like to build a garden that consists of several parts with their own sounds and rules. But the number of sounds which could be heard at the same time wouldn't be very high. I hope you get the point of my question! Christian - --------------AA06A39EE971FA351E2A3E06 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit  

James McCartney wrote:

on 5/8/00 3:30 AM, chmuehlethaler at chmuehlethaler@freesurf.ch wrote:

> Pause.ar(Pan4.ar( FSinOsc.ar(100 + 50.rand),xpos:goods1.at(0),ypos:
> goods1.at(1)),level:goods1.at(2))

Pause takes a Function as an argument.

 Pause.ar({ Pan4.ar( FSinOsc.ar(100 + 50.rand),xpos:goods1.at(0),ypos:
 goods1.at(1)) },level:goods1.at(2))
 

thank you, James.

that's one part of the problem. The other part: how can I pause a whole patch
of Ugens like the function "out" in my example?
 

out =  {
  arg  a, b, amplitude;                                         //a: y-distance of (sound - ear  b:  x-distance of (sound - ear)
  var inAC, inBD, inAfalls, inBfalls, inCfalls,
        inDfalls, inA, inB, inC, inD;
  var xpos, ypos;
   d = (b/a);
   e = (a/b);
   f = (e > ( -1));                                                   // falls f*g = 1; (beide true:)
   g = (e < 1);                                                        // sound liegt in B oder D falls f*g = 1
   inBD = (f*g);                                                    // sound liegt in B oder D
   inBfalls = (b >= 0);                                           // sound liegt in B
   inDfalls = (1 - inBfalls);                                    // sonst: sound liegt in D
   inAC = (1 - inBD);                                             // sound liegt in A oder C
   inAfalls = (a >= 0);                                           // sound liegt in A
   inCfalls = (1 - inAfalls);                                    // sonst: sound liegt in C
   inA = (inAC * inAfalls);
   inB = (inBD * inBfalls);
   inC = (inAC * inCfalls);
   inD = (inBD * inDfalls);
   xpos = ((inA * d) + inB - (inC * d) - (inD));
   ypos = (inA + (inB * e) - inC - ( inD * e));
   [xpos, ypos];                                                       // return
  };
 
 

if the distance of a sound to the cursor (ear)  is big enough, the sound couldn't be hear
 

    distance = sound.dist(ear);
   amplitude = 1/((( distance < 1) * 1) + ((distance >= 1)* distance)).squared;                        //if distance < 1, amplitude stays 1
   amplitude = (amplitude > sw)*amplitude;                                                                             //amplitude = 0 if smaller than sw; sw = schwellenwert
 

in this case, the whole computation of the position of the sound in the function "out" and "in"  isn't be used.
if I can pause it, it would be able to save resources and to put much more sounds in my sound garden.

I'd like to build a  garden that consists of several parts with their own sounds and rules.
But the number of sounds which could be heard at the same time wouldn't be very high.

I hope you get the point of my question!

Christian
 
 
 
 
 
 
  - --------------AA06A39EE971FA351E2A3E06-- ------------------------------ Date: Sat, 13 May 2000 07:09:55 -0500 From: James McCartney <---@---.---> Subject: Re: again:pause Put the each sound in a Pause. Look at how the screen zones example works. Pause.ar({ ..one sound.. }, someAmp) + Pause.ar({ ..another sound.. }, otherAmp) + .. etc.. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Sat, 13 May 2000 20:49:17 +0000 From: "Peter A. Scartabello" <---@---.---> Subject: Drawing Wavetable Hello, Are there any tools besides a line tool that I can use to daw a wave in the wavetable? A pencil would be nice, it is hard to draw curves with the line tool. Is there a way to maybe import a drawing from a graphics program, or even the clipboard? That would seem really complex though. Just curious. - -Peter Scartabello ------------------------------ Date: Mon, 15 May 2000 01:25:44 -0400 From: "christian.adam.hresko." <---@---.---> Subject: stereo? in the granulate input example, the output is mono. how exactly does one create a stereo output in this example? the [out, out] statement doesn't work because the outputs aren't ugens (assuming you've created a variable named out...). also if you comment the following line: //DelayWr.ar([bufL, bufR], input