Go Down

Topic: Distance sensor to MIDI (Read 679 times) previous topic - next topic

SmallLarge

Hi,

I have 3 distance sensors connected to the arduino board, and I want to send their data as MIDI output through Arduino.

have used the program MIDI - OX and Roland serial MIDI to get the data as a MIDI file.

The only problem is that I get his error: "Roland serial MIDI Input: A device ID has been used that is out of range for your system."

Does anyone know what this means? Or can anyone help?

Here is the code that we used:

// command bytes
byte status_byte = 176; // control change on channel 1
byte cc_number = 0; // value for control number

// init transfer and operation values
byte data_send = 0; // stores outgoing byte for spi bus

// init looping and working values
int workPort = 0; // working value for outgoing port
int workAn = 0; // working value for analog input

// setup begins here
void setup() {
Serial.begin(31250); // open serial port
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
}

// main program begins here
void loop() {

for(int i = 0; i <= 15; i ++) // loop the following code 8 times
{
cc_number = 20 + i; // set control number to between 20 and 25 depending on loop iteration
Serial.print(status_byte); // send status byte
Serial.print(cc_number); // send CC number
Serial.print(data_send); // send data value
// loop back...
}
// loop back...
}

And the code that we got from this forum for the MIDI - OX program:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\VID_0403+PID_6001+A400
1drJA\0000\Device Parameters]
"PortName"="COM4"
"PollingPeriod"=dword:00000000
"ConfigData"=hex:11,00,3f,3f,10,27,00,00,88,13,00,00,c4,09,00,00,e2,04,00,00,\
 71,02,00,00,38,41,00,00,9c,80,00,00,60,00,00,00,34,00,00,00,1a,00,00,00,0d,\
 00,00,00,06,40,00,00,03,80,00,00,00,00,00,00,d0,80,00,00
"MinReadTimeout"=dword:00000000
"MinWriteTimeout"=dword:00000000
"LatencyTimer"=dword:00000010

Save as foo.reg

Can anyone help us?

Thanks!!

Daniel

hey

that's a Windows message telling you the IRQ or something similar is wrong for the midi card...
The message is not related to the Arduino code.
D

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy