Turbosavski / PS2MIDI

PS/2 protocol and devices as midi interfaces: computer keyboard, mouse, touchpad
http://www.ljudmila.org/~savskib/?p=979
4 stars 0 forks source link

Arduino Leonardo #1

Open lmeucchi opened 4 years ago

lmeucchi commented 4 years ago

Hello, first thank you very much for sharing your code .... It seems that you spent a long time writing it, I could not understand many things jajaja but I want to do a test before putting it together.

I only have an arduino leonardo and a Synaptics TM-P2970 mousepad, is it possible to make it work without EEPROM and LCD?

I just have to change the connection pins on these lines?

define PS2_CLK 6 // 5, touchpad ps / 2 clock pin T11

define PS2_DATA 5 // 6, touchpad ps / 2 data pin T10

define LEDPIN_RED 10 // red - for midi out traffic

define LEDPIN_ORANGE 16 // orange to show AI selected

define LEDPIN_GREEN 14 // green for device powered and status ok

define MODEPIN 15 // switch live between SI and AI

define MIDIPIN 18 // A0 // switch live between DIN and USB midi out

is there any video?

thank you

Turbosavski commented 4 years ago

hi, eeprom and lcd are optional - not yet implemented (i think they are commented out in the code). You only need to connect the mousepad ps/2 wires - no leds / no switches. Left mousebutton acts as pedal, right mousebutton acts as chord - both pushed change the tonal scale (randomly). Should be no problem to test the whole code via usb. No video, since this is not a diy project. But there might soon be some audio album, since the prototype (acting as midi touchpad piano) is quite actively used. I think Leonardo and Promicro should have same pin definitions - but check anyway. SI mode is for now the only mode - meaning that tonal increments are from lowest notes on left-bottom and highest on top-right side of the touchpad. Quite some fun!

lmeucchi commented 4 years ago

hi, how are you? I connected my trackpad to arduino Leonardo, using pins 5 (data) and 6 (clock) ....

I changed this lines: 48 - bool usbmidi = false; 51 - bool midibaudrate = true; `
by

48 - bool usbmidi = true; 51 - bool midibaudrate = false;

I also put a led to pin 10 for midi out traffic When I touch the pad, the midi led turns on correctly, indicating that it is sending data, but the laptop does not receive midi messages (I tested it with MIDI-OX and Kontakt software).

Then change the above lines to send midi to DIN 5 ... that's when it started to work ... but the notes are sustained, when I touch the pad the notes are continuously sounding. I tested the trackpad with a simple sketch to view PS/2 data with the serial monitor and it works correctly on all axes.

Another comment I want to tell you, my trackpad is a Synaptics TM-P2970 it has a single button on the pcb in the center, when you touch the pad in the lower left corner, the center button is operated and the pad recognizes that it is the left mouse button ... the same goes for the right side. In the serial monitor that I told you previously, these changes also recognize them, but in your code via midi DIN 5 it does not work for me. Thank you very much

Turbosavski commented 4 years ago

The code is basically made for midi sound bank module, since my interest was only the piano sound. The midi communication in this case is via Tx pin (Serial1). Pro micro and Leonardo usb communication is defined as Serial. Apart from that you are pretty much on your own with this code & your hardware. My touchpad was from some sony vaio from around 2000. Cheers!