We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › using processing to get midi data from serial port
Page Index Toggle Pages: 1
using processing to get midi data from serial port (Read 429 times)
using processing to get midi data from serial port
Jun 23rd, 2007, 5:56pm
 
hi all,

to be honest, i haven't started using processing yet... but it occurred to me that someone here might be able to shed some light on this.

i want to try wiring the midi out of my keyboard directly to my PC's serial port.  nothing but an optocoupler - no PICs or other fanciness.

do you think it would be possible to use processing to make a program to analyse what's coming into the serial port, then send it on to another app (ie, a virtual synth) as meaningful midi data?

yep - this is potentially going to save me $20 of my hard-earned cash that would otherwise be spent on a cheap USB midi connector.  BUT.  i'd like to give it a go, if not for the money then for the challenge, and the knowledge that others will be able to make their own homebrew midi interface without any knowledge of how to program a PIC (like myself...)

my initial thoughts on the matter are that you could run a serial port as fast as possible, and use simple division to up-sample (or is it down-sample??) the midi data streaming in from the midi keyboard at 31250 baud.  perhaps you could emulate a serial port on a USB, thus allowing much higher speed (and less chance of errors).  i have no idea how to do this, nor how to circumvent certain parts of the USB protocol like manufacturer IDs and all the other initialisation nonesense that goes on whenever you plug something in to a USB port.

does this make sense?

i'd love to hear any ideas - and please disregard the apparent futility of this project.  and my electronics ignorance...

love, jon.
Page Index Toggle Pages: 1