Hi :D this is my latest project...a wirless piano using an Ultrasonic ping sensor hooked to an Arduino...
Ultrasonic Ping Sensor->Arduino->Serial->MRL->JFugue-> Musical Note
Sensor measure how far is my hand and send distance in cm over serial connection using Arduino...
MRL receive the distance using serial service and if the hand is at less than 20 cm from the sensor, play a 'A' musical note using JFugue service
TODO : more musical notes
[[JFugue.pingPiano.py]]
Ahahahahaa ! :DAwesome
Ahahahahaa ! :D
Awesome Alessandruino !
This is great ! Lets add more notes, and make it more snappy ! Ooooh Drums too !!!
You are Beethoven ! Ahaha :D
Ok - what's the formula conversion for the value of the long = cm for this ping sensor?
It looked pretty quick response ... what do you think?
ya...response is very
ya...response is very quick.... :D
Here is the Arduino Code :
JFugue 5.0.7
I found that the classpath in Eclipse was using 4.0.3 but the dependency in the JFugue service showed 5.0, so JFugue would not install unless used from Eclipse.
First I tried to use JFugue from Eclipse, but no sound. Doh.
So I started to dig. Two routes possible:
1. Upgrade the repo and the classpath in Eclipse to use JFugue5.0.7
2. Change the dependency in JFugue to version 4.0.3 so that using Eclipse and installing myrobotlab.jar would be consistent.
It tried the first alternative: Downloaded latest JFugue-5.0.7.jar and put it to the repo, changed the classpath and compiled. Still no sound in Eclipse.
Then I tried to download the same JFugue-5.0.7.jar to my Raspberry PI and created a small testprogram. That worked better and I could get JFugue to play som tunes. I used the examples and the BlueJ IDE to make a small testprogram. I tried several examples from http://www.jfugue.org/ and the work.
So I tried to update MRL in Eclipse to use the JFugue-5.0.7.jar. I had to make some small changes because the name of the methods had changed in the include, but I could compile without errors, but still no sound in Eclipse.
So I pushed the changes and Travis started to build. Doh. The JFugue-5.0.7.jar was built with a newer compiler than the one MRL uses. So I had to revert the changes.
So currently JFugue works, but with version 4.0.3.
I can't get sound when using Eclipse, but it works fine when downloading myrobotlab.jar. I can get sound in both Windows 10 and Raspberry PI. I also played around a bit with JFugue on the PI. Works well.
Two problems remain:
1. I can't get any sound when using it in Eclipe. Anyone have the same problem ? Any clue to what the problem could be ? I get sound when using JFugue examples with the downloaded myrobotlab.jar but not from Eclipse.
2. If I try to use the latest JFugue-5.0.7.jar the build fails because it is compiled with a later compiler than Travis is using. So either the JFugue-5.0.7 has to be rebuilt with an older compiler, Travis be updated to a later version of the compiler, or we stay with version 4.0.3.
https://travis-ci.org/MyRobotLab/myrobotlab/builds/174370862
/Mats
fridge located at 265 cm :D
fridge located at 265 cm :D
WoooHooo - full range worky
WoooHooo - full range worky !
Here are some other things you can do with JFugue..
jfugue.play("C D E F G A B"); # can play sequence