for a project, I am trying to generate a sound by directly accessing a loudspeaker. I can send a one-bit signal to the speaker and I know how to generate simple sounds by controlling the frequency (due to the rectangular pattern of my curve, it sounds very artificial, but that does not matter).
I would like to do chords, too, though. It must be possible to generate those. What is the general idea behind doing polyphonic sounds with a simple speaker?
So how do I need to go about this if I can only control this one bit stream? Thanks in advance.
UPDATE: I now have four signals,
freq(3) down to
freq(0) that all carry a frequency.
For each of them, I have a signal
SE (for "sound enable"), which tells me whether that signal is currently active. I achieve that by a simple "AND", so that every signal is always zero if the corresponding
SE signal is zero and that it mirrors the actual frequency when
SE is set to one.
So, the remaining problem: How do I connect the four signals? Connecting them with "OR" is probably not good, because with four signals the output will almost always be one. Any suggestions?