Basically I've built a simple circuit that outputs a square wave of different frequencies (i.e. a DIY tone generator), but it obviously sounds very robotic. Are there any small, simple devices that could take an input of a certain frequency and output something that sounds more like an instrument? Like a single note played on a piano or a bell corresponding to the frequency input. This is just a simple DIY side project so I'm trying not to have anything too large or expensive.

I know very little about electronic sound generation so sorry if this has an obvious answer; I haven't been able to find anything through google.

  • 3
    This probably would be a better fit for dsp.stackexchange.com or electronics.stackexchange.com – Tetsujin Jun 7 '19 at 17:23
  • 1
    You're doing the wrong search. A Google search for "sound synthesis" turns up lots of articles – PiedPiper Jun 7 '19 at 20:32
  • 1
    The question as asked does not make a lot of sense. The "square" wave will have some harmonic content. An "instrument" will have some other harmonic content. You cannot make one sound like the other except to alter the first so that it is no longer a square, which defeats the point. – ggcg Jun 7 '19 at 22:51
  • 1
    @ggcg as I read it, rather than defeating the point, that is the point? Perhaps hard to do with something small/simple though. – topo Reinstate Monica Jun 8 '19 at 9:18

More electronics than music but try playing with some capacitors. In parallel with the load, these could dampen the high harmonics of the square wave and round off its edges. A variable capacitor would let you play with the effect. You'd need to judge yourself whether your existing circuit would tolerate this addition. Start with a small value capacitor and work up until either you get the sound you want or your circuit burns out.


My thought would be....what if you add many square waves together?

What sound would you get?

Try your circuit with many different parameters added together.

I believe, most instruments make sounds more like a sine wave but with many harmonics.

  • 1
    Needs, at minimum, an envelope generator. Still way off-topic for here. – Tetsujin Jun 7 '19 at 18:58
  • 1
    @Tetsujin "describe the required function and setting in which the equipment will be used, and ask what you should look for to achieve that" is one of the equipment question formats allowed here - does this not fit that, in your opinion? – topo Reinstate Monica Jun 7 '19 at 19:32

You may want to look into audio-to-MIDI conversion. If you can convert your square wave to a stream of MIDI events, you can then use that stream to drive a more sophisticated MIDI synthesizer (e.g. something sample based).

Another way to go would be to do a search for "convert voice to instrument", which will bring up a few apps that are designed to that - maybe some of them might work with your square wave?

Of course neither of these necessarily satisfy your 'in a simple circuit' criteria, but I think the answer to whether there is anything simple on the electronic that can transform a square wave into a natural instrument sound is probably 'no'.

One thing you could do though is add something on the acoustic side - so you could have a transducer being driven by your square wave in turn driving a reverberating plate inside a large tube, or something like that - something to add some extra resonances and reverberation. It wouldn't sound like a piano but it might sound a bit less robotic.

Not the answer you're looking for? Browse other questions tagged or ask your own question.