iiwusynth-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iiwusynth-devel] Bank select through MIDI


From: James Hightower
Subject: [iiwusynth-devel] Bank select through MIDI
Date: Fri, 27 Dec 2002 03:40:33 -0800 (PST)

Hi all,

I've just started working with iiwusynth, as a soft synth for Rosegarden.
I noticed that it is impossible to select bank 128 through a MIDI bank
select.
The problem is at iiwu_chan.c line 206 (in the CVS version):

  iiwu_channel_set_banknum(chan, (((unsigned int) value & 0x7f)
               + ((unsigned int) chan->bank_msb << 8)));

(it's line 168 in the release version)

The problem is that the MSB and LSB are being treated as 8 bit bytes,
which they are not. They are 7-bit bytes, so the MSB should be shifted 7
bits to the left. This allows for 2^14 or 16384 banks, 0-16383, which is
correct as per the MIDI standard. Shifting by 8 bits allows banks 0-32639
but skipping banks 128-255, as bit 7 of the LSB cannot be set, which is
not correct.
Looking through the mailing list archives, I see that Josh touched on this
subject in an email dated Sat Apr 06 15:20:07 2002, in a discussion of
someone's keyboard, and this was also brought up by
address@hidden in an email dated Jul 12 22:31:59 2002, but there
was no further discussion.
Here's a patch -- I havn't tested this beyond running this with
Rosegarten, and I really havn't looked at the code closely....

Attachment: iiwu_chan.c.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]