The ringing in my ears would not let me sleep tonight. So I decided that I needed to do something about it. I remembered a friend of mine told me about how you can make your own therapy for this by trying to match the pitch of your tinnitus with a sinusoidal oscillator and listening to the sound it generates.
That same friend talked to me about a digital sound processing and generation language called ChucK. I was trying to find some time to learn this language but was always very busy with school, work, winter depression, a few very important issues and lots of problems that are not problems. Well, tonight I had some time since I could not sleep.
I installed the chuck interpreter (pretty easy if you follow the instructions in their readme file) and started to read their documentation. It is super easy to learn. Maybe later I'll write about the other stuff I learned tonight. But for now, it'll take you 2 minutes to search the documentation and write this program:
========================================================
<<< "freq:", freq , "step :", step >>>;
Math.max(freq-step,30)=>freq;
Math.min(freq+step,24000)=>freq;
Math.max(step*0.5,0.00001)=>step;
=========================================================
Nothing too exciting. Just use the up and down arrows to change the frequency of the oscillator by some step size. To change the step size, use the left and right arrows.
I found very exciting to determine the frequencies of the ringing in my ears. You find these frequencies while scanning through the auditory range (from 20 Hz to 20 KHz). Once you have that figured out, you can apply notch (band gap) filters at the frequencies of your tinnitus to music tracks and listen to them. This will help in reducing the loudness of the tinnitus. In the next hours I'll try to see if I can do that directly on ChucK; i.e. passing whatever sounds are going to the soundcard to chuck, filter those sounds, and send them to the output again.
So, although my ears are still ringing, I am very happy that I can work on my own therapy with my laptop. I am also very happy that I decided to learn ChucK, because sleeping is too boring anyway.