[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Quarter-tone MIDI
From: |
Nigel Warner |
Subject: |
RE: Quarter-tone MIDI |
Date: |
Tue, 4 Nov 2003 07:57:10 -0000 |
Heikki,
I note from the transmission time of your mail you are an insomniac
as well, or are you on the graveyard shift ;-)
>Does this have an effect on all the channels, one channel or one
>instrument?
The pitch wheel message is a channel mode message which means
that all 16 channels can be controlled independently. On an actual
physical keyboard, which is what I assume you mean by instrument,
it depends on how it is configured. Normaly on something like a
Yamaha Clavinova the entire keyboard is configured to transmit
to it's internal sound production module on one channel, for
example 0. However most keyboards allow the keyboard to be split
with all notes below a certain note transmitting on a chosen
channel and those above on another thus giving the instrument
different patches across it's range.
Refering to the documentation for the Yamaha V50, an oldie but
goody, a combination of switches is available to turn pitch wheel
reception for a certain channel off thus allowing, in the case of
a split keyboard, the pitch wheel to only modify specific channels.
However this is accomplished using some rather arcane MIDI
commands specific to the model. SYS$RTFM i'm afraid.
>What are the exact midi command bytes if one wants to change c' -note to
>cih' -note (i.e. add 50 cents).
The data bytes required, assuming the standard +/- two semitones
for the full travel of the wheel, are sent as a standard midi event
with a delta time followed by a byte built, if we are changing the pitch
on channel 5 as:
#define pitchWheel 0xe0
unsigned char c = pitchWheel | 5;
#define pitchWheelTop 16383
#define pitchWheelBottom 0
#define pitchWheelCenter 8192
#define quarterTone pitchWheelTop / 8
unsigned int quarterToneUp = pitchWheelCenter + quarterTone;
The variable quarterToneUp then needs to be broken into two data bytes
the lower seven bits of which are combined by whatever bit of hardware
or
software receives the message into a 14 bit number which should be
sent directly after the status byte, c above.
Your standard midi message routines should be able to handle this
since it is merely an additional message type with the caveat that
the pitch change message should be sent after the previous note has
ended since it will modify the note currently playing and, for
safeties sake, at least a couple of ticks before the note to be changed
starts.
Hope this helps.
Nigel.