StringTunerDS is a Nintendo DS homebrew useful to tune guitars and other musical instruments.
It can detect a sound's pitch and display the corresponding tone and octave.
It can work in autodetect mode or it's possible to select a target frequency.
When StringTunerDS works in autodetect mode it displays the detected pitch.
The target frequency can be setted selecting the target tone and octave or choosing the instruments (guitar or bass), the tuning mode and the string to tune.
The base frequency for A can be setted between 435 and 445 Hz (440 Hz at default) and is possible to generate the target sound (this function is not enabled in autodetect mode).
For properly operations StringTunerDS require a good input signal level. During my guitar tuning I achieved the best results tuning it without using plectrum.
Technically speaking the algorithm for pitch detection and tone determination are based on Tuneroid open source project. I take inspiration from that project also for the display look and feel.
Pitch detection would be better using algorithm based of Fourier transformations but in that case I fear that execution would be slower. StringTunerDS is not a professional instrument even if it work fine if the input signal level is good.
Regarding the DS, this homebrew use microphone, with some code from the precious micdemo and some settings from DSOrganize.
The DS is used with processors working in parallel: ARM7 performs sampling and ARM9 processes the waveforms and updates the display. Sampling occurs at 12bit, 44.1KHz using 210 msec. intervals.
For render characters on intro screen and display I rebuild for the DS environment the FreeType open source project (release 2.3.6), the library is included in source code. If you reuse it pay attention that many common fonts are patented; there are many sites, like acidfonts.com that hosts a lot of free fonts.
The rest of the code was written using the interesting tutorials that I found on Internet.
I hope that this homebrew can enjoy you and sources can satisfy some techincal curiosity and stimulate some considerations about the magic that link music and mathematics.
Click on this link to download the .nds file (584 KB).
Click on this link to download the source code (2.25 MB).
If you have suggestions, messages or considerations can contact me at this email address: email@example.com
StringTunerDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.