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 › proMIDI_sendNote() not working
Page Index Toggle Pages: 1
proMIDI_sendNote() not working? (Read 453 times)
proMIDI_sendNote() not working?
Feb 14th, 2009, 12:41pm
 
Hi,

I try to play my drum machine from Processing and all I want to do for now is triggering a note.

I use this example to trigger a sound:

import promidi.*;
MidiIO midiIO;
MidiOut midiOut;

void setup() {
 frameRate(25);
 size(200,200);

 midiIO = MidiIO.getInstance(this);
 midiIO.printDevices();

 Note note;
}

void draw(){
  int   Note;
  Note  note;



  if ( mousePressed == true) {
   
    midiOut = midiIO.getMidiOut(1,0);
   //I've set my drum machines midi channel at 1
   
    note = new Note(36 ,127, 1000);
   //36 is C1, the bass drum
 
    midiOut.sendNote(note);
   
  }
}

there's no error message but I just can't trigger any note.
I was searching some examples about this, but it seems that this is too simple to post a thread...

can anybody just show me a simple example of triggering notes??

thanks!
Re: proMIDI_sendNote() not working?
Reply #1 - Feb 14th, 2009, 3:34pm
 
ok.
i think there's a need of very important clarification in proMidi reference site.

getMidiOut(midiChannel, outDeviceNumber);

I'm sorry but this is perfectly non sense.

everyone in this world who doesn't have developer's mind count midichannel from 1 to 16 not 0 to 15!!

thanks a lot for this wonderful library but please be kind to beginners and note that somewhere if you can.

if some people can kindly share some proMIDI using example codes (anything will be very welcomed!) please please please please do so, as it's quite difficult to only referring to library examples...


Page Index Toggle Pages: 1