Csound Csound-dev Csound-tekno Search About

Re: realtime polyphony

Date1999-05-19 22:24
FromTobias Kunze
SubjectRe: realtime polyphony
> even so, there is a nice (simple) benchmark program that I got from the net
> called "oscillates" (below) that i've used to check speed before, and
> it has a hard time getting above 70 oscillators without dropouts on my
> PII-450 (well, 1 processor thereof). So either Csound is way smarter

Hehe, I get 90 on my lowly, 7-year old 133 MHz Indy!  Adjusted for
MHz, that is 304.5 oscillators on the MIPS chip.  Puts the Pentium II
in perspective, doesn't it?


To be fair, i attach my adaptation of the test program.  The compile
line was 

  cc -Ofast=ip22_4k -o osc oscils-sgi.c -laudio -lm


> Adding SCHED_FIFO priority and MLOCKALL to lock all current and future
> pages in physical memory makes no visible difference to the program,

Yes, bumping the priority up in the FIFO class (up to 89 to be safe) 
doesn't help much at all.


----------oscil-sgi.c--------------------------------------------------
#include 
#include 
#include 

#include 

#define BUFSIZE 8192
#define SR_RATE 44100
#define WTABLESIZE 1000
#define FREQ 278.0
#define NOSCILS 1000
#define PI 3.1415926

void makewave(short wtable[]) {
  int i;
  
  for (i = 0; i < WTABLESIZE; i++) {
    wtable[i] = sin((double) (2*PI * (float)i/WTABLESIZE)) * 32767.0;
  }
  return;
}

short oscil(float si, short wave[], float *phs) {
  int i;
  
  i = *phs;
  *phs += si;
  if (*phs >= WTABLESIZE) *phs -= WTABLESIZE;
  return(wave[i]);
}

void audioAssert(void* bool, char* msg) {
  if (!bool) {
    printf("%s: %s\n", alGetErrorString(oserror()));
    exit(-1);
  }
}

main ()
{
  int len;
  short waveform[WTABLESIZE];
  short sampbuff[BUFSIZE];
  int i, j, k, bufno;
  int active;
  float si[NOSCILS], phase[NOSCILS];
  int res;

  ALconfig cfg; 
  ALport port; 

  /* giving it highest non-degrading priority doesn't help much, really
   * struct sched_param param;
   * 
   * param.sched_priority = 89;
   * res = sched_setscheduler(0, SCHED_FIFO, ¶m);
   * if (res == -1)
   * printf("scheduler: %d\n", oserror());
   */

  /* Create a config. This defaults to stereo, 16-bit integer data */
  cfg = alNewConfig();
  audioAssert(cfg, "Couldn't create ALconfig");
  alSetSampFmt(cfg, AL_SAMPFMT_TWOSCOMP);
  alSetWidth(cfg, AL_SAMPLE_16);
  alSetChannels(cfg, 1);	/* Set to mono */
  alSetQueueSize(cfg, 44100);
  /* sample rate should be set via apanel */

  /* Open the port */
  port = alOpenPort("Oscils", "w", cfg); 
  audioAssert(port, "Couldn't open an audio port");

  alFreeConfig(cfg);		/* discard */

  /* make a wavetable for the oscillator */
  makewave(waveform);

  /* load buffers and write them to the audio port */
  for (i = 0; i < NOSCILS; i++) {
    si[i] = (FREQ + (i*5)) * WTABLESIZE/SR_RATE;
    phase[i] = 0.0;
  }

  bufno = 0;
  active = 1;
  for (i = 0; i < 99999; i++) {

    /* fill a buffer with sound */
    for (k = 0; k < active; k++) {
      
      if (k == 0) {
        for (j = 0; j < BUFSIZE; j++) {
          sampbuff[j]  = oscil(si[k], waveform, &phase[k]) * 1.0/active;
        }
      } else {
        for (j = 0; j < BUFSIZE; j++) {
          sampbuff[j] += oscil(si[k], waveform, &phase[k]) * 1.0/active;
        }
      }

    }
    
    len = alWriteFrames(port, sampbuff, BUFSIZE);
    len = (len >= 0);
    audioAssert((void*)len, "Audio write");

    /* shift to the next buffer */
    if (++bufno > 3) {
      if (++active > NOSCILS)
        active -= 1;
      printf("%d oscillators\n", active);
      bufno = 0;
    }
  }

  /* Close the audio port */
  alClosePort(port);
}


Date1999-05-19 23:10
FromPaul Barton-Davis
SubjectRe: realtime polyphony
>Hehe, I get 90 on my lowly, 7-year old 133 MHz Indy!  Adjusted for
>MHz, that is 304.5 oscillators on the MIPS chip.  Puts the Pentium II
>in perspective, doesn't it?

It certainly does. But more than, it makes me wonder what is going on.
I don't believe that the a PII that has a clock 3.4 times faster than
the Indy can be that much slower. So something here is really wrong. I
doubt that its Linux, since its scheduling performance exceeds that of
most other Unices. It could be the soundcard driver. 

Any other ideas ?

Date1999-05-20 03:17
FromEd Hall
SubjectRe: realtime polyphony
> >Hehe, I get 90 on my lowly, 7-year old 133 MHz Indy!  Adjusted for
> >MHz, that is 304.5 oscillators on the MIPS chip.  Puts the Pentium II
> >in perspective, doesn't it?
> 
> It certainly does. But more than, it makes me wonder what is going on.
> I don't believe that the a PII that has a clock 3.4 times faster than
> the Indy can be that much slower. So something here is really wrong. I
> doubt that its Linux, since its scheduling performance exceeds that of
> most other Unices. It could be the soundcard driver. 

In my experiments, overhead from the soundcard was negligible.  All
it did was force the benchmark to generate samples at 44100/second
until the CPU couldn't keep up (with audible results).  There are
other reasons for the bad performance...

It's a combination of things: for one, the P-II isn't very speedy
converting between integer and floating types.  Other architectures
don't take nearly the hit from the conversion.  Your benchmark does
several of these for each oscillator's sample, of which only one is
necessary (the phase computation).  Also, depending upon compiler
optimizations, you might be performing a lot of unnecessary floating-point
divides as well when you scale the oscillator's output.  Finally, in my
experience GCC sometimes doesn't do as well in floating-point applications
compared to other compilers.  (Ten years ago GCC would routinely trounce
most vendor's compilers; sadly, this is no longer true.)  

As you suggest in an earlier message, Csound indeed does it "smarter;"
in this case by performing all computations, including summing the
oscillators, as single-precision floats, and only converts to 16-byte
integers just prior to output.  This actually results in less distortion
compared to the benchmark as well as better performance.

I've attached a modified benchmark which uses float's for the wavetable.
It runs a bit better than twice as fast on my 333MHz P-II than the
original.  Even so, the P-II is pretty disappointing compared to my
Alpha, which performs twice as well even when results are scaled by
clock speed.  (As you'll see on the Csound benchmark page, the Alpha
doesn't have nearly this much of a lead when running Csound itself.)

(All comparisons used EGCS 1.1.2. with "-O3".)

		-Ed

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TEAR HERE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#include 
#include 
#include 
#include 
#include 

#define BUFSIZE 8192
#define SR_RATE 44100
#define NBUFS 4
#define WTABLESIZE 1000
#define FREQ 278.0
#define NOSCILS 1000
#define PI 3.1415926

void makewave(float wtable[])
{
  int i;

  for(i = 0; i < WTABLESIZE; i++) {
    wtable[i] = sin((double) (2*PI * (float)i/WTABLESIZE)) * 32767.0;
  }
  return;
}

float oscil(float si, float wave[], float *phs)
{
  int i;

  i = *phs;
  *phs += si;
  if(*phs >= WTABLESIZE) *phs -= WTABLESIZE;
  return(wave[i]);
}

main ()
{
  int len,format,stereo,speed,cycle,frag_size;
  int audio_fd;
  int arg;
  float waveform[WTABLESIZE];
  short sampbuff[NBUFS][BUFSIZE];
  float accum[BUFSIZE];
  int i,j,k,bufno;
  int active;
  float scale;
  float si[NOSCILS],phase[NOSCILS];

  /* Open the audio port */
  if ((audio_fd = open("/dev/dsp", O_WRONLY, 0)) == -1) {
    perror("/dev/dsp");
    exit(1);
  }

  /* Set the fragment size */
  arg = 0x777f000d;
  if (ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &arg)==-1) {
    perror("incorrect fragment size");
    exit(1);
  }

  /* Put the audio port in "sync" mode */
  ioctl(audio_fd, SNDCTL_DSP_SYNC, 0);

  /* Set the format for output samples */
  format = AFMT_S16_LE;
  if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format)==-1) {
    perror("SNDCTL_DSP_SETFMT");
    exit(1);
  }

  /* Set stereo / mono (1/0) */
  stereo = 0;
  if (ioctl(audio_fd, SNDCTL_DSP_STEREO, &stereo)==-1) {
    perror("SNDCTL_DSP_STEREO");
    exit(1);
  }

  /* Set sample rate */
  speed = SR_RATE;
  if (ioctl(audio_fd, SNDCTL_DSP_SPEED, &speed)==-1)
    { /* Fatal error */
      perror("SNDCTL_DSP_SPEED");
      exit(1);
    }

  /* Get the size of the audio buffer */
  /* Note that the driver computes this optimally */
  if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &frag_size) == -1) {
    exit(1);
  }
  printf("Audio buffer:  %d\n",frag_size);

  /* make a wavetable for the oscillator */
  makewave(waveform);

  /* load buffers and write them to the audio port */

  for (i = 0; i < NOSCILS; i++) {
    si[i] = (FREQ + (i*5)) * WTABLESIZE/SR_RATE;
    phase[i] = 0.0;
  }

  bufno = 0;
  active = 1;
  scale = 1.0f / (float)active;
  for (i = 0; i < 99999; i++) {

    /* fill a buffer with sound */
    for (k = 0; k < active; k++) {

      if (k == 0) {
        for (j = 0; j < BUFSIZE; j++) {
          accum[j] = oscil(si[k],waveform,&phase[k]) * scale;
        }
      }
      else {
        for (j = 0; j < BUFSIZE; j++) {
          accum[j] += oscil(si[k],waveform,&phase[k]) * scale;
        }
      }

    }

    for (j = 0; j < BUFSIZE; j++) {
      sampbuff[bufno][j] = (short)accum[j];
    }

    if ((len = write(audio_fd, sampbuff[bufno], 2*BUFSIZE)) == -1) {
      perror("audio write");
      exit(1);
    }

    /* shift to the next buffer */
    if (++bufno > 3) {
      if (++active > NOSCILS)
        active -= 1;
      scale = 1.0f / (float)active;
      printf("%d oscillators, daddy-oh!\n",active);
      bufno = 0;
    }
  }

  /* Close the audio port */
  close(audio_fd);
}

Date1999-05-20 04:08
FromEd Hall
SubjectRe: realtime polyphony
I wrote:

> Your benchmark does several [integer/float conversions] for each
> oscillator's sample, of which only one is necessary (the phase
> computation).

This is simply wrong--Csound avoids conversions here by doing phase
accumulation using 32-bit integers.  Preliminary experiments show
that this is an even bigger win than avoiding conversions for audio
samples, as I did in my previous message.

		-Ed

Date1999-05-20 05:00
FromPaul Barton-Davis
SubjectRe: realtime polyphony
>It's a combination of things: for one, the P-II isn't very speedy
>converting between integer and floating types.  Other architectures
>don't take nearly the hit from the conversion.  Your benchmark does

just one clarification: i didn't write this benchmark. i don't know
who did.

>I've attached a modified benchmark which uses float's for the wavetable.
>It runs a bit better than twice as fast on my 333MHz P-II than the
>original.  Even so, the P-II is pretty disappointing compared to my
>Alpha, which performs twice as well even when results are scaled by
>clock speed.  (As you'll see on the Csound benchmark page, the Alpha
>doesn't have nearly this much of a lead when running Csound itself.)

Thanks for the very helpful message, and the factor of 2 speedup
(confirmed here). I have 90% of pgcc here - it would be interesting to
try this out and see if it does any better on the FP performance than
egcs. (i believe that egcs doesn not have the pgcc
optimizations, is this true ?)

I had no idea that the float->int conversion was so expensive on the
Pentium. A very good thing to keep in mind ...

Date1999-05-20 05:32
FromEd Hall
SubjectRe: realtime polyphony
The score for a 333MHz P-II:

   Original benchmark:        49 oscillators
   With float wavetable:     104 oscillators
   And integer phase accum:  565 oscillators

Note that I extended the table to 1024 entries when I changed to
the integer phase accumulator.  Also: the Alpha loses its advantage
on this third version.

The modified benchmark is attached.

		-Ed

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TEAR HERE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#include 
#include 
#include 
#include 
#include 

#define BUFSIZE 8192
#define SR_RATE 44100
#define NBUFS 4
#define WTABLESIZE 1024
#define WTABLE2PWR   10
#define UINTBITS     32
#define FREQ 278.0
#define NOSCILS 1000
#define PI 3.1415926

void makewave(float wtable[])
{
  int i;

  for(i = 0; i < WTABLESIZE; i++) {
    wtable[i] = sin((double) (2*PI * (float)i/WTABLESIZE)) * 32767.0;
  }
  return;
}

float oscil(unsigned int si, float wave[], unsigned int *phs)
{
  int i;

  i = (*phs >> (UINTBITS - WTABLE2PWR));
  *phs += si;
  return(wave[i]);
}

main ()
{
  int len,format,stereo,speed,cycle,frag_size;
  int audio_fd;
  int arg;
  float waveform[WTABLESIZE];
  short sampbuff[NBUFS][BUFSIZE];
  float accum[BUFSIZE];
  int i,j,k,bufno;
  int active;
  float ampscale;
  double phasescale;
  unsigned int si[NOSCILS],phase[NOSCILS];

  /* Open the audio port */
  if ((audio_fd = open("/dev/dsp", O_WRONLY, 0)) == -1) {
    perror("/dev/dsp");
    exit(1);
  }

  /* Set the fragment size */
  arg = 0x777f000d;
  if (ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &arg)==-1) {
    perror("incorrect fragment size");
    exit(1);
  }

  /* Put the audio port in "sync" mode */
  ioctl(audio_fd, SNDCTL_DSP_SYNC, 0);

  /* Set the format for output samples */
  format = AFMT_S16_LE;
  if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format)==-1) {
    perror("SNDCTL_DSP_SETFMT");
    exit(1);
  }

  /* Set stereo / mono (1/0) */
  stereo = 0;
  if (ioctl(audio_fd, SNDCTL_DSP_STEREO, &stereo)==-1) {
    perror("SNDCTL_DSP_STEREO");
    exit(1);
  }

  /* Set sample rate */
  speed = SR_RATE;
  if (ioctl(audio_fd, SNDCTL_DSP_SPEED, &speed)==-1)
    { /* Fatal error */
      perror("SNDCTL_DSP_SPEED");
      exit(1);
    }

  /* Get the size of the audio buffer */
  /* Note that the driver computes this optimally */
  if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &frag_size) == -1) {
    exit(1);
  }
  printf("Audio buffer:  %d\n",frag_size);

  /* make a wavetable for the oscillator */
  makewave(waveform);

  /* load buffers and write them to the audio port */

  phasescale = (1 << (UINTBITS - WTABLE2PWR)) * (double)WTABLESIZE/SR_RATE;
  for (i = 0; i < NOSCILS; i++) {
    si[i] = (FREQ + (i*5)) * phasescale;
    phase[i] = 0;
  }

  bufno = 0;
  active = 1;
  ampscale = 1.0f / (float)active;
  for (i = 0; i < 99999; i++) {

    /* fill a buffer with sound */
    for (k = 0; k < active; k++) {

      if (k == 0) {
        for (j = 0; j < BUFSIZE; j++) {
          accum[j] = oscil(si[k],waveform,&phase[k]) * ampscale;
        }
      }
      else {
        for (j = 0; j < BUFSIZE; j++) {
          accum[j] += oscil(si[k],waveform,&phase[k]) * ampscale;
        }
      }

    }

    for (j = 0; j < BUFSIZE; j++) {
      sampbuff[bufno][j] = (short)accum[j];
    }

    if ((len = write(audio_fd, sampbuff[bufno], 2*BUFSIZE)) == -1) {
      perror("audio write");
      exit(1);
    }

    /* shift to the next buffer */
    if (++bufno > 3) {
      if (++active > NOSCILS)
        active -= 1;
      ampscale = 1.0f / (float)active;
      printf("%d oscillators, daddy-oh!\n",active);
      bufno = 0;
    }
  }

  /* Close the audio port */
  close(audio_fd);
}

Date1999-05-20 05:42
FromPaul Barton-Davis
SubjectRe: realtime polyphony
>The score for a 333MHz P-II:
>
>   Original benchmark:        49 oscillators
>   With float wavetable:     104 oscillators
>   And integer phase accum:  565 oscillators

Yowsa! On a 450Mhz P-II, with -O3 -funroll-loops: 798 oscillators (daddy-oh!)

Thanks Ed. Nice demonstration of how the little details sometimes
matter a lot.

--p


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa27189;
          24 May 99 14:23 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10luh3-000720-00
	for jpff@maths.bath.ac.uk; Mon, 24 May 1999 14:23:01 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (OAA09265); Mon, 24 May 1999 14:17:59 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 24 May 1999 14:17:44 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via ESMTP (OAA15329); Mon, 24 May 1999 14:17:43 +0100 (BST)
Received: from [138.38.97.36] (helo=maths.Bath.AC.UK ident=mmdf)
	by wallace.maths.bath.ac.uk with smtp (Exim 2.12 #1)
	id 10lubu-00071g-00
	for csound@maths.ex.ac.uk; Mon, 24 May 1999 14:17:42 +0100
From: jpff@maths.bath.ac.uk
To: csound@maths.ex.ac.uk
Subject: [dkeller@sfu.ca: [Csound] CD release]
Date: Mon, 24 May 99 14:17:40 BST
Source-Info:  From (or Sender) name not authenticated.
Message-Id: 
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

From: John Oliver 

The enhanced CD Touch 'n' Go features the electro-acoustic music of
Argentinian composer Damin Keller. Damin's music is based on
"ecological sound models" that he's been developing in CSound over the
past two years. The music is gesturally intense and spacially
sophisticated.

The enhanced portion of the CD includes text, sound examples and
most of the CSound code that was used to create the sounds on the CD.
This extra content is accessible on Mac or PC with Netscape Navigator in
most any CDROM drive.

The CD is available from:

earsay productions
#308 - 720 Sixth Street,
New Westminster, BC
CANADA  V3L 3C5

http://earsay.com/Pages/sections/soundshop/soundshop.html

John and Andrew
earsay productions
info@earsay.com
http://earsay.com


Received: from xenakis.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa27204;
          24 May 99 14:28 BST
From: jpff@maths.bath.ac.uk
To: robertjunior@usa.net
CC: ada@skyenet.net, csound@maths.ex.ac.uk
In-reply-to: <19990521222347.1070.qmail@www0h.netaddress.usa.net> (message
	from Sherlock on 21 May 99 22:23:46 America/Fort_Wayne)
Subject: Re: [Re: Re; Winsound 3.54 for PC prob?]
BCC: jpff@maths.bath.ac.uk
References:  <19990521222347.1070.qmail@www0h.netaddress.usa.net>
Date: Mon, 24 May 99 14:28:00 BST
Sender: jpff@maths.bath.ac.uk
Source-Info:  From (or Sender) name not authenticated.

>>>>> "Sherlock" == Sherlock   writes:

 Sherlock> Here goes. Try starting Winsound from the directory from which you put it,
 Sherlock> rather than any other directory. John, as nice as this is, could you fix it so
 Sherlock> we can use Winsound from our DATA directory?

What do you mean by your DATA directory?
==John


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa27224;
          24 May 99 14:33 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10lurF-00072P-00
	for jpff@maths.bath.ac.uk; Mon, 24 May 1999 14:33:33 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (OAA10949); Mon, 24 May 1999 14:28:23 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 24 May 1999 14:28:09 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via ESMTP (OAA12967); Mon, 24 May 1999 14:28:08 +0100 (BST)
Received: from [138.38.97.36] (helo=maths.Bath.AC.UK ident=mmdf)
	by wallace.maths.bath.ac.uk with smtp (Exim 2.12 #1)
	id 10lulw-000727-00; Mon, 24 May 1999 14:28:04 +0100
From: jpff@maths.bath.ac.uk
To: robertjunior@usa.net
CC: ada@skyenet.net, csound@maths.ex.ac.uk
In-reply-to: <19990521222347.1070.qmail@www0h.netaddress.usa.net> (message
	from Sherlock on 21 May 99 22:23:46 America/Fort_Wayne)
Subject: Re: [Re: Re; Winsound 3.54 for PC prob?]
References:  <19990521222347.1070.qmail@www0h.netaddress.usa.net>
Date: Mon, 24 May 99 14:28:00 BST
Source-Info:  From (or Sender) name not authenticated.
Message-Id: 
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

>>>>> "Sherlock" == Sherlock   writes:

 Sherlock> Here goes. Try starting Winsound from the directory from which you put it,
 Sherlock> rather than any other directory. John, as nice as this is, could you fix it so
 Sherlock> we can use Winsound from our DATA directory?

What do you mean by your DATA directory?
==John


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa27693;
          24 May 99 17:07 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10lxFn-0007AM-00
	for jpff@maths.bath.ac.uk; Mon, 24 May 1999 17:07:03 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (RAA14134); Mon, 24 May 1999 17:03:35 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 24 May 1999 17:03:23 +0100
Received: from sparticus.bright.net [205.212.123.5] by hermes via ESMTP (RAA10009); Mon, 24 May 1999 17:03:20 +0100 (BST)
Received: from bright.net (find3-cs-16.dial.bright.net [209.143.26.51])
	by sparticus.bright.net (8.9.3/8.9.3 ComNet Build) with ESMTP id MAA02690;
	Mon, 24 May 1999 12:03:16 -0400 (EDT)
Message-ID: <37497B18.DD988A60@bright.net>
Date: Mon, 24 May 1999 12:15:20 -0400
From: Dave Phillips 
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.0.36 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound Mail 
Subject: Csound page updated
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Greetings:

  I have recently updated my Csound For Linux page. The page lists URLs
for documentation/description, instrument collections, on-line music,
impulse response files, and other items of interest for all Csound users
(not just Linuxen).

  Have at it...

== Dave Phillips

       http://www.bright.net/~dlphilp/index.html
   http://sunsite.univie.ac.at/Linux-soundapp/linux_soundapps.html


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa28012;
          24 May 99 19:10 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10lzBD-0001s4-00
	for jpff@maths.bath.ac.uk; Mon, 24 May 1999 19:10:27 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (TAA03553); Mon, 24 May 1999 19:08:08 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 24 May 1999 19:07:56 +0100
Received: from dns2.seanet.com [199.181.164.2] by hermes via ESMTP (TAA02644); Mon, 24 May 1999 19:07:54 +0100 (BST)
Received: from seanet.com (costello.seanet.com [204.182.65.218]) by mx.seanet.com (8.9.3/Seanet-8.7.3) with ESMTP id LAA06821; Mon, 24 May 1999 11:07:47 -0700 (PDT)
Message-ID: <3749946E.5A477EFC@seanet.com>
Date: Mon, 24 May 1999 11:03:26 -0700
From: Sean Costello 
X-Mailer: Mozilla 4.51 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: CSOUND 
Subject: Using mode 2 on reson
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi all:

Can anyone post a quick orchestra that uses scaling mode 2 with reson? I am
working on some new reson filters, and I have never used mode 2 before, so I
don't know whether or not it is working in my new filters. 

Thanks,

Sean Costello


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa28774;
          25 May 99 1:23 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10m50c-00020a-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 01:23:54 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (BAA15939); Tue, 25 May 1999 01:21:43 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 01:21:32 +0100
Received: from mail4.lig.bellsouth.net [205.152.0.32] by hermes via ESMTP (BAA06218); Tue, 25 May 1999 01:21:30 +0100 (BST)
Received: from bellsouth.net (host-216-76-185-51.gnv.bellsouth.net [216.76.185.51])
	by mail4.lig.bellsouth.net (8.8.8-spamdog/8.8.5) with ESMTP id UAA27971
	for ; Mon, 24 May 1999 20:08:11 -0400 (EDT)
Message-ID: <3749ED1E.CA1E9419@bellsouth.net>
Date: Mon, 24 May 1999 20:21:50 -0400
From: Patrick Pagano 
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound List 
Subject: t statements
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

hi folks
how do i properly use a t statement
I seem to have no trouble assigning one say    t 0 120
but say I want the notes beginning at second 10 to be t 10 30
do i need to put a comma or successive lines?
Pat



Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa28827;
          25 May 99 1:48 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10m5OM-00020u-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 01:48:26 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (BAA08602); Tue, 25 May 1999 01:46:04 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 01:45:54 +0100
Received: from neptune.lyrick.com [38.227.100.46] by hermes via ESMTP (BAA15411); Tue, 25 May 1999 01:45:53 +0100 (BST)
Received: by neptune.lyrick.com with Internet Mail Service (5.5.2448.0)
	id ; Mon, 24 May 1999 19:45:46 -0500
Message-ID: <283AABB8FD0DD21187C200A0C995F5DEECAF9F@neptune.lyrick.com>
From: David Boothe 
To: 'Csound' 
Subject: 3.54 pdf manual
Date: Mon, 24 May 1999 19:45:36 -0500
X-Mailer: Internet Mail Service (5.5.2448.0)
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Version 3.54 of the Csound Manual in Acrobat (pdf) format is now available
for download at

http://web2.airmail.net/dboothe

It is available as either a full manual (files for double- and single-sided
printing) or as updated pages only.

Apologies for the delay. After upgrading my hardware and operating system, a
certain amount of "reconstructive surgery" was required on the source files,
to get the graphics to print.

Happy Csounding.

-David.



Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa28842;
          25 May 99 1:54 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10m5UM-000212-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 01:54:38 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (BAA18197); Tue, 25 May 1999 01:52:24 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 01:52:13 +0100
Received: from root@big.fishnet.net [204.89.144.3] by hermes via ESMTP (BAA06143); Tue, 25 May 1999 01:52:12 +0100 (BST)
Received: from rcsreg.com (x219.core.fishnet.net [204.89.144.219])
	by big.fishnet.net (8.9.2/8.8.5) with ESMTP id QAA21486;
	Mon, 24 May 1999 16:59:19 -0700 (PDT)
Message-ID: <3749F56E.489D776E@rcsreg.com>
Date: Mon, 24 May 1999 17:57:18 -0700
From: Tobiah 
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.5 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Patrick Pagano 
CC: Csound List 
Subject: Re: t statements
References: <3749ED1E.CA1E9419@bellsouth.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

T STATEMENT (TEMPO STATEMENT) 

     t  p1  p2  p3  p4  .....  (unlimited) 

This statement sets the tempo and specifies the accelerations and
decelerations for the current section.  This is done by
converting beats into seconds.  


PFIELDS

     p1             must be zero 
     p2             initial tempo in beats per minute 
     p3, p5, p7, ...     times in beats (in non-decreasing order) 
     p4, p6, p8, ...     tempi for the referenced beat times 


SPECIAL CONSIDERATIONS 

Time and Tempo-for-that-time are given as ordered couples that
define points on a "tempo vs time" graph.  (The time-axis here is
in beats so is not necessarily linear.) The beat-rate of a
Section can be thought of as a movement from point to point on
that graph: motion between two points of equal height signifies
constant tempo, while motion between two points of unequal height
will cause an accelarando or ritardando accordingly.  The graph
can contain discontinuities: two points given equal times but
different tempi will cause an immediate tempo change.  

Motion between different tempos over non-zero time is inverse
linear.  That is, an accelerando between two tempos M1 and M2
proceeds by linear interpolation of the single-beat durations
from 60/M1 to 60/M2.

The first tempo given must be for beat 0.

A tempo, once assigned, will remain in effect from that
time-point unless influenced by a succeeding tempo, i.e.  the
last specified tempo will be held to the end of the section.

A t statement applies only to the score section in which it
appears.  Only one t statement is meaningful in a section; it can
be placed anywhere within that section.  If a score section
contains no t statement, then beats are interpreted as seconds
(i.e. with an implicit t 0 60 statement).

N.B.  If the csound command includes a -t flag, the interpreted
tempo of all score t statements will be overridden by the
command-line tempo.


Patrick Pagano wrote:
> 
> hi folks
> how do i properly use a t statement
> I seem to have no trouble assigning one say    t 0 120
> but say I want the notes beginning at second 10 to be t 10 30
> do i need to put a comma or successive lines?
> Pat


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa29118;
          25 May 99 3:40 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10m79E-0007T5-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 03:40:56 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (DAA12253); Tue, 25 May 1999 03:38:00 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 03:37:49 +0100
Received: from icarus.idirect.com [207.136.80.7] by hermes via ESMTP (DAA02253); Tue, 25 May 1999 03:37:48 +0100 (BST)
Received: from orion.idirect.com (orion.idirect.com [207.136.80.167])
	by icarus.idirect.com (8.9.3/8.9.3) with ESMTP id WAA04602
	for ; Mon, 24 May 1999 22:37:47 -0400 (EDT)
Received: from idirect.com (ts7-62t-15.idirect.com [209.161.247.206])
	by orion.idirect.com (8.9.3/8.9.3) with ESMTP id WAA37817
	for ; Mon, 24 May 1999 22:37:45 -0400 (EDT)
Message-ID: <374A0DA7.218233B6@idirect.com>
Date: Mon, 24 May 1999 22:40:39 -0400
From: Stan Olejarz 
X-Mailer: Mozilla 4.06 [en] (Win98; I)
MIME-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: newbie ?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

How much of a C programmer do you have to be to become proficient at
cSound?


Stan Olejarz
Toronto,Canada



Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa29176;
          25 May 99 4:11 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10m7d0-0007Uc-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 04:11:42 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (EAA15203); Tue, 25 May 1999 04:09:23 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 04:09:12 +0100
Received: from goose.prod.itd.earthlink.net [207.217.120.18] by hermes via ESMTP (EAA14730); Tue, 25 May 1999 04:09:10 +0100 (BST)
Received: from default (1Cust224.tnt3.fort-wayne.in.da.uu.net [208.253.158.224])
	by goose.prod.itd.earthlink.net (8.9.3/8.9.3) with SMTP id UAA04404
	for ; Mon, 24 May 1999 20:09:06 -0700 (PDT)
Message-ID: <003801bea65b$ccd505a0$e09efdd0@default>
From: Michael Rhoades 
To: Csound List 
Subject: New to list
Date: Mon, 24 May 1999 22:07:56 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2014.211
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hello All,

    I am new to the Csound mailing list and as suggested in the welcome
message I am introducing myself. My name is Michael Rhoades. I have been
composing in obscurity for about 15 years. Since my high school days, in the
mid seventies, I have envisioned the compositional versatility afforded by
Csound. I am not a member of academia although I have been studying
synthesis, composition and creativity, diligently, on my own for the past 25
years. I live in the Fort Wayne Indiana area where electronic,
electroaccoustic or computer music is unheard of. Being isolated from other
"new" music thinkers for so long, I am really happy to find a platform, of
such, in which to participate.
    I use the Windows NT os on a dual 350mhz machine with 128 meg of ram and
several gigs of ultra wide scsi harddrives. Soundcard wise I use a Card D+
with digital I/O and a Soundblaster PC128. For midi a Winnman 4 x 4. I work
with Cakewalk Pro Audio for digital multi tracking and midi, Sound Forge and
Cool Edit for mastering and Red Roaster 24 bit for CD burning.
    I have been working with Csound for about 6 months now and am starting
to understand how to work with it although it is a slow process. Excerpts
from my first Csound composition are posted on the top of the first page of
my web site if you are interested. The composition is titled "Energies at
Work". Basic, but it is a start. Any comments on any aspect are welcomed.
The URL is http://www.innerlightpub.com/rhoadsmith.
    One question I have is, using Winsound, can one compile in real time?

Sorry for the length of this. Thanks for your time and I am happy to be
here.

Michael Rhoades



Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa00059;
          25 May 99 12:38 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10mFXg-0007mu-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 12:38:44 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (MAA07383); Tue, 25 May 1999 12:33:45 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 12:33:32 +0100
Received: from smtp3.mindspring.com [207.69.200.33] by hermes via ESMTP (MAA05390); Tue, 25 May 1999 12:33:29 +0100 (BST)
Received: from Realizer (user-2ive2is.dialup.mindspring.com [165.247.10.92])
	by smtp3.mindspring.com (8.8.5/8.8.5) with SMTP id HAA08912;
	Tue, 25 May 1999 07:33:22 -0400 (EDT)
Message-ID: <001801bea6a2$9eb61b40$79d496c0@Realizer.ngt.sungard.com>
From: Michael Gogins 
To: Stan Olejarz , csound@maths.ex.ac.uk
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
Subject: Re: newbie ?
Date: Tue, 25 May 1999 07:34:56 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

You need to be proficient in C only if you want to monkey with the innards
of Csound, which is written in C, or if you want to use C to automatically
generate scores for Csound (instead of just using MIDI sequences or
something).

If you want to make music with Csound you can either use one of the
thousands of freely available instrument definitions on the Web; otherwise,
you need to become proficient in the Csound orchestra language, which is not
at all difficult as a language but is difficult in the sense that you won't
make any interesting sounds unless you either understand signal processing
or have the patience of Job.

-----Original Message-----
From: Stan Olejarz 
To: csound@maths.ex.ac.uk 
Date: Monday, May 24, 1999 10:47 PM
Subject: newbie ?


>How much of a C programmer do you have to be to become proficient at
>cSound?
>
>
>Stan Olejarz
>Toronto,Canada
>



Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa00125;
          25 May 99 13:00 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10mFsL-0002HK-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 13:00:05 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (MAA07069); Tue, 25 May 1999 12:56:30 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 12:56:15 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via ESMTP (MAA03161); Tue, 25 May 1999 12:56:14 +0100 (BST)
Received: from [138.38.97.36] (helo=maths.Bath.AC.UK ident=mmdf)
	by wallace.maths.bath.ac.uk with smtp (Exim 2.12 #1)
	id 10mFob-0007nv-00
	for csound@maths.ex.ac.uk; Tue, 25 May 1999 12:56:13 +0100
Date:     Tue, 25 May 99 12:56:13 BST
From: jpff@maths.bath.ac.uk
Subject:  Re: MIDI Files (retry)
To: csound@maths.ex.ac.uk
Message-Id: 
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Message written at 27 May 1999 12:09:03 +0100
--- Copy of mail to tkunze@ccrma.stanford.edu ---

Reading the code in midirecv.c and my limited knowledge of MIDI i
think a 0xC. message will go to teh code on line 1411 which is
described as "other status types".  There the channel is taken off and
stored and the type of 0xC0 is remembered. 

In m_chanmsg the PROGRAM_TYPE mesage is handled, and one chould get a
"midi channel %d now using instr %d" message.

My question is; what is not happening with should happen?

==John ffitch


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa00131;
          25 May 99 13:00 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10mFsh-0007o4-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 13:00:27 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (MAA08230); Tue, 25 May 1999 12:56:23 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 12:56:05 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via ESMTP (MAA03071); Tue, 25 May 1999 12:56:05 +0100 (BST)
Received: from [138.38.97.36] (helo=maths.Bath.AC.UK ident=mmdf)
	by wallace.maths.bath.ac.uk with smtp (Exim 2.12 #1)
	id 10mFoR-0007nn-00
	for csound@maths.ex.ac.uk; Tue, 25 May 1999 12:56:03 +0100
Date:     Tue, 25 May 99 12:56:02 BST
From: jpff@maths.bath.ac.uk
Subject:  OT: Question for Mac users
To: csound@maths.ex.ac.uk
Message-Id: 
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Message written at 27 May 1999 09:47:20 +0100

I have been attempting to find out some simple information about the
Mac, which has illuded me.  Then I thought of all you musical types
who use Macintosh computers, one of whom ought to know the answer.  
Yes this is off topic, as i need to know this for non-Csound reasons.

What is the Creator signature for PDF files?  I had thought that
Adobe's web site might answer that, but no it does not.  I could not
find a acroread mac-binary which was transferrable to my Mac, so I
need help.

A related question is what about PostScript files?  Do they have a
creator signature?  Is there a Mac ps viewer anyway?  

Please e-mail me with any help.  
==John ffitch


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa00138;
          25 May 99 13:02 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10mFuZ-0007oF-00
	for jpff@maths.bath.ac.uk; Tue, 25 May 1999 13:02:23 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (MAA10344); Tue, 25 May 1999 12:58:36 +0100 (BST)
From: f1f0@m9ndfukc.com
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 25 May 1999 12:58:25 +0100
Received: from anago.wwa.com [198.49.174.54] by hermes via SMTP (MAA07965); Tue, 25 May 1999 12:58:23 +0100 (BST)
Received: from [207.241.63.30](really [207.241.63.30]) by anago.wwa.com
	via sendmail with smtp
	id 
	for ; Tue, 25 May 1999 06:57:55 -0500 (CDT)
	(Smail-3.2 1996-Jul-4 #88 built 1997-Nov-30)
Message-Id: 
X-Sender: f1f0@m9ndfukc.com (Unverified)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Tue, 25 May 1999 06:58:34 -0600
To: csound@maths.ex.ac.uk
Subject: Re: newbie ?
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


>If you want to make music with Csound you can either use one of the
>thousands of freely available instrument definitions on the Web; otherwise,
>you need to become proficient in the Csound orchestra language, which is not
>at all difficult as a language but is difficult in the sense that you won't
>make any interesting sounds unless you either understand signal processing
>or have the patience of Job.


abov = z!m!lr 2 dze protokol b! wh!ch kolor perzepz!on operatez


Date1999-05-20 05:55
FromEd Hall
SubjectRe: realtime polyphony
> I have 90% of pgcc here - it would be interesting to
> try this out and see if it does any better on the FP performance than
> egcs. (i believe that egcs doesn not have the pgcc
> optimizations, is this true ?)

EGCS has some of the PGCC optimizations--the ones that were safe to
add without endangering its reliability or performance on other
architectures.  I've found that PGCC is really only a clear win on
the original Pentium; the Pentium II smoothed out a lot of the chip's
scheduling quirks, such that PGCC doesn't have quite as much to
work with.  I got a few percent improvement with PGCC 1.1 (used to
compiled Csound for the benchmark numbers I submitted to the Csound
benchmark page), but I since discovered that some Csound operators
(specifically, the a?b:c trinary operator) failed to function properly
when compiled with PGCC, so I don't use PGCC for Csound any more.

Anyhow, it's interesting to note that Csound uses the very techniques
that sped it up this little benchmark program over an order of magnitude.
Whether by chance or design, 20-year-old implementation choices still seem
to be the right ones from a performance perspective.

		-Ed