Pages: [1]   Go Down
Author Topic: [HELP] Arduino Midi Library - Program Change  (Read 1101 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I'm testing the MIDI Library for Arduino v3.2.

I've written this simple code to send Program Change messages thru a Midi Device (Its setup is correct)



#include <MIDI.h>

void setup(){
  MIDI.begin();
}

void loop(){
   
  for (int i=0; i<10; i++){
   
    MIDI.sendProgramChange(i,1);
    delay (1000);
  }
}


When I run Arduino the tx port works (led is on whenever midi message goes out) but the device reads only the first midi message.


How can I solve the problem?


Regards
 
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How can I solve the problem?
Perhaps by not assuming that the mysterious device that you are sending data to IS set up correctly. I see nothing in that code that looks wrong. If the TX light flashes once per second, the Arduino IS sending data. It would appear, then, that the problem is on the receiving end.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for your reply.

I've tried with this code:

#include <MIDI.h>

void setup(){
  MIDI.begin();
}

void loop(){
   
  for (int i=0; i<10; i++){
   
    MIDI.sendProgramChange(i,1);
    MIDI.sendControlChange(0,0,1);
    delay (1000);
  }
}


I've added this command: MIDI.sendControlChange(0,0,1) and all works ok.

I can write any send command and it works.



I don't understand why. I've checked settings of Midi Device and they seems to be ok...
Logged

Pages: [1]   Go Up
Jump to: