Go Down

Topic: YAAMI-DRUM, a 52 analog inputs trigger-to-midi drummachine (Read 6 times) previous topic - next topic

chloris

#5
Mar 11, 2012, 03:23 pm Last Edit: Mar 11, 2012, 03:26 pm by chloris Reason: 1
Hi,

there's a new version which is  compatible to Arduino IDE 1.0 and the recent Pololu lib -> http://www.pololu.com/docs/0J19 . You can download it here->

http://sourceforge.net/projects/yaamidrum/files/

Have fun!

johnnypig

#6
Mar 11, 2012, 09:09 pm Last Edit: Mar 11, 2012, 09:10 pm by johnnypig Reason: 1
Hi,

This looks very fun but for the life of me I can't get any midi output over the TX pin into my pc nor with TTYMIDI in ubuntu or windows.

I have an Arduino Uno rev3 and the Mayhew MUX shield using Arduino IDE 1.0 and your latest YAAMI 1.2.

Serial monitor shows some random characters and nothing registers when I smash on a piezo.

Any help would be lovely!

Thanks :D




chloris

#7
Mar 17, 2012, 10:55 am Last Edit: Mar 17, 2012, 08:18 pm by chloris Reason: 1
Hi johnnypig.

Using TTYMIDI requires to change the baudrate from 31250 to 115200. Then start TTYMIDI with a line like this ->

Code: [Select]
ttymidi -s /dev/ttyACM0 -b 115200 -n yaamidrum -v

Change the tty device to what your os uses in /dev (maybe /dev/ttyUSB0).

For debugging you have to alter some lines of the .ino code like this

Change
Code: [Select]

//Serial.begin(9600);                                   // connect to the serial port 9600 (for debug)
//Serial.begin(57600);                                  // connect to the serial port 57600
Serial.begin(31250);                                 // connect to the serial port (31250) //midi standard
//Serial.begin(115200);                                   // connect to the serial port 115200

to
Code: [Select]

Serial.begin(9600);                                   // connect to the serial port 9600 (for debug)
//Serial.begin(57600);                                  // connect to the serial port 57600
//Serial.begin(31250);                                 // connect to the serial port (31250) //midi standard
//Serial.begin(115200);                                   // connect to the serial port 115200


and

Code: [Select]

void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY)
{
 status = MESSAGE + midichannel;
 Serial.write(status);
 Serial.write(PITCH);
 Serial.write(VELOCITY);
}


to
Code: [Select]

void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY)
{
 status = MESSAGE + midichannel;
 Serial.write(" Status=");
 Serial.print(status,DEC);
 Serial.write(" Pitch=");
 Serial.print(PITCH,DEC);
 Serial.write(" Velocity=");
 Serial.print(VELOCITY,DEC);
}

Make shure that the baud rate in the serial monitor window of the arduino ide is set to 9600.

How did you connect your piezos to the shield? It is important that you have to connect ALL inputs of the shield to piezos or you have to bridge the free inputs. You can simply use a small wire to connect the inner and outer inputs (not the middle) of the shield if there is no piezo connected to it. Otherwise it won't work.

Now it should work and hitting a piezo should result in various numbers in the serial monitor window. Please let  me know the result cause I don't actually have the possibility to test the code on an Arduino Uno rev3.

Feel free to insert a switch in the code that decides if u debug or write the midi notes to serial out.



Thanks.

johnnypig

#8
Mar 23, 2012, 06:09 am Last Edit: Mar 23, 2012, 06:17 am by johnnypig Reason: 1
Thanks for your reply. I do have all the pins grounded and my piezo is on pin0 of the shield. I tried other inputs at random but there's no output except occasionally it will say something like this: "Status=144 Pitch=42 Velocity=70 Status=128 Pitch=42 Velocity=127" but not in response to hitting the piezo. That's using your debug MIDI message code at 9600 baud.

It's strange and maybe Uno Rev3 doesn't like the Mayhew MUX shield, although it does work with the analog in test code from their site.

I'll order a Duemilanove to play with next week and try it out again.

chloris

Hi johnnypig,
Quote

I'll order a Duemilanove to play with next week and try it out again.

I wouldn't do that. There must be something wrong with your hardware setup.
How is the piezo connected to your shield exactly? Can you give some information about your Setup, Arduino Ide, OS, Midi  etc.?

Thanks.


Go Up