I'm new to Arduino and I've been playing around with sound.
I just found this site http://jarv.org/files/midi-avr/arduino_all_piano_tones.html
It has a table for all the piano note frequencies. Now I see that those frequencies have a decimal.
example : C8 (Eighth octave) = 4186.01
But the tone() function only accepts an unsigned int as the frequency parameter.
Could I just drop the decimals and use the rounded values? Will this still sound good?
I've read ton's more about generation audio with an Arduino, including wavetable synthesis combined with envelopes, but for now I've realised that that way of generating sound is too complicated for me. So I'll settle with the tone() function and the Tone library that allows playing 2 tones at the same time...
Also if one presses a piano key, the sound it produces will fade out over time instead of abruptly stopping.
Is this possible to simulate this with the tone() function? Or does that require wavetable synthesis too?
Or could I maybe achieve some effect like this with a circuit at the output useing 555 timers/capacitators/whatever... ?
Thanks for reading & kind regards,