midi parameters jumping erratically ( Newbie SORRY)
hi all
trying build midi controller have ten push buttons , couple of pots. interfacing ableton.
just started pot on own. i'm using midi usb converter cable. have 220 resitor in series pin of midi plugand have checked pin config.
i put ableton midi map mode, turn pot , seems pick ok. take out of map mode , pot looks controlling parameter apart fact thats jumping crazy irratically different values. these values coming from?
help please.
the code copyed below.
int val = 0;
int val2 = 0;
void setup()
{
serial.begin(31250); // default speed of midi serial port
}
void loop()
{
val = analogread(1)/8; // divide 8 range of 0-127 midi
midi_tx(176,1,val); // 176 = cc command, 1 = control, val = value read potentionmeter
delay(10);
val2 = analogread(0)/8; // control point 2
midi_tx(176,2,val2);
delay(10);
}
void midi_tx(unsigned char message, unsigned char control, unsigned char value) //pass values out through standard midi command
{
serial.print(message);
serial.print(control);
serial.print(value);
trying build midi controller have ten push buttons , couple of pots. interfacing ableton.
just started pot on own. i'm using midi usb converter cable. have 220 resitor in series pin of midi plugand have checked pin config.
i put ableton midi map mode, turn pot , seems pick ok. take out of map mode , pot looks controlling parameter apart fact thats jumping crazy irratically different values. these values coming from?
help please.
the code copyed below.
int val = 0;
int val2 = 0;
void setup()
{
serial.begin(31250); // default speed of midi serial port
}
void loop()
{
val = analogread(1)/8; // divide 8 range of 0-127 midi
midi_tx(176,1,val); // 176 = cc command, 1 = control, val = value read potentionmeter
delay(10);
val2 = analogread(0)/8; // control point 2
midi_tx(176,2,val2);
delay(10);
}
void midi_tx(unsigned char message, unsigned char control, unsigned char value) //pass values out through standard midi command
{
serial.print(message);
serial.print(control);
serial.print(value);
i think you'd better using serial.write() rather serial.print().
Arduino Forum > Using Arduino > Audio > midi parameters jumping erratically ( Newbie SORRY)
arduino
Comments
Post a Comment