back to list

Suggested 5-Byte MIDI Note message

🔗Aaron Andrew Hunt <aahunt@h-pi.com>

4/2/2007 8:33:12 PM

Correct this time:

1NNNhhhh 0nnnnnnn 0ccccccc 0fffffff 0vvvvvvv

1 = status byte flag bit
0 = data byte flag bit
NNN = the new Note message ID
h = channel
n = note number
c = tuning coarse MSB
f = tuning fine LSB
v = velocity

The Tuning bytes would mean the same as the existing Pitch
Bend data bytes, but the bend range would be fixed at
+ / - a quartertone, giving 196608 steps per octave.

Aaron Hunt
H-Pi Instruments

🔗hstraub64 <hstraub64@telesonique.net>

4/3/2007 4:46:58 AM

--- In tuning@yahoogroups.com, "Aaron Andrew Hunt" <aahunt@...> wrote:
>
> Correct this time:
>
> 1NNNhhhh 0nnnnnnn 0ccccccc 0fffffff 0vvvvvvv
>
> 1 = status byte flag bit
> 0 = data byte flag bit
> NNN = the new Note message ID
> h = channel
> n = note number
> c = tuning coarse MSB
> f = tuning fine LSB
> v = velocity
>
> The Tuning bytes would mean the same as the existing Pitch
> Bend data bytes, but the bend range would be fixed at
> + / - a quartertone, giving 196608 steps per octave.
>

I tend to think it might be better not to specify the concrete tuning
in each message but just have more space for the note number and
specify the concrete tuning separately - maybe even in a separate
file, in Scala format or so...
--
Hans Straub

🔗Aaron Andrew Hunt <aahunt@h-pi.com>

4/3/2007 8:46:19 AM

A lookup table is economical, but sending tuning data
with each note is much more flexible. Doesn't anyone
know about HD-MIDI? I've mentioned this before. It will
be the new MIDI standard, where all existing single byte
messages can become multi-byte messages. More than
16 channels, and more than 128 notes per channel.
Lots more:

http://www.midi.org/newsviews/hdmidipr2.shtml

So, in fact my proposed 5-byte message could easily be
twice the length with more notes and channels available.

Aaron Hunt
H-Pi Instruments

--- In tuning@yahoogroups.com, "hstraub64" <hstraub64@...> wrote:
>
> --- In tuning@yahoogroups.com, "Aaron Andrew Hunt" <aahunt@> wrote:
> >
> > Correct this time:
> >
> > 1NNNhhhh 0nnnnnnn 0ccccccc 0fffffff 0vvvvvvv
> >
> > 1 = status byte flag bit
> > 0 = data byte flag bit
> > NNN = the new Note message ID
> > h = channel
> > n = note number
> > c = tuning coarse MSB
> > f = tuning fine LSB
> > v = velocity
> >
> > The Tuning bytes would mean the same as the existing Pitch
> > Bend data bytes, but the bend range would be fixed at
> > + / - a quartertone, giving 196608 steps per octave.
> >
>
> I tend to think it might be better not to specify the concrete tuning
> in each message but just have more space for the note number and
> specify the concrete tuning separately - maybe even in a separate
> file, in Scala format or so...
> --
> Hans Straub
>

🔗Carl Lumma <clumma@yahoo.com>

4/3/2007 9:29:48 AM

> I tend to think it might be better not to specify the concrete tuning
> in each message but just have more space for the note number and
> specify the concrete tuning separately - maybe even in a separate
> file, in Scala format or so...
> --
> Hans Straub

Exactly. Except I think the synth should get a table of
absolute pitches, and devices/software should handle the
Scala (pitch classes) -> tuning table translation.

-Carl

🔗Carl Lumma <clumma@yahoo.com>

4/3/2007 9:39:27 AM

> > I tend to think it might be better not to specify the concrete
> > tuning in each message but just have more space for the note
> > number and specify the concrete tuning separately - maybe even
> > in a separate file, in Scala format or so...
> > --
> > Hans Straub
>
> Exactly. Except I think the synth should get a table of
> absolute pitches, and devices/software should handle the
> Scala (pitch classes) -> tuning table translation.

Several software synths (z3ta+, etc.) now have Scala file
support, and this is considered a good thing. However, I
think it would be ideal if sequencers, score editors, and
MIDI players had this support, not synths. This is because
the choice of scale should (and sometimes must) be reflected
in the score / piano roll / whatever.

-Carl

🔗Gene Ward Smith <genewardsmith@sbcglobal.net>

4/3/2007 2:29:02 PM

--- In tuning@yahoogroups.com, "Aaron Andrew Hunt" <aahunt@...> wrote:

> The Tuning bytes would mean the same as the existing Pitch
> Bend data bytes, but the bend range would be fixed at
> + / - a quartertone, giving 196608 steps per octave.

This could be described as the midi tuning standard
the way it should have been done.

🔗Gene Ward Smith <genewardsmith@sbcglobal.net>

4/3/2007 2:31:07 PM

--- In tuning@yahoogroups.com, "hstraub64" <hstraub64@...> wrote:

> I tend to think it might be better not to specify the concrete tuning
> in each message but just have more space for the note number and
> specify the concrete tuning separately - maybe even in a separate
> file, in Scala format or so...

Why?? This is a part of the nightmare we want to
escape *from*.

🔗Gene Ward Smith <genewardsmith@sbcglobal.net>

4/3/2007 3:13:17 PM

--- In tuning@yahoogroups.com, "Carl Lumma" <clumma@...> wrote:
>
> > I tend to think it might be better not to specify the concrete
tuning
> > in each message but just have more space for the note number and
> > specify the concrete tuning separately - maybe even in a separate
> > file, in Scala format or so...
> > --
> > Hans Straub
>
> Exactly. Except I think the synth should get a table of
> absolute pitches, and devices/software should handle the
> Scala (pitch classes) -> tuning table translation.

Why??? This sucky scale-oriented mindset is driving me nuts.
It is horribly counter-prodictive. Total pitchn control, with
no preconceptions, is desirable.

Devices, it seems to me, should get pitch information from the
score file, whether midi or anything else. If you've got a
keyboard, then you might map the keyboard, but why center
everything around that very limiting situation?

🔗Gene Ward Smith <genewardsmith@sbcglobal.net>

4/3/2007 3:18:26 PM

--- In tuning@yahoogroups.com, "Carl Lumma" <clumma@...> wrote:

> Several software synths (z3ta+, etc.) now have Scala file
> support, and this is considered a good thing. However, I
> think it would be ideal if sequencers, score editors, and
> MIDI players had this support, not synths. This is because
> the choice of scale should (and sometimes must) be reflected
> in the score / piano roll / whatever.

"Should" makes sense, if there *is* a scale. "Must" is all
wet. Things should be set up in such a way that scale files
are *never* necessary, only optional. The basic thing is
pitch, pitch and pitch. Scales are very much a secondary
consideration. Not to mention, tuning systems is another
layer of abstraction.

🔗Carl Lumma <clumma@yahoo.com>

4/3/2007 5:07:20 PM

> Devices, it seems to me, should get pitch information from the
> score file, whether midi or anything else.

Tuning tables can be embedded in MIDI files (and are, all
the time).

The scale-based approach is good because an abstraction
for scales is good.
** It's sometimes desirable to change scales but keep note
identities the same.
** In most cases you'll wind up being very redundant,
sending the full pitch resolution over the bus for every
note-on. This is an issue irrespective of computer
power. If you're going to call MIDI files "scores", then
they should have elegance, be human-writable in
emergencies, etc.

-Carl

🔗Gene Ward Smith <genewardsmith@sbcglobal.net>

4/3/2007 6:36:22 PM

--- In tuning@yahoogroups.com, "Carl Lumma" <clumma@...> wrote:
>
> > Devices, it seems to me, should get pitch information from the
> > score file, whether midi or anything else.
>
> Tuning tables can be embedded in MIDI files (and are, all
> the time).

I have no objection to doing it, but I don't want to
be forced into that straightjacket.

> The scale-based approach is good because an abstraction
> for scales is good.

Sometimes. At other times its rigidity is bad, and the
simplicity and power of note-by-note tuning will alwasy
work, and will always make recovery of tuning information
from the file, which seems to be a hang-up with Scala,
quite easy.

> ** In most cases you'll wind up being very redundant,
> sending the full pitch resolution over the bus for every
> note-on. This is an issue irrespective of computer
> power.

Why? A long int in this day and age is not a big deal.

> If you're going to call MIDI files "scores", then
> they should have elegance, be human-writable in
> emergencies, etc.

I would far rather deal with a system like mine than
the hellish mishmash of tuning dump data. But alternative
systems are certainly possible--Tonescape uses one, for
example. But the KISS principle applies, I think. Keeping
it simple has never been a consideration and the result
has been a headache.

🔗Carl Lumma <clumma@yahoo.com>

4/3/2007 6:53:38 PM

> I would far rather deal with a system like mine than
> the hellish mishmash of tuning dump data. But alternative
> systems are certainly possible--Tonescape uses one, for
> example. But the KISS principle applies, I think. Keeping
> it simple has never been a consideration and the result
> has been a headache.

Reading through a score consisting entirely of 5-byte
notes gets my vote for hellish mishmash.

-Carl

🔗Graham Breed <gbreed@gmail.com>

4/3/2007 8:24:25 PM

Gene Ward Smith wrote:
> --- In tuning@yahoogroups.com, "Carl Lumma" <clumma@...> wrote:
> >>>Devices, it seems to me, should get pitch information from the
>>>score file, whether midi or anything else.
>>
>>Tuning tables can be embedded in MIDI files (and are, all
>>the time).
> > I have no objection to doing it, but I don't want to
> be forced into that straightjacket.
> >>The scale-based approach is good because an abstraction
>>for scales is good.
> > Sometimes. At other times its rigidity is bad, and the
> simplicity and power of note-by-note tuning will alwasy
> work, and will always make recovery of tuning information
> from the file, which seems to be a hang-up with Scala,
> quite easy.

It's a valid criticism of MIDI that it's keyboard-centric. When you're using keyboards (or scores) note numbers are good. With flexible pitch instruments, directly specifying the pitch can be better. For your purposes, though, single note tuning changes are fine.

>>** In most cases you'll wind up being very redundant,
>>sending the full pitch resolution over the bus for every
>>note-on. This is an issue irrespective of computer
>>power. > > Why? A long int in this day and age is not a big deal.

Then what's the big deal about three of them for a single note tuning change? It means those of us who want to specify pitch can do it and the vast majority of people who don't aren't saddled with any performance or backwards compatibility hit at all.

>>If you're going to call MIDI files "scores", then
>>they should have elegance, be human-writable in
>>emergencies, etc.
> > I would far rather deal with a system like mine than > the hellish mishmash of tuning dump data. But alternative
> systems are certainly possible--Tonescape uses one, for
> example. But the KISS principle applies, I think. Keeping
> it simple has never been a consideration and the result
> has been a headache.

KISS is absolutely the principle MIDI is based on. The overwhelming majority of people don't need more than 128 notes per channel so you don't get more than 128 notes per channel.

If you want to specify pitch per note there's a standard way of doing it. How complicated it is to implement needn't worry you because the machine can hide all that from you. That it's widely ignored shows you that few people want it.

Keeping it simple, from the point of view of a user, is absolutely not about deciding which kind of note messages to send to work with an old synthesizer. A 5 note message would never be used.

Graham

🔗Gene Ward Smith <genewardsmith@sbcglobal.net>

4/3/2007 11:39:19 PM

--- In tuning@yahoogroups.com, "Carl Lumma" <clumma@...> wrote:
>
> > I would far rather deal with a system like mine than
> > the hellish mishmash of tuning dump data. But alternative
> > systems are certainly possible--Tonescape uses one, for
> > example. But the KISS principle applies, I think. Keeping
> > it simple has never been a consideration and the result
> > has been a headache.
>
> Reading through a score consisting entirely of 5-byte
> notes gets my vote for hellish mishmash.

I don't recommend converting midi files to ascii
and trying to read them at all. However, the
numeric information is extractable, and you can
work with it. That's way easier if they are
something simple, like an integer. Csound's idea
of a float isn't bad, but iutegers are better.

🔗Gene Ward Smith <genewardsmith@sbcglobal.net>

4/3/2007 11:53:31 PM

--- In tuning@yahoogroups.com, Graham Breed <gbreed@...> wrote:

> It's a valid criticism of MIDI that it's keyboard-centric.
> When you're using keyboards (or scores) note numbers are
> good. With flexible pitch instruments, directly specifying
> the pitch can be better. For your purposes, though, single
> note tuning changes are fine.

Note tuning changes are only going to be fine if
we can extract tuning data, and with midi at present
that is a hellish exericse. It is not KISS at all,
but a horrible kludge which is hard to deal with.
It would become a lot easier to deal with using
note tuning changes, but it wouldn't be *good*. To
quote Jimmy Carter, why not the best?

> > Why? A long int in this day and age is not a big deal.
>
> Then what's the big deal about three of them for a single
> note tuning change?

That would work, and I have no real objection to it
beyond the fact that it is three times as hard and
ends up not being nearly as accurate. But unless
software is going to support it, what's the point?

It means those of us who want to
> specify pitch can do it and the vast majority of people who
> don't aren't saddled with any performance or backwards
> compatibility hit at all.

They are going to have backwards compatibility
problems if the midi files, with the extra note
data, don't play at all. Which I don't think they
do.

> KISS is absolutely the principle MIDI is based on.

Pitch bend is KISS? I don't think so.

> If you want to specify pitch per note there's a standard way
> of doing it.

Which no one uses. But as I say, if we could get
people to use it, fine.

How complicated it is to implement needn't
> worry you because the machine can hide all that from you.

Well, no. It's a big deal how complicated it is, because it
relates to the question of extracting the tuning data from
the midi file.

🔗Graham Breed <gbreed@gmail.com>

4/4/2007 2:30:17 AM

Where are we planning to fit this new note message? There's a list of MIDI messages here:

http://www.midi.org/about-midi/table1.shtml

I don't see any gaps.

Gene Ward Smith wrote:
> --- In tuning@yahoogroups.com, Graham Breed <gbreed@...> wrote:
> >>It's a valid criticism of MIDI that it's keyboard-centric. >>When you're using keyboards (or scores) note numbers are >>good. With flexible pitch instruments, directly specifying >>the pitch can be better. For your purposes, though, single >>note tuning changes are fine.
> > Note tuning changes are only going to be fine if
> we can extract tuning data, and with midi at present
> that is a hellish exericse. It is not KISS at all,
> but a horrible kludge which is hard to deal with.
> It would become a lot easier to deal with using
> note tuning changes, but it wouldn't be *good*. To
> quote Jimmy Carter, why not the best?

To your last question, two reasons:

1) The world doesn't revolve around your desires

2) Backwards compatibility

Given we started with a simple protocol using 7-bit note data, the simplest way of extending it was to use the system exclusive messages that were already there. How else would you expect to do it?

What's hellish about extracting the tunings?

>>>Why? A long int in this day and age is not a big deal.
>>
>>Then what's the big deal about three of them for a single >>note tuning change? > > That would work, and I have no real objection to it
> beyond the fact that it is three times as hard and
> ends up not being nearly as accurate. But unless > software is going to support it, what's the point?

Why less accurate? If software isn't going to support anything, what's the point?

> It means those of us who want to >>specify pitch can do it and the vast majority of people who >>don't aren't saddled with any performance or backwards >>compatibility hit at all.
> > They are going to have backwards compatibility
> problems if the midi files, with the extra note
> data, don't play at all. Which I don't think they
> do.

How is a device that knows nothing about the new messages supposed to handle them?

>>KISS is absolutely the principle MIDI is based on. > > Pitch bend is KISS? I don't think so.

Why not?

>>If you want to specify pitch per note there's a standard way >>of doing it.
> > Which no one uses. But as I say, if we could get
> people to use it, fine.

Then the problem is that we can't get people to use what we already have. Let's focus on getting people to use it instead of reinventing the wheel.

> How complicated it is to implement needn't >>worry you because the machine can hide all that from you. > > Well, no. It's a big deal how complicated it is, because it
> relates to the question of extracting the tuning data from
> the midi file.

No. Somebody writes a script that does it for you.

Graham

🔗Aaron Andrew Hunt <aahunt@h-pi.com>

4/4/2007 5:32:57 AM

--- In tuning@yahoogroups.com, Graham Breed <gbreed@...> wrote:
>
> Where are we planning to fit this new note message? There's
> a list of MIDI messages here:
>
> http://www.midi.org/about-midi/table1.shtml
>
> I don't see any gaps.
>

Hi Graham. To fit it into the current list (which will be expanded
once HD-MIDI is adopted) I suggest depricating Note OFF, since
the vast majority of stuff does not use it at all, and instead uses
Note ON with velocity 0. In fact, Note OFF is not even supported
by default on many sequencers. Depricating Note OFF puts the
new tuned Note ON message where it should be, first on the list.

Alternatively, if you really want that OFF velocity for your
harpsichord samples, the new 5-byte format could simply be a
new implementation of the old Note ON message, with the data
bytes rearranged to conform to the existing message, such that
gear not supporting the extra bytes will just ignore them.

1001hhhh 0nnnnnnn 0vvvvvvv 0ccccccc 0fffffff

Stuff is received in packets anyway, so even though it's serial
this would not have to result in a bend after sounding problem.

Cheers,
Aaron Hunt
H-Pi Instruments