Saturday, January 24, 2015

Preparing to make music

Well, not music. It's more like making tones. These tones are going to be used for the various buttons for the Simon game.

In order to generate the tones, I went to http://onlinetonegenerator.com/, which allows you to generate several types of tones. I picked 440 Hz (A), 490 Hz (B), 554 Hz (C#), and 659 Hz (E). I got these values from http://www.phy.mtu.edu/~suits/notefreqs.html.

The files created by the tone generator are .wav files. But according to the Dummies book, it's better to use .ogg files. So I downloaded a program called Audacity. This was accomplished by running sudo apt-get update and then sudo apt-get install audacity.

I actually downloaded the files onto my laptop and then tried to transfer them over to the Raspberry Pi. This turned out to be more complicated than I thought it should have been. Originally, I had uploaded the files to Dropbox and used Midori on the Pi to try to download them. But the files never transferred despite multiple attempts. So after some hopping around on the internet, I found a program called WinSCP. After multiple failed attempts to install the program, I discovered that the default settings try to write to a directory that you need administrative access to get to, and that (for some reason) the program isn't set up to ask you for that permission. But I was able to install it in a different folder and that solved my problem.

And it was at this point that I finally opened up Audacity, and it turns out that it has its own tone generator. So all of the effort I just expended was kind of worthless. Interestingly, I couldn't figure out how to make a 0.5 second tone. I had to make a one second tone and then cut it in half. But in the end, I was finally able to create the .ogg sound files that I needed.

No comments:

Post a Comment