Subject: MAX Digest - 5 May 1999 to 6 May 1999 (#1999-138)
Date: Fri, 7 May 1999 00:00:00 -0400
From: Automatic digest processor 
Reply-To: MAX - Interactive Music/Multimedia Standard Environments
     
To: Recipients of MAX digests 

There are 13 messages totalling 471 lines in this issue.

Topics of the day:

  1. usb midi interfaces
  2. USB serial interface that claims to work with MIDI
  3. looking for a reeeeeally fast metro
  4. Oops: Re: USB serial interface that claims to work with MIDI
  5. FSR/AtoMIC
  6. Getting rid of floats?
  7. floats vs ints (5)
  8. XG-MIDI-Tools1.0
  9. symbals/floats and the electronic compass

----------------------------------------------------------------------

Date:    Wed, 5 May 1999 21:42:13 -0700
From:    Alex Stahl 
Subject: Re: usb midi interfaces

>        has anyone actually used any of the usb midi interfaces that were
>just released?

Was one truly released with working Mac drivers? I am told that none of
them actually work yet due to an issue with MacOS 8.5/8.5.1 USB support,
which may or may not be fixed in the soon or not so soon to be released
MacOS 8.6.

------------------------------

Date:    Wed, 5 May 1999 22:21:59 -0700
From:    Alex Stahl 
Subject: Re: USB serial interface that claims to work with MIDI

At 10:55 AM +1100 5/6/99, Jim Franklin wrote:
>The "Stealth" serial port, by GeeThree.com (www.gee3.com) _claims_ to work
>with Opcode MIDI interfaces; the website includes a nice pic of OMS
>registering that it has an interface on the "modem port", the implication
>being that it works. Haven't tried it yet, although I'm going to have to
>soon, to cope with a few blue G3s my uni has got "stuck" with (having
>ordered old models...)
>
>If anyone tries one of these, please let me as well as everyone else know -
>privately if you wish (j.franklin@uws.edu.au).

Ironically, even though the manufacturer is just a 30 minute drive from me
and apparently around the world from you, you can test their claim sooner
than I can. They are only shipping to countries outside the USA. Perhaps
the FCC is too overwhelmed by digital television to bother approving any
more computer peripherals right now.

In any case, the Stealth port has nothing to do with USB, which supports
the idea that it might work already.  It connects to the internal modem
slot in the blue G3's and presents a rear-panel mini-DIN8 connector, same
as an older Mac.  They claim this port will work like a typical RS422 modem
port with no special driver software.  Hope so. It's cheap.

-Alex

p.s. if all the hardware stuff is starting to seem inappropriate to this
list, let me know privately.
There are certainly enough other places to read gearhead rumors.

------------------------------

Date:    Thu, 6 May 1999 01:55:47 -0400
From:    Marcel Wierckx 
Subject: looking for a reeeeeally fast metro

Hi people,

Anyone know where I could find a metro object that goes down to 1 or 2 ms.
intervals? Or if I could even get that kind of resolution in Max?

Thanks!

Marcel Wierckx

------------------------------

Date:    Thu, 6 May 1999 00:35:41 -0700
From:    Alex Stahl 
Subject: Oops: Re: USB serial interface that claims to work with MIDI

My previous message regarding the Stealth Serial Port was ripe with
misinformation. I sincerely apologize.  Seems that it is in fact shipping
to US locations, and does require a special extension. I'll be trying one
with Max and a Studio 4 Real Soon.

-Alex Stahl

------------------------------

Date:    Thu, 6 May 1999 09:57:49 +0100
From:    Vincent Puig 
Subject: FSR/AtoMIC

As discussed last week on this list the pages related to our FSR sensor kit
and to AtoMIC (our Sensor-to-MIDI interface programmable with MAX with 32
analog inputs) are now ready both in French and English at :
www.ircam.fr/atomic.

Vincent Puig
IRCAM
1 place Igor Stravinsky
75004 Paris
France
Tel: 01 44 78 49 59
Fax: 01 44 78 15 40
email : puig@ircam.fr

------------------------------

Date:    Thu, 6 May 1999 09:35:01 +0100
From:    Trond Lossius 
Subject: Re: Getting rid of floats?

Quoting Tom Ritchford:

> The best solution is to get rid of floats from your program.
>

This is a very interesting thread. There's little doubt that Max is
better equipped for dealing with ints then floats at the time being. As
long as you use Max first and foremost to deal with MIDI data it makes
sense to prefere ints to floats. Still I'm resisting the thought of
going all ints. It might be due to my background having worked on
numerical models in the field of meteorology and oceanography using
Fortran, but there are several topics that I prefere address using
floats rather than ints.

I tend to use math functions as compositional material. For this kind of
material there is little or no use in converting to ints as many of ther
functions can only be calculated as floats in the first place. The field
of Fuzzy Logics is another example.

> Knuth (Art of Computer Programming, vol I) speaks very movingly
> of this, pointing out that almost no property that you'd expect
> is valid of floats in the general case (associativity, distributivity,
> etc.)
>

It is true that ints are evenly distributed, something floats are not.
Whether or not this is a weeknes on the part of floats depends on what
they are used for. One illustration: the pass object from Karheinz Essls
RTC-lib passes a certain percentage of bangs received, using random 100
and a < (int) object. Obviously this object couldn't be implemented as
float, but it do illustrate limitations on resolution. If you start of
letting through 50% of the bangs, the least change you can make is 49 or
51, a change of 2 % relative to 50. If you start off letting through
only 10%, the least change you can get is 10%. If pass is used to
contol some kind of density this means that it is more difficult to do
subtle changes of density (relatively speaking) for low values then
higher ones.

One more illustration. Some weeks ago there was a request at the max-l
for a line object for floats. One reply suggested to multiply by 10,
using line, and then divide by 10 again. I posted a more complex
solution ensuring equal step size. If a float were to change from 0. to
1. in 10 steps both solutions would produce the same output. However if
the float already had the value 0.9 one solution would stay at 0.9 for
five steps and then jump to 1. while the other would change smothly by
step size 0.01. If the float line object was to be used to control MSP,
this could make a difference.

Nick Rothwell wrote:

> (In seven or eight years of intense MAX work, including a dozen
> native-code-based projects, I've *never* used floats...)
>

In general I believe that the addition of MSP will enforce floats to be
used more than at present. In particular when creating ones own
instruments/sounds in MSP I see little or no point in restriciting
oneself to the 0-127 range of the MIDI regime. Also MSP involves a lot
of convertions and mappings between different scales, some being linear
and some non-linear.

At the moment I'm trying to use MSP to generate sounds for a sound
installation. I want the same kind of sounds to appear again and again
but subtly changing from time to time. I try to get this to work using
lists of floats in conjunction with line~ to control different
parameters of the sounds.

> This is off-topic -- contact me off-list if you need some further
> tips on eradicating the evil floats from your code!
>

No, please keep this on-list.

Trond

------------------------------

Date:    Thu, 6 May 1999 05:57:28 -0700
From:    "|K<" 
Subject: floats vs ints

while on this topic, last night I was trying to get a number box to
display the full range of an unsigned long integer. this MUST be possible,
no?  what is the secret?!!

I use unsigned long ints extensively, especially when storeing vast
quantities of midi data (bytes) to binbufs--it makes more sense to jam 4
bytes together than to write out each byte individually (since it gets
typecast to a long anyway!)

>The best solution is to get rid of floats from your program.
>
>They're very slow (as much as 100 times slower than fixed point in
>some cases) and also suffer from problems like you've seen involving
>comparisons.

|K<
kent@music.calarts.edu

------------------------------

Date:    Thu, 6 May 1999 12:13:50 -0400
From:    Stephen Kay 
Subject: floats vs ints

> while on this topic, last night I was trying to get a number box to
> display the full range of an unsigned long integer. this MUST be
possible,
> no?  what is the secret?!!

The range of an unsigned long int (32 bits) is -2147483648 to 2147483647.=

Max (3.5.9) has no problem displaying this on my computer.  Enter
2147483647 into a number box, make sure it's big enough to display the
number, and it works.  Then click on it, and increment by 1, and
watch it change to -2147483648.

Stephen Kay

The MegaMAX Collection of professional development-oriented objects:
http://www.musikinetix.com

------------------------------

Date:    Thu, 6 May 1999 10:30:02 -0600
From:    Kevin Walker 
Subject: Re: floats vs ints

>> while on this topic, last night I was trying to get a number box to
>> display the full range of an unsigned long integer. this MUST be
>possible,
>> no?  what is the secret?!!
>
>The range of an unsigned long int (32 bits) is -2147483648 to 2147483647.

Isn't that the range of a _signed_ long int?  Wouldn't the range of an
unsigned long int be 0 to 4294967295?

------------------------------

Date:    Thu, 6 May 1999 13:31:10 -0400
From:    Stephen Kay 
Subject: Re: floats vs ints

>>> while on this topic, last night I was trying to get a number box to
>>> display the full range of an unsigned long integer. this MUST be
>>>possible,
>>> no?  what is the secret?!!

>>The range of an unsigned long int (32 bits) is -2147483648 to 214748364=
7.

>Isn't that the range of a _signed_ long int?  Wouldn't the range of an
>unsigned long int be 0 to 4294967295?

Oops, sorry, you're right.  I misread the original message.

So to answer the original question, I do not believe there is anyway to
display the full range of an unsigned long integer in Max, since
max uses signed long integers exclusively.  Values above 214748637 will b=
e =

displayed as negative numbers, in an inverse relationship.  Of course,
one can compute what the actual value would be from such a negative
number, but it's hardly intuitive.  I remember I had this
problem in one of my C objects, where I was using unsigned long integers
and wanted to "post" the values in the Max window.  It was not possible
to display the values over 214748637 properly.

Regards,
Stephen Kay

The MegaMAX collection of professional, development-oriented objects:
http://www.musikinetix.com

------------------------------

Date:    Thu, 6 May 1999 21:19:41 +0100
From:    Trond Lossius 
Subject: XG-MIDI-Tools1.0

Hi!

I've uploaded XG-MIDI-Tools1.0, a library of abstractions to deal with
the Yamaha XG Extended General MIDI format to unMax:

http://node.net/MAX/ftpfiles/downloads/objects/XG-MIDI-Tools1.0.sit

The library contains objects for sending NRPNs and RPNs as well as
sending, requesting and receiving XG Parameters and bulk dumps. The
library also contains some objects that could be of more general
interest:

XGCheckSum - calculate SysEx check sums
SysExPack - collect SysExs into lists from incomming stream of raw MIDI
data

and two list objects:

listsplit - split lists left or right depending on value of nth list
item
listclip - a clip object for lists

Cheers

Trond L.

------------------------------

Date:    Thu, 6 May 1999 23:13:43 +0100
From:    Carl Faia 
Subject: Re: symbals/floats and the electronic compass

Here is a little fix for your problem. Don't know if this will be good
enough as you will find some funny activity with the floats that are being
converted (but that's another thread).

Carl

______________________________________________________________________

max v2;
#N vpatcher 291 162 961 609;
#P comment 316 283 232 196628 Max does not like the number 263.099976;
#P button 73 89 15 0;
#P message 66 162 31 196617 clear;
#P flonum 45 310 78 9 0 0 0 3;
#P newex 129 284 45 196617 Lround 2;
#P newex 129 257 55 196617 sprintf %s;
#P message 267 73 110 196617 50 51 46 53 49 90;
#P flonum 129 310 78 9 0 0 0 3;
#P newex 129 233 38 196617 itoa;
#P newex 129 201 72 196617 Lfilt 36 67 90;
#P newex 129 178 27 196617 Lin;
#P newex 476 127 45 196617 delay 10;
#P newex 443 101 45 196617 delay 50;
#P message 476 147 31 196617 clear;
#P button 443 147 15 0;
#P message 443 212 51 196617 $C263.1;
#P newex 443 170 38 196617 itoa;
#P newex 443 190 60 196617 prepend set;
#P message 129 73 110 196617 36 67 50 54 51 46 49;
#P newex 129 99 25 196617 iter;
#P comment 229 350 281 196620 the problem is here !;
#P comment 152 31 220 196617 click on one of these message boxes ! this
duplicate the stream I get from the device through the serial object;
#P comment 499 210 143 196617 this is the string I get from the electronic
compass \, I need to get rid of the symbol and get those numbers !;
#P comment 229 371 302 196617 I get an error message ''number doesn't
understand ''263.1'' and curiously if I move a bit the message box and
click on it the message go through (??????);
#P comment 89 333 100 196617 If you want to keep the patch the way you had
it \, simply put the sprintf after the message box.;
#P comment 186 240 100 196617 This will cause some inaccuracies. It depends
on what you want to do with the final number.;
#P connect 20 0 22 0;
#P connect 19 0 24 0;
#P connect 7 0 24 0;
#P fasten 19 0 6 0 272 95 134 95;
#P connect 7 0 6 0;
#P connect 24 0 15 0;
#P connect 6 0 15 0;
#P connect 23 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 17 0;
#P connect 17 0 20 0;
#P connect 20 0 21 0;
#P connect 21 0 18 0;
#P fasten 19 0 13 0 272 95 448 95;
#P fasten 7 0 13 0 134 95 448 95;
#P connect 13 0 11 0;
#P connect 11 0 9 0;
#P fasten 12 0 9 0 481 166 448 166;
#P connect 9 0 8 0;
#P connect 8 0 10 0;
#P fasten 6 0 9 1 134 153 426 153 426 165 476 165;
#P fasten 13 0 14 0 448 123 481 123;
#P connect 14 0 12 0;
#P pop;

------------------------------

Date:    Thu, 6 May 1999 23:31:46 +0200
From:    Peter Castine 
Subject: Re: floats vs ints

On around 6-5-99 18:30, Kevin Walker said something like:

>Isn't that the range of a _signed_ long int?  Wouldn't the range of an
>unsigned long int be 0 to 4294967295?

Yeah, but Max number boxes only displays 32-bit integers as signed.
Something like:

     printf("ld", x);

You want unsigned representation, you gotta write your own number box,
which will do something like:

     printf("lu", x);

Or beg with/plead with/offer unprintable satisfactions to David Z. if he
adds an option to the std. Number Box letting you switch between signed
and unsigned representations.

Note that signed and unsigned integers behave exactly the same in C/C++.
They are just bit patterns that follow certain arbitrary rules that we
like to call "arithmetic".

Now someone's going to come an want to one-up me about bit shift right
when the high-order bit is set. It is true that signed and unsigned ints
_may_ behave differently under this operation, however & IMS, this is
implementation dependent.

Cheers, Peter

----------------- http://www.prz.tu-berlin.de/~pcastine/ -----------------
Dr. Peter Castine          | I am very pleased to announce that the
4-15 Music & Technology    | 26th International Computer Music Conference
                           | will take place in Berlin in the year 2000.
                           | We look forward to seeing you here!

------------------------------

End of MAX Digest - 5 May 1999 to 6 May 1999 (#1999-138)
********************************************************