Midi Translator

Discussion in 'The Projects Forum' started by Glenn M., Jan 27, 2014.

  1. Glenn M.

    Thread Starter New Member

    Jan 5, 2014
    7
    0
    Mods, if I've posted in the wrong forum, please move this thread; if it has no place on this site, please just delete it. Thanks.

    Hello all.
    After searching the site, I can't find any midi project similiar to what I'd like to attempt. If there is one, someone please post a link to it!!

    I'm an "old school" keyboard player and still gig out with an older board that transmits program changes from 1 - 120 (True Midi = 0 - 119). What I'd like to build is a midi-powered, midi program change "translator" that would translate a program change command to something compatible with a newer sound module that expects something more like a "Bank select" and a "Program select" command.

    This translator would need to be a programmable midi filter as well, as I'd like to pass through external controller commands (Sustain, mod pedal) commands and key on/off commands, but possibly filter out other parts of what the keyboard may transmit.

    To further complicate things, I'd like to have it responsive to either a momentary or toggle style foot switch that would change the output midi commands to an even different program change, i.e., I select a piano sound to start with that resides only in the keyboard, and when I press the foot switch, the whole rig would change to a string setting for the keyboard as well as the sound module. When the foot switch would be pressed again, the whole rig would go back to the original piano setting. Obviously, this would require the use of a midi input cable to the keyboard controller (As well as a midi output cable), but as long as the "translator" microprocessor is transmitting what I want, it shouldn't be a problem.

    I've got to learn C or other programming, which will be a big deal for me, even though I have done some PLC programming in the past. At least I can handle a soldering iron (Pencil) and read schematics, etc.

    I'm aware of the Bome Translator, but I'd like to not have a laptop at the gigs, would much rather have a dedicated, programmable microprocessor and neccessary I/O. I haven't used Midi Ox yet, but I'll learn about it quickly enough.

    What microprocessor what would you recommend? I'll have a ton of commands to program in, I imagine I'd want a large amount of memory. I figure that once I get the first command working, the rest will come much easier.

    Any other caveats, or do you recommend that I give up before I start?? :confused:

    Thanks for any help for this newbie, it's much appreciated.

    Glenn M.
     
  2. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    Hi Glenn,
    Welcome to the board. Its nice to hear from an "old school keyboard player", I worked in the electronic keyboard business for several years. However I got bumped out just as MIDI was coming in. Therefore I know next to nothing about MIDI. But I have worked a lot with microprocessors. Most any Micro can do what you want but you would be best off to go with one of the more commonly used types. Microchip PIC processors are used a lot so there is a lot of people on the forum that can offer advice, also they are inexpensive.
     
  3. Glenn M.

    Thread Starter New Member

    Jan 5, 2014
    7
    0
    Hi Brevor,

    I was pretty sure that I'd end up with a PIC processor, just don't know enough about them to know which to choose, whether they'd work with MIDI without a lot of inverters, etc., which ones are larger memory, etc. I've never worked with any of them, and, of course, PLC programming is no comparison to C or Basic, etc.

    To further confuse things, I'm certainly no MIDI guru, just have a keyboard MIDI'ed up to a 0-119 program change MIDI sound module (Meaning, the sound module is "OLD" too, LOL), all channel 1 stuff, and the sound module is MIDI mapped with sounds that I want to play when I pick the programs on the keyboard. VERY rudimentary setup. The keyboard is old enough that it is "dry", i.e., no effects on-board, so an outboard effects unit provides them - also MIDI mapped, like the sound module. When I want the sound module to NOT play (Just the keyboard should play), I have a sound called "blank" that is a sound with all the amplifiers set to "off" - so the module plays, but emits no audio output. That blank sound is MIDI mapped to all the locations in the sound module that I wish to not play, but are still picked via program change in the keyboard.

    Soooooo, I know I've got my work cut out for me.

    I was hoping to find a processor that would work off MIDI power because I have a particular place I wanted to mount this thing in my rig, and other power isn't as readily available there - although I could probably get it there without too much problem.

    I'm thinking that I only have about 3 or 4 fundamental hardware and software "techniques" to work out, the rest would be copy, paste, and edit, edit, edit!!

    Thanks for your welcome and response!

    Glenn M.
     
  4. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    From what I remember of the MIDI interface it just uses an optocoupler in and out of the processor, not much else. They usually run off 5 Volts, some work off 3.3 Volts so you could probably steal power from the MIDI circuit. Most of the people here would probably recommend you go with the 18F PIC series rather than the older 16F series. But either one would be OK for what you are doing. All the PICs are available in several memory sizes.
    The usual way to begin a project like this is to first determine what features you will need in the PIC. Mostly how many IO pins you will require. You will need a serial port for the MIDI in and out.
     
  5. Glenn M.

    Thread Starter New Member

    Jan 5, 2014
    7
    0
    Ahhh - I didn't even know about the 18F PIC series - something new I've learned for today... I'll investigate them.

    Thanks for the tip! I need to dig in on this project, learn about I/O pin and internal functions, etc.

    Edit:
    Just started looking at data sheets for some of the PIC 24F series - whew! I have MUCH to learn...

    Glenn M.
     
    Last edited: Jan 28, 2014
  6. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    Thats close the PIC is programmed from the computer through the ICSP pins. The serial port has a TX (transmit) pin and a RX (receive) pin. The RX pin would receive the MIDI commands from your keyboard, and the PIC would transmit the translated MIDI commands from the TX pin to your other devices. That is if im correctly understanding the way you want it to work. If you go looking at PIC datasheets they call a serial port a USART.
    PS the 24F series would be way overkill for what you are doing.
     
    Last edited: Jan 28, 2014
  7. Glenn M.

    Thread Starter New Member

    Jan 5, 2014
    7
    0
    Ya beat me to it! I deleted that because I realized I was incorrect... :( :rolleyes:

    I have soooooo much to learn, but for some reason, the more I dig into this, the more I think I can do it! I may just start out with a small starter kit just to get familiar, and then go from there...

    I was looking at the data sheets for the (Future) PIC32 family - think you could control a rocket ship with a couple of those...

    Thanks for your help!

    Glenn M.
     
  8. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    Yeah those have just about anything you could imagine included. I have only worked with the 16F series, a few years back I studied the 18F series I was planing to use some for a design I was doing for someone. But when I thought about it I stayed with the 16F series because he was going to need several processors and it would save him some money to use the 16F's. Everything the 18F's can do can also be done with the 16F's.
     
  9. Glenn M.

    Thread Starter New Member

    Jan 5, 2014
    7
    0
    So the advantage to the 18F's would be additional I/O and more memory??

    I haven't had time to look at the data sheets for the two families yet... Guess I'll be reading tonight! :p
     
  10. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    Not really, there are lots of parts in the 16F's with lots of I/O and memory. The 18F's have a larger instruction set which can make programming faster and easier, also the ram access can be made a little easier when programming. Others will probably jump in with other advantages of the 18F's. The 16F's are a bit cheaper but in your case since you are only building one unit cost isn't that important.
     
  11. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    I took a quick look at the MIDI spec today, I noticed they use an oddball baud rate of
    31,250 Baud. That's not a big problem for you it's just different.
     
    Glenn M. likes this.
  12. Glenn M.

    Thread Starter New Member

    Jan 5, 2014
    7
    0
    Thanks, Brevor. I'm for anything that means programming will be faster or easier!! :)
    I'm like a kid in a candy store with all these processors... If I can get this to work, I may have a use for another one. My diabolical mind is like that...
     
  13. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    Yeah once you use one all kinds of other ideas come up where they can be used.
    I wish I knew more about MIDI so I could be more helpful.
     
  14. Glenn M.

    Thread Starter New Member

    Jan 5, 2014
    7
    0
    You've helped already!!
    Thank You.
     
  15. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The oddball 31.25 Kbaud rate is not so oddball as it may look like. 1MHz/32 is equal to 31250
     
    Brevor and Glenn M. like this.
  16. Brevor

    Active Member

    Apr 9, 2011
    279
    54
    That was actually pretty fast when MIDI was introduced (1982), modems at that time were usually 600 Baud.
     
    Glenn M. likes this.
Loading...