Set Sound Pitch

BlitzMax Forums/BlitzMax Beginners Area/Set Sound Pitch

Simon S(Posted 2005) [#1]
I see there is SetChannelRate, which alters the pitch of the sound relative to the pitch it's loaded at.

However I've got about 10000 sounds I've collected over the years, most of which are from my Amiga days so don't have any useful pitch info (it was lost when converted from IFF to WAV)

So is there a way to set a pitch in hertz when it's loaded, or at least find out what the pitch blitz set it to is so I can use SetChannelRate to get the pitch I desire?


TartanTangerine (was Indiepath)(Posted 2005) [#2]
In short, the answer is no you can not get blitz to recognise the pitch of a sound when loading it.

Pitch can not be determined from sample rate. Playback rate will have an effect on the pitch of a sound, doubling the rate will play the sound back 1 octave higher for example. Use a tool such as Sound Forge to determine the pitch of a monophonic sound.


Simon S(Posted 2005) [#3]
Agh! That's very awkward compared to previous versions of Blitz.

Would the modern stuff be more likely to have pitch and samplerate in the header of the WAV file? Even just the samplerate information would do, at least I'd have figure to work from to reach a desired pitch. Does it get stored in the WAV file header perhaps?


Simon S(Posted 2005) [#4]
Oh, thought of one other question while on the subject of sound. It seems LoadSound will load the entire ogg to memory.

Is there some way to make play direct from disk as it did with mp3/ogg under the old versions of blitz?

I suspect the answer is already no, but wondered if anyone had found a way of doing this.