Hi,
Is an 8MHz internal RC oscillator fast enough for MIDI to work? (PIC16F88)
The MIDI element reads in 3 bytes. Looking on a scope the level info I want is in a 4th byte. Is it possible to modify rhe custom code to read in a 4th byte please (C not my strong point).
Thanks,
Dave
MIDI questions
Moderator: Benj
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: MIDI questions
Hi,
Here is the programming strategy pdf for you..it has solution of your most of the questions..
Here is the programming strategy pdf for you..it has solution of your most of the questions..
- Attachments
-
- MIDI Programming Strategy.pdf
- (46.88 KiB) Downloaded 389 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: MIDI questions
I think you should be fine at 8MHz or 2MIPs to send and receive MIDI but it really depends on what else your program is doing.Is an 8MHz internal RC oscillator fast enough for MIDI to work? (PIC16F88)
If possible I would move the receive signal to an interrupt pin and enable a falling edge interrupt in flowcode. Inside the interrupt macro add a component macro call to receive the incoming MIDI message. This should improve your chances of catching all the incoming data. Circular buffers could be employed if needed to ensure messages coming in close together are cought and processed.
The v4 MIDI component uses an older version of the software UART code so it may need tweeking slightly to get it to receive 100% reliably. If you have any problems receiving or transmitting at the correct baud then let me know though I think there may already be a few posts about v4 and software RS232 or UART baud tweaks. You may also have to tune your RC oscillator slightly to give you a more accurate baud if you are having problems.
Is the 4th byte possibly a second command? I was under the impression that MIDI messages were 3 bytes in length max though it's been a while since I last played with MIDI. Would receiving two messages and processing the second fix the issue?The MIDI element reads in 3 bytes. Looking on a scope the level info I want is in a 4th byte. Is it possible to modify rhe custom code to read in a 4th byte please (C not my strong point).
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: MIDI questions
Thanks for that guys. The output of the midi drum pad I have is 60 bits, possibly 64 if the last 4 are 1's. The pressure data appears to be around the 4th byte i.e. if you hit the pad with various intensity these bits change.
I thought that midi was 3 bytes as well but this must be compatible somehow. Due to lack of time (another "urgent" job!) I will have to rectify the audio out and feed that into an analogue input instead.
Shame really as the data is already in digital form, just not simple to get at.
I thought that midi was 3 bytes as well but this must be compatible somehow. Due to lack of time (another "urgent" job!) I will have to rectify the audio out and feed that into an analogue input instead.
Shame really as the data is already in digital form, just not simple to get at.