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 & HelpSound,  Music Libraries › The Midi Bus - inputs and triggering...
Page Index Toggle Pages: 1
The Midi Bus - inputs and triggering... (Read 983 times)
The Midi Bus - inputs and triggering...
Aug 27th, 2009, 9:56pm
 
Hi all,

I have an external drum machine inputting midi notes into Processing via USB - I can println the raw midi data but can't figure out how to convert that raw midi into something I can use (ie. place a 'get' to trigger certain effects when sending a 'd' midi note into Processing. I was wondering if anyone had successfully done anything like this? I must be missing something. There aren't many open midi projects online and it is difficult when all you have is a little knowledge about the overall concepts.

Thanks! Am constantly amazed by some of the skill level on this board.

-rb-
Re: The Midi Bus - inputs and triggering...
Reply #1 - Aug 30th, 2009, 5:14pm
 
Hmm it seems there are already examples of this using promidi up, so I might have to roll with that if nobody can help?

RWMidi looks great but I run into the same problem. The help files all seem to deal with midi outputs as opposed to the other way around.

Thanks,

-rb-
Re: The Midi Bus - inputs and triggering...
Reply #2 - Sep 20th, 2009, 9:13pm
 
This should really be quite straight forwards to do from the examples included in themidibus library ...

something like this:

Code:
import themidibus.*;

MidiBus bus;

void setup() {
 bus = new MidiBus(this, "MyInput", "MyOutput");
}

void draw() {

}

void noteOn(int channel, int pitch, int velocity) {
 if(pitch == 62) { //The D above middle C
   //Do something here
 }
}
Page Index Toggle Pages: 1