Re: introducing me

From: Eric Scheirer (eds@media.mit.edu)
Date: Sat Sep 11 1999 - 15:15:08 EDT


Hi Cor,

Welcome!

You wrote:

> Is it possible to play real time. That is: is it possible to send an
instrument start
> command without a start and end time. The instrument should be
instantiated
> immediatly and start playing until some instrument end command. The
duration
> is not know in advance. Is that possible?

Yes. If you are using MIDI control this happens automatically. In SASL you
would do something like this:

n1: 1.0 beep -1 440 0.5
.
.
    5.0 control n1 stop 1

The -1 duration to the 'beep' instrument says that the note should play
indefinitely. The control line shows then turns the note off.

Then the instrument for 'beep' would look like

  instr beep(freq, amp) {
    imports stop;

    if (stop && !off) {
      turnoff;
      off = 1 ;
    }

    if (off) {
      // release phase

      .. synthesis code ...
    }
    else { // sustain phase }

  {

Best,

 -- Eric

+-----------------+
| Eric Scheirer |A-7b5 D7b9|G-7 C7|Cb C-7b5 F7#9|Bb |B-7 E7|
|eds@media.mit.edu| < http://sound.media.mit.edu/~eds >
| 617 253 0112 |A A/G# F#-7 F#-/E|Eb-7b5 D7b5|Db|C7b5 B7b5|Bb|
+-----------------+



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:35 EST