Difference between revisions of "MIDI and the organ project"

From Fernseher
Jump to navigationJump to search
(New page: MIDI standard is out there. Also good is the RTP-MIDI RFC, for putting MIDI data into a stream and whatnot. The basics, as I think we will be using them: Packet basics: 1 <3: opcode> <...)
 
Line 15: Line 15:
*0x0: Great (Solo) Manual
*0x0: Great (Solo) Manual
*0x1: Swell (Accompaniment) Manual
*0x1: Swell (Accompaniment) Manual
*0x2: Choir (below Great) Manual
*0x2: Choir (below Great) Manual, if present
*0x3: Solo (above Swell) Manual
*0x3: Solo (above Swell) Manual, if present
*0x4: Echo (above Solo) Manual
*0x4: Echo (above Solo) Manual, if present
*0x5: Pedalboard
*0x5: Third Pedalboard, if present, or the auxilary stop channel, covering additional stops for all manuals and pedals.
*0x6: Second Pedalboard, if any
*0x6: Second Pedalboard, if present, or the main stop channel, covering all stops for all manuals and pedals.
*0x7: Third Pedalboard.  Right.
*0x7: Main Pedalboard
*0x8: Stop channel.  If divided, stops for Great
*0x8: Great stops only
*0x9: Stop channel for Swell.
*0x9: Swell stops only
*0xA: Stop channel for Choir.
*0xA: Choir stops only
*0xB: Stop channel for Solo.
*0xB: Solo stops only
*0xC: Stop channel for Echo.
*0xC: Echo stops only
*0xD: Stop channel for Pedalboard.
*0xD: Third Pedalboard stops only
*0xE: Stop channel for Second Pedalboard.
*0xE: Second Pedalboard stops only
*0xF: Stop channel for Third Pedalboard.
*0xF: Main Pedalboard stops only
 
Our initial organ will only use channels 0x0-0x1, 0x6-0x7.


Each keyboard channel (0x0-0x7) gets its own control set.  For our organ, where the modulation wheel and expression pedal control all divisions equally, each control change gets sent for each active channel... or maybe just for great, and the software will figure out that they control all the stuff.  Note, we may not hook up the modulation wheel when we begin.  It'd be kinda a lot harder to make work right, I think.
Each keyboard channel (0x0-0x7) gets its own control set.  For our organ, where the modulation wheel and expression pedal control all divisions equally, each control change gets sent for each active channel... or maybe just for great, and the software will figure out that they control all the stuff.  Note, we may not hook up the modulation wheel when we begin.  It'd be kinda a lot harder to make work right, I think.
We will be building channel combination boards, that take an enable and a sub-channel address, and read back the contents of the addressed buffer.  4 bits of address gets 16 buffers.  At 8 bits per buffer, thats 128 inputs for each channel.  That matches with midi's numbering scheme.  Alternatively, if you take the LSB of the true channel, and feed it to the 4th address bit of the channel board, and only decode the top 3 bits of the channel to determine channel board enable, you can duplex your channel boards, since we will only be using under 64 inputs per channel.  The AVR firmware will have an MIDI offset value for each channel to add to the number received from the board before sending as part of a MIDI command. For most subchannels, this will be 36.  Will probably just use an offset of 0 for the stop channels.
Using the split channel board design, we only need two channel boards for our organ.  The main board will be designed to use the channel boards in split mode, and will never probably use the split-mode stop channels (0x8-0xF), so it will only have 4 plugs for channel boards, 0x0-0x1, 0x2-0x3, 0x4-0x5, and 0x6-0x7.  The initial organ will only use the first and last of these plugs, so we don't even need to populate the board positions for the other channel boards.
Also, I think we might want to put all the switch pull-up resistors on the manuals themselves, soldered to the key tabs.  This will eliminate a lot of crap on the boards, and keep the board design uniform, since the different keys will need different pull-ups.  The manuals, with their 5k internal resistance, will need 50k (or so) pull-ups to 5V, and the pedals and stops, with no internal resistance, will need just 10k (or so) pull-ups to 5V.  Each manual will get a separate power and ground plug for the pull-ups and grounds, so the connectors for the keys don't need a pin for ground or power, I don't think... Though if there is room, I guess we could send it along there, too.  Can't hurt anything, provided the wires support enough current for the crazy case of all the stop pulled or keys pressed or something.  Given a max of 64 inputs to a half-channel, and only 61 keys on a full manual, we can use 2x36 pin connectors for the manuals, and 1x36 pin connector for the pedalboards, and 1x36 pin connector for the stop boards.  Thats 6 total 36 pin connectors, male and female, solder cup and through-hole.
Channel board to main board connectors will have an 8-bit data bus, 4-bit address bus, a power, ground, enable, and identify(?) pins (16 total).  Should be able to use IDC connectors and ribbon cable here.

Revision as of 21:52, 22 February 2009

MIDI standard is out there. Also good is the RTP-MIDI RFC, for putting MIDI data into a stream and whatnot.

The basics, as I think we will be using them:

Packet basics:

1 <3: opcode> <4: channel> 0 <7: arg1> 0 <7: arg2>

opcodes of relevance:

  • 0x0: key off. arg1 is the key number, arg2 is the velocity. We will always use velocity of 0x40.
  • 0x1: key on. arg1 is the key number, arg2 is the velocity. We will always use the velocity of 0x40.
  • 0x3: control change. arg1 is the control number (0x01 is modulation wheel, 0x0B is the expression pedal), arg2 is the new control value, from 0x00 - 0x7F

For channels, we will use:

  • 0x0: Great (Solo) Manual
  • 0x1: Swell (Accompaniment) Manual
  • 0x2: Choir (below Great) Manual, if present
  • 0x3: Solo (above Swell) Manual, if present
  • 0x4: Echo (above Solo) Manual, if present
  • 0x5: Third Pedalboard, if present, or the auxilary stop channel, covering additional stops for all manuals and pedals.
  • 0x6: Second Pedalboard, if present, or the main stop channel, covering all stops for all manuals and pedals.
  • 0x7: Main Pedalboard
  • 0x8: Great stops only
  • 0x9: Swell stops only
  • 0xA: Choir stops only
  • 0xB: Solo stops only
  • 0xC: Echo stops only
  • 0xD: Third Pedalboard stops only
  • 0xE: Second Pedalboard stops only
  • 0xF: Main Pedalboard stops only

Our initial organ will only use channels 0x0-0x1, 0x6-0x7.

Each keyboard channel (0x0-0x7) gets its own control set. For our organ, where the modulation wheel and expression pedal control all divisions equally, each control change gets sent for each active channel... or maybe just for great, and the software will figure out that they control all the stuff. Note, we may not hook up the modulation wheel when we begin. It'd be kinda a lot harder to make work right, I think.

We will be building channel combination boards, that take an enable and a sub-channel address, and read back the contents of the addressed buffer. 4 bits of address gets 16 buffers. At 8 bits per buffer, thats 128 inputs for each channel. That matches with midi's numbering scheme. Alternatively, if you take the LSB of the true channel, and feed it to the 4th address bit of the channel board, and only decode the top 3 bits of the channel to determine channel board enable, you can duplex your channel boards, since we will only be using under 64 inputs per channel. The AVR firmware will have an MIDI offset value for each channel to add to the number received from the board before sending as part of a MIDI command. For most subchannels, this will be 36. Will probably just use an offset of 0 for the stop channels.

Using the split channel board design, we only need two channel boards for our organ. The main board will be designed to use the channel boards in split mode, and will never probably use the split-mode stop channels (0x8-0xF), so it will only have 4 plugs for channel boards, 0x0-0x1, 0x2-0x3, 0x4-0x5, and 0x6-0x7. The initial organ will only use the first and last of these plugs, so we don't even need to populate the board positions for the other channel boards.

Also, I think we might want to put all the switch pull-up resistors on the manuals themselves, soldered to the key tabs. This will eliminate a lot of crap on the boards, and keep the board design uniform, since the different keys will need different pull-ups. The manuals, with their 5k internal resistance, will need 50k (or so) pull-ups to 5V, and the pedals and stops, with no internal resistance, will need just 10k (or so) pull-ups to 5V. Each manual will get a separate power and ground plug for the pull-ups and grounds, so the connectors for the keys don't need a pin for ground or power, I don't think... Though if there is room, I guess we could send it along there, too. Can't hurt anything, provided the wires support enough current for the crazy case of all the stop pulled or keys pressed or something. Given a max of 64 inputs to a half-channel, and only 61 keys on a full manual, we can use 2x36 pin connectors for the manuals, and 1x36 pin connector for the pedalboards, and 1x36 pin connector for the stop boards. Thats 6 total 36 pin connectors, male and female, solder cup and through-hole.

Channel board to main board connectors will have an 8-bit data bus, 4-bit address bus, a power, ground, enable, and identify(?) pins (16 total). Should be able to use IDC connectors and ribbon cable here.