Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Mixing Frequencies

Name: Anonymous 2006-06-25 1:26

Hey, just for the hell of it I wrote a small program to play MIDI files over a PC speaker. Specifically a piezoelectric speaker that can only play a single frequency at a time (no PWM for me :/).

I'm still working on it but I have something that vaguely resembles the MIDI coming out of the speaker. 'Cept it only works on a single channel at a time because the piezo speaker can't play polyphonic sound (in PC's as far as I know).

Does anyone know a good method to combine frequencies to produce a good approximate sound. Given how people percieve pitch I was hoping somebody knew a function that woould combine frequencies to produce the best 'precieved average' or something of the sounds. That way I might be able to combine multiple channels to make a better sounding playback.

Posting here because its a program I'm writing and I figure the general knowledge level in here is higher than /music/.

Name: Anonymous 2006-06-25 3:08

>>2
One idea I was thinking I could use, that would also allow me to play any music file, is to do a Fourier Tranform on samples of music and then take an average of the higher amplitude frequencies to get the average frequency. Unfortuantely, it's pretty far beyond what I know about mathematics so I can't quite figure it out. I've got FFTW library linking into a small application but I am having trouble using it since I don't know which tranforms (r2c, r2r?) to use and to format/interpret the input and output.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List