Csound Csound-dev Csound-tekno Search About

Re: More on floats in Midi

Date1998-04-28 09:31
FromRichard Dobson
SubjectRe: More on floats in Midi
I can't follow the logic of these ideas. The string "2.67" is 5 bytes long
(including the null byte), so it is already longer than the four-byte float - the
latter is a ~much~ more compact representation than ASCII!

As for idea of 16bits being OK, that may be true for any one number taken in
isolation, but one starts to lose precision very quickly whan doing arithmetic
involving multiplication or division. Floating-point numbers have normalisation
built into the format, but integers don't - you would have to define some
arbitrary semi-fixed-point format to get around the problem, which would be less
efficient than using standard floats anyway.

Part of the problem with MIDI is that the data word is 7bits, not eight (the MSB
gives the MIDI status); hence the double-precision pitchbend messages, etc, are
14bits, not 16. So, for compatibility, the size of a putative large MIDI word
would, for efficiency,  have to be a multiple of 7.  Since ASCII is also a 7bit
format, transmission is in principle compatible with MIDI; you would probably need
to define some new Universal System
Excusive format.

On the other hand, if a new format is being invented, what is to stop ~both~ text
~and~ f/p formats being incorporated?


Richard Dobson



Larry Troxler wrote:

> Michael Gogins wrote:
> >
> > -----Original Message-----
> > From: Nathan Day 
> > To: Csound mailing list 
> > Date: Monday, April 27, 1998 6:12 AM
> > Subject: More on floats in Midi
> >
> > >Simple 16 bit integers would allow you to divide 10 octaves into interval
> > >of 0.183105 cents, and a dynamic range of 130 dB into intervals 0.00198364
> > >dB, do we really need 32 bit floats or even floats at all.
> >
> > Engineering of all sorts in general, and music engineering in particular,
> > has repeatedly found with pain and suffering that numbers deemed too precise
> > or too big to start with are nothing like big enough in the end.
> >
>
> What's all this talk about 32 bit floats,etc ? Maybe I'm missing the
> obvious, but wouldn't some hypothetical future networked MIDI
> replacement transmit messages in ASCII and not binary? IOW, wouldn't you
> want to transmit a value of 2.67 as the ASCII string "2.67"? What
> argument could you make for transmitting binrary floats instead? Please
> don't say because ASCII takes more bandwidth and processing time to
> decode - I sincerely doubt that this would be the limiting factor!
>
> Or perhaps you *don't* want to be able to telnet to a synthesizer that
> implements this hypothetical protocal, and be able to type in simple
> test messages. Or be able to write simple filters using pipes and perl,
> etc.
>
> Larry
>
>
> --  Larry Troxler --  lt@westnet.com  --  Patterson, NY USA  --