jesusjimsa / drum-it-yourself-tfg Goto Github PK
View Code? Open in Web Editor NEWElectric drumset using sensors connected to the Raspberry Pi and Arduino boards.
License: GNU General Public License v3.0
Electric drumset using sensors connected to the Raspberry Pi and Arduino boards.
License: GNU General Public License v3.0
Solder cables to sensors to have protoboard far enough from the patches.
When hitting a patch, it makes a different sound depending on where you hit it and how strong the hit is. The program will have to take this into consideration.
Modify the Arduino program to read from two sensors at the same time and create a string with a similar style to this:
1:234:2:288
Where 1
and 2
are the instruments and 234
and 288
are the volumes.
The program in the Raspberry Pi must parse this string and generate the necessary values to call PressToPlay
requesting one of the combined sounds.
Add LEDs to every patch to learn songs. When a patch needs to be hit, the LED blinks. It will keep blinking until it gets hit.
malloc(): corrupted top size
make: *** [Makefile:19: run] Segmentation fault
The following warning is displayed when compiling the project.
src/play.c: In function ‘play’:
src/play.c:44:16: warning: pointer targets in passing argument 2 of ‘ao_play’ differ in signedness [-Wpointer-sign]
ao_play(dev, buffer, done);
^~~~~~
In file included from src/play.c:1:
/usr/include/ao/ao.h:119:23: note: expected ‘char *’ but argument is of type ‘unsigned char *’
int ao_play(ao_device *device,
^~~~~~~
Create web interface to start and stop the program to play drums.
For some reason, one sensor won't send data to the serial monitor, being random at which one it is each time the Arduino and the sensors are set up.
All sensors work properly, they have been tested in all analog ports. Cables are not the problem either.
Add an array with all sounds' paths to remove the long switch
in PressToPlay
. This will make the program faster and more readable.
Make remaining patches in wood with the correct size for the new sensors.
Right now, Arduino sends one line for each instrument. It chooses the one with the greater value and writes it in the monitor output. It can't read two at the same time so, when read in the Raspberry Pi, it only reads one, discarding the possibility of playing two patches at the same time.
0:0
0:0
1:446
3:812
0:0
0:0
0:0
0:0
1:446:2:0:3:812:4:0:5:0
0:0
0:0
This way, the Raspberry Pi would read the entire line and play the sound of the patches reporting a volume over 200.
Also, in the Arduino code, it should create the string adding the read value of the sensors reporting over 200.
After parsing the line, the Raspberry Pi will create threads for each instrument over 200 to play them as simultaneously as possible.
This new implementation would also allow the Arduino to get rid of the myMax
, maxSix
and combinedSound
functions, as well as the need of the combined sounds themselves.
Needs |
---|
#15 |
Add possibility to upload custom sounds using the web interface and play them instead of the default ones.
The readSerial
function is not reporting anything from the Arduino.
With the current implementation (7e7a736), the Arduino program reads from all sensors and chooses the maximum value to play the sound. If another sensor returns a value greater than 200
, it will look for the second maximum value by ignoring the already chosen.
This can cause problems in the situation when two sensors return the exact same volume. The program will return the maximum of the later sensor (from 0
to 5
, 5
has priority over 0
) and, when choosing the second one, it will ignore both values, making it seem like only one patch has been pressed when, in reality, two are being pressed.
Create remaining combined sounds and their volume versions.
To do:
Create high and low volume versions of combined sounds.
The README file in the repository needs to be updated to show something more than just TFG.
When calling the play
function from a new thread, it eventually creates a segmentation fault, after just two or three sounds can successfully happen.
No matter where the cable is placed, the Arduino always enters the if
dedicated to the first analog pin (A0
).
Save mp3 file with song played during a certain period of time.
Read from all necessary analog pins and send message when something is read from one pin.
When reading serial output, the program cannot read the mp3 file, the path is not saved correctly.
[src/libmpg123/readers.c:1184] error: Cannot open file Е�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file x]�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file xR�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file x��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �S�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ���snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file @��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �o�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file P/�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file `��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file 8&�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file H�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file pW�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
�snare_drum.mp3: No such file or directoryot open file �
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �ۙsnare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file P̙snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �z�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �i�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file P٘snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file @r�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file H�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file (e�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file H�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �&�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �S�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file x6�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file p�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file k�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file 0�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file x�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �l�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file x��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file @r�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ���snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file @j�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file Е�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file pB�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ��snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file h=�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file ���snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file `U�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file �O�snare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
[src/libmpg123/readers.c:1184] error: Cannot open file (јsnare_drum.mp3: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.