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 1:49

Here's two ideas:
- Quickly switch between the frequencies. This probably sounds like shit once the frequency of switching becomes an audible tone itself. (10-20hz is probably an ok speed for less than 5 simultaneous notes)

- Mix the audio yourself, and then use the speaker to play a 1-bit representation of it (i.e. on when above zero, off when below zero). This will also sound like shit, if it even works with a piezo.

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