Archived

This topic is now archived and is closed to further replies.

The_[PI]_ehT

Frequency calculation - howto?

Recommended Posts

I''m really stuck within this subject, so I need help! Does anyone know how to calculate sample data to a certain frequency (=note, i.e. A-4), speed, volume, or such? The thing is I want to use a sample as an instrument, so I have to find out how to play a sample in G-5 in A#-3 and such things, and of course how to mix several samples together. I did not find anything helpful on the whole net! A small link would be enough for the first! please help! pi~

Share this post


Link to post
Share on other sites

Look for information about mod/s3m/etc. trackers and players. hornet.org had a lot of good stuff before it was shut down, dunno if its still up(I mirrored and have it all CD .


The basic idea is this: You say that playing the sample at 11kHz produces C-3. Well, since the frequency and sampling rate are very coupled, you just adjust the playback rate(speed it up or slow it down). Well there are twelve notes in an octave, and a octave difference is twice the frequency. Treat sampling rate as the "frequency", note this makes C-4 22kHz. The way to figure any note involves a geometric series that doubles every 12 steps. You end up with the twelfth root of 2 as a constant, I think its like basefreq * (const ^ (note number)). Thats not exactly right, but thats the idea.

Share this post


Link to post
Share on other sites