Maker Pro
Maker Pro

Make square-wave sound better

wingnut

Aug 9, 2012
255
Joined
Aug 9, 2012
Messages
255
Hi all

I have a 555 timer circuit which produces musical notes.

Does anyone know of a simple way of improving square waves so that these sound richer? I don't know what to Google search for, because I cannot think of a name for the process of enriching square-waves so that these sound more like real musical notes.

I am hoping to add just a few electrical components to the 555's output to get a magically rich sound - or is that just a pipe dream?

Could a PIC perhaps be programmed to produce rich notes instead of square waves, and if so, what kind of an algor-rhythm would one use?

Thanks
 
Last edited:

Raven Luni

Oct 15, 2011
798
Joined
Oct 15, 2011
Messages
798
Technically you cant get any richer than a square wave since it is composed of the fundamental frequency and an infinite number of full magnitude harmonics (not to be confused with a discretely sampled wave which will show logarithmic magnitude drop off and linear phase drift towards the nyquist frequency but stretch out to infinity and the variance becomes zero).

When you say real musical notes, which instrument did you have in mind? There are countless ways in which you could vary a tone to approximate different instruments. Volume envelope, vibrato, reverb, low and high pass filtering,....noise addition.........

Synthesis is what youre after. It's a whole scene in itself :)
 

wingnut

Aug 9, 2012
255
Joined
Aug 9, 2012
Messages
255
....(not to be confused with a discretely sampled wave which will show logarithmic magnitude drop off and linear phase drift towards the nyquist frequency but stretch out to infinity and the variance becomes zero).

That is beautiful Raven, pure Shakespeare, even though I am too igorant to understand its deeper overtones ;)

When you say real musical notes, which instrument did you have in mind? There are countless ways in which you could vary a tone to approximate different instruments. Volume envelope, vibrato, reverb, low and high pass filtering,....noise addition.........

Synthesis is what youre after. It's a whole scene in itself :)

Currently the closest it sounds like, is/are the bagpipes, so I wouldn't mind it sounding more fully so.
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
A square wave contains only odd harmonics which sound rough.
Early electronic organs generated a 'top octave' and divided this down by two, four etc to get lower octaves. By sounding the note and the octave(s) above, then even harmonics were added which sounded better. The second harmonic was at half amplitude and the fourth at quarter amplitude.

I went to a wedding in scotland not long ago. They had a bagpipe for entertainment, the person playing was a south african!
 

Raven Luni

Oct 15, 2011
798
Joined
Oct 15, 2011
Messages
798
You learn somethign new here every day :) . In my ignorance I had assumed even harmonics were the result of rectification and therefore not really important / desirable
 

KJ6EAD

Aug 13, 2011
1,114
Joined
Aug 13, 2011
Messages
1,114
The simplest way to improve the sound is to create polyphony by applying the same control voltage to several 555 circuits then sum the outputs into an amplifier. The component value tolerances will produce enough pitch variation. You might try using 556 or 558 chips.

Another variation would be to create even multiples of the base frequency (octaves). Two, three or four octave polyphony should be rich enough. This is what Duke37 was suggesting.
 
Last edited:

wingnut

Aug 9, 2012
255
Joined
Aug 9, 2012
Messages
255
Thanks a lot for the feedback.

I have added another 555 timer with the exact same components as the first, and combined the output of both to an amp. It definitely sounds richer (less anoying) than a single square wave.

Using a 555 calculator, I see that if I wish to double the frequency, all I have to do is half the capacitance and this will give one octave higher. Sounds easy enough. Will try it later.

Duke, I like bagpipes (in moderation), but especially like them when accompanied by a marching band of kilted up Scotsmen. It kind of stirs the blood. We don't see that often enough here. It must be a prohibitively expensive musical instrument, but cheap as anything to synthesise on a keyboard.
 
Top