Author |
Topic: Storing and transmitting raw midi with a pic (Read 1543 times) |
|
simonneedshelp
New Member

 MIDI-OX Rules!
Posts: 2
|
 |
Storing and transmitting raw midi with a pic
« on: Feb 20th, 2006, 7:59am » |
Quote Modify
|
Hi, I'm trying to design a device which stores the MIDI info generated when a simple chord is held on a keyboard (via a UART on a PIC) and then transmits the info back to a MIDI device (such as a keyboard) which should then play the chord continuously until a reset command is sent out. Can anyone envision any problems i will have? A concern of mine is that problems will arise due to the 'snapshot' nature of the saved data. This means that no 'note off' messages will be saved etc. I need to know if it is possible to simply store the binary that is created whilst the chord is being held, and simply send that message back to the IN port of a midi device. If the same chord originally played is reproduced- it will be a success. (I what the reproduced chord to be free of time based effects or messages- the chord should sound until it is manually terminated. The programme, channel, velocity and note values need to be stored and reproduced) Any help would be greatly appreciated and appropriately credited in my final report. Many thanks
|
|
IP Logged |
|
|
|
Jamie OConnell
Administrator
    


Gender: 
Posts: 2027
|
 |
Re: Storing and transmitting raw midi with a pic
« Reply #1 on: Feb 23rd, 2006, 11:58am » |
Quote Modify
|
I don't see any problems with that approach.
|
|
IP Logged |
--Jamie Music is its own reward.
|
|
|
dayton
Member
 
 MIDI-OX Rules!
Posts: 15
|
 |
Re: Storing and transmitting raw midi with a pic
« Reply #2 on: Mar 15th, 2006, 4:34am » |
Quote Modify
|
It will work, but you have to remember a few glitches in the logical process. Let us imagine that you are using the same keyboard to play the chord as you are to hear the chord. You will: 1. Play chord 2. NoteOn values will be saved in the PIC 3. NoteOn values will be sent again to the keyboard 4. You will hear the notes being retriggered 5. You let go of the keys 6. NoteOff values will be sent (internally) to the sound-module 7. The chord will no longer play To avoid this, you either have to use a Master Keyboard which first sends MIDI to the PIC before reaching the sound-module and which ignores NoteOff commands, or you will have to first play (and hear) a chord, and then, after having let go of the keys, let the PIC play the chord. The PIC "turn off" command would then be the equivalent of the NoteOn commands but with velocity-bit == 0. A word about PIC's: you will need a PIC which is capable of operating at a BAUD-rate of 31250. This is different than standard UART BAUD-rates, and used to constitute a basic problem. Nowadays, most companies seem to be creating the chips to accept alot of various BAUD-rates, sometimes including 31250, but you will have to check. As long as you are using only 5v, you won't break anything with the wrong BAUD-rate, but it won't work. I haven't dealt with the problem for a while, but things can't have changed all that much. No need to worry about the "snapshot" quality of what you are doing; MIDI is simply that, a series of one-time events. You press a key, and the machine converts it into one single message. Have fun! Dayton
|
|
IP Logged |
|
|
|
|