Hello,
I have converted piano samples from MIS [1] to be used with the Thymio.
These provide 85 good-quality samples (from C1 to C8 included). They are
available on the sound library page [2]. The archive contains the
conversion script, so feel free to convert other instruments as well. It
would be great to make a multi-Thymio orchestra :-)
I will soon update the musical-instrument example to use these sounds
(preliminary code in attachment if you want to play with).
The sound library is not in a very good shape: its updates in the
different languages lag and there are some sound archives spread around
the Wiki, for instance in the examples. Also, some archives are in the
.rar format which is not the most common format, it would be nice to
have all of them as zip files as these can be opened mostly anywhere.
Therefore, contributions are welcome!
Cheers,
Stéphane
[1] http://theremin.music.uiowa.edu/MIS.html
[2] https://aseba.wikidot.com/en:thymiosoundlibrary
--
Dr Stéphane Magnenat
http://stephane.magnenat.net
var min_value_sensor
var max_value_sensor
var note = -1
var red_table[] = [32, 32, 0, 0]
var green_table[] = [32, 0, 32, 0]
var blue_table[] = [32, 0, 0, 32]
var note_table[] = [12*3, 12*3+2, 12*3+4, 12*3+5, 12*3+7, 12*3+9, 12*3+11, 12*4]
onevent prox
call math.argbounds(prox.horizontal, min_value_sensor, max_value_sensor)
if max_value_sensor < 4 then
if prox.horizontal[max_value_sensor] > 3500 then
if note == -1 then
if acc[2] < 0 then
note = note_table[max_value_sensor]
else
note = note_table[max_value_sensor+4]
end
call sound.play(note)
call leds.top(
red_table[max_value_sensor],
green_table[max_value_sensor],
blue_table[max_value_sensor]
)
end
else
note = -1
end
end
_______________________________________________
Aseba-thymio mailing list
[email protected]
https://mail.gna.org/listinfo/aseba-thymio