Subject: MAX Digest - 31 Jul 1998
Date: Sat, 1 Aug 1998 00:00:00 -0400
From: Automatic digest processor 
Reply-To: MAX - Interactive Music/Multimedia Standard Environments
To: Recipients of MAX digests 

There are 6 messages totalling 249 lines in this issue.

Topics of the day:

  1. random object (again)
  2. ftp site for Max
  3. getting the tempo from a smf
  4. joysticks
  5. Sound Card performances for use with MSP?
  6. IRCAM FTP & other stuff

Email to MAX should now be sent to
LISTSERV commands should be sent to
Information is available on the WEB at


Date:    Fri, 31 Jul 1998 22:12:07 +0200
From:    Peter Castine 
Subject: Re: random object (again)

On Thu, 30 Jul 1998 17:45:49 +0200 Sukandar Kartadinata  wrote:
>I was wondering if there's an alternative object to 'random' which seems to
>"lump" repetitions for low numbers of choices. For a long series of random
>numbers the average amount of repetition is as it should be, however on a
>small scale that's not the case - I often get the same number 5 times in a
>row, then 30 numbers w/o any repetition.

I would be interested in more specifics of the distribution. Note that if
you only ask random to give you values in the range of, say, [0..4], you
_will_ get lots of strings of repeated numbers. The odds of getting _no_
repetitions in a run of thirty bangs to random is approximately 800:1
against! The odds of getting a string of five consecutive results in the
entire run is perhaps not as low as you might think. However, the
probability for this _is_ on the low side--I think around 5% (but my
calculation may be flawed). As a comparison, take a die and throw it 30
times (ignoring the sixes) and see how many runs you get. You may be

One well-documented limitation of the linear congruence algorithm
commonly used for generating a uniform distribution (and that constantly
trips up the novice) is the fact that the low-order bits are "less
random" than the high-order bits. The typical novice mistake is trying to
emulate tossing a coin with something like the following (in C):

     int BadTossCoin()
          return rand() & 0x01;

This will probably return a sequence of nothing but "heads" (and the Mac
Toolbox _Random won't do much better). What will give you pretty decent
results is:

     int BetterTossCoin()
          return rand() > RAND_MAX / 2;

Neither the C stdlib rand() nor the Mac Toolbox Random (nor Max' random
external, which I'm pretty sure just calls one of these linear congruence
implementations) is a random number generator a serious statistician
could love. For heavy-duty random numbers, you need something like Ultra
(TTBOMK not implemented anywhere as a Max external). Still, random is
good enough for most people's needs, if used properly.

For a bunch of (if I say so myself) quite solid examples of how to use
random, may I plug the Litter Package? It's a collection of almost two
dozen different random number distributions implemented as patchers, with
docs, .help patchers, and a little patcher to collect statistics on what
sort of distribution you're getting. Available at your favorite Max FTP



---------------- ----------------
Dr. Peter Castine              | Anyone attempting to generate random      | numbers using a deterministic method is
                               | in a state of sin.   -- John von Neuman


Date:    Fri, 31 Jul 1998 14:47:32 -0700
From:    Ken Kinard 
Subject: ftp site for Max

Could someone please tell me the address of any ftp sites for Max
objects and/or patches?



Date:    Fri, 31 Jul 1998 14:48:53 -0700
From:    Ken Kinard 
Subject: getting the tempo from a smf

Does anyone know of a Max object that can read the tempo (in beats per
minute) of a Standard MIDI File (smf)? I'm looking for such an object.




Date:    Sat, 1 Aug 1998 09:51:47 +1000
From:    overlobe@OZEMAIL.COM.AU
Subject: Re: joysticks

I think that Microsoft...
developed a joystick that uses midi to communicate through a pc soundcard..

it seems to me that these could be hacked quite easily. and I bet they have
lots of buttons too.
although ive never seen one -)


Date:    Sat, 1 Aug 1998 02:31:58 +0100
From:    Todor Todoroff 
Subject: Re: Sound Card performances for use with MSP?

Hi David,
Thanks a lot for the detailed answers. I would be gratefull if you could
answer those last questions on the subject.
If I understand right, the best card regarding to latency is still the KORG
1212I/O (Eric Daubresse from IRCAM told me that the latency was 23 ms). But
the latency would rise with the number of buffers used. Does that mean that
with 4 or 8 I/O channels latency would be as high as the Sonorus (+/- 47
ms)? I ask this
because I definately plan to use multichannel sounds a lot.

Is it still so that the Digidesign d24 card is, due to the availiable
drivers, unable to perform both input and input at the same time?

I already phoned Korg importer about the maximum numbers of bits per sample
on the ADAT connection. They couldn't answer but told me they would phone me
back when they have an answer. I hoped you might have some knowledge not
availiable on the web, like do you receive and/or send more than 16 bits
from/to the card?
So it seems that the best availiable sound quality (with simultaneous input
and output) is offered by Sonorus. Can you confirm this?

Sorry to bother you, but those questions are really important for me.

>Date:    Thu, 30 Jul 1998 23:12:03 -0700
>From:    David Zicarelli 
>Subject: Re: Sound Card performances for use with MSP?
>>I'm looking for a sound card to use with MSP. Reading the manual, I
>>lack some information to guide my choice. I am hesitating between
>>Sonorus STUDI/O and Korg 1212I/O.
>>1. CPU USE: Writing about the Lucid PCI24, it states that about
>>25% of the CPU power is used for I/O on a typical machine.
>>Q? is that amount the same for every card under the same circumstances
>>(like same sampling rate, same amount of bits and same number of
>No, and that's why we said something about it. The Korg and Sonorus
>cards have an overhead of about 10% - 14% when compared to the
>Sound Manager for two channels of I/O. Four channels of I/O is
>about 20% of the CPU with the Sonorus card, for another data
>point that will probably not be enough information for the ever
>inquisitive audience for fun facts about audio cards.
>>Q? Is the percentage of CPU use directly proportional to the number
>>of bits per sample or is it mainly dependent on the driver software?
>>In Sonorus developpers notes on the web, 24 bits mode requires double
>>the PCI bandwidth compared to the 16 bits mode; but I'm not sure
>>this can be directly related to CPU use; by the way, does cycling
>>support the two modes? it is not stated in the manual.
>The Sonorus card can do either 16-bit int or 32-bit float transfers.
>I recently changed MSP to use the latter on the company's recommendation
>due to the fact that there is a bug in the DSP chip they use with
>16-bit transfers and the float-to-int conversion can be done
>more efficiently if they do it than if MSP does it before
>transferring the samples. Plus it should sound better on better
>hardware. However, both versions of the Sonorus driver are
>available for the truly anal. I didn't notice a huge difference
>in CPU usage with 16- versus float transfers.
>>2. LATENCY: It's stated that Korg 1212I/O has the lowest latency with 512
>>sample buffers. Is latency for hardware cards only dependent on I/O
>>buffer size?
>It's dependent on I/O buffer size and the number of I/O buffers
>in use between the computer and the real world. The Korg actually
>lets you, if you're sneaky, control the number of buffers you use
>from 2 to 8. This is supported in the new Korg MSP driver.
>>Q? Are there other supported cards which have the same or a lower
>>latency since the manual was written (I saw on the web that the
>>sonorus driver for Mac was updated 06/24/98)?
>The Sonorus driver's latency is independent of the I/O vector
>'s 2092 samples (~ 47 ms).
>In the new version of MSP there is a cute little patch that
>Les Stuck and I wrote that lets you automatically determine the
>latency of your system. That's what I used to determine the
>above result.
>>Q? What cards currently supported allow for more than 16 bits transfer?
>Digidesign d24, Lucid PCI24, Sonorus StudI/O. Not the Korg 1212 I/O.
>>Q? Is the ADAT optical link of the Korg 1212I/O capable of 24 bits,
>>like the Sonorus STUDI/O?
>Ask Korg.
>David Z.


Date:    Fri, 31 Jul 1998 22:53:13 -0400
From:    Tommy DOG 
Subject: IRCAM FTP & other stuff

Dear Uncle Max,
Has anyone been able to access the IRCAM FTP site?
I've been trying to get on since I saw the post on the FAT RAND.
I've used one version and must look at this one, RAND after all is my
favorite none stock MAX/MSP item....
This is the Gary Lee Nelson item but updated.... Correct?
PS The Max Resource Guide will be updated soon (Lord knows it's about time).
PPS Anyone want to post about JMAX?
It's almost time to renew my vows of silence to IRCAM and I'm concidering
changing areas.

"Death To The Dumb, Curses Upon The Heads Of The Weird"
    Tommy DOG: Music Brut via humans and machines


End of MAX Digest - 31 Jul 1998