PSG guitar

Ever wanted to make one of those high-pitched guitars from metal, but struggle doing it with FM? Well, you can reasonably fake one using the PSG!

The basic instrument

Let's start with the basic guitar instrument we work from. It sounds like this (remember this guitar only works decently at high pitches):

Audio: PSG square wave guitar

The PSG instrument (in Echo's PSG format) looks like this:

90 80 01 01 FE 02 FF
A simple PSG instrument envelope, which starts at full volume then decays a bit. In the first two ticks, there's a small pitch slide upwards before settling on the final semitone (it starts -2 semitones down then slides up).

The decay part is just standard instrument fare (use whatever you're most comfortable with). The important trick here is the slide upwards in the first two ticks (the blue part): that's what gives the feeling that the instrument is more than just a plain square wave.

Note that it's also important to do it quickly (or it'll feel awkward). In this case it spends one tick at -2 semitones, one tick at -1 semitone, and then it settles on the intended note (where one tick is 1/60th of a second).

Adding vibrato

The above will work for shorter notes, but for longer notes it'll sound a tad too fake. In practice, you want to add some vibrato in the middle of a long note (do it at your own discretion, depends on each particular track).

Don't add vibrato to short notes, that only tends to backfire.

Audio: PSG guitar (longer note), with vibrato

If your sound driver natively supports vibrato for PSG (and doesn't eat lots of space in the process), just use that. Otherwise, we may need to fake the vibrato using more PSG instruments (by switching instruments when toggling the vibrato).

Here's the instrument for the vibrato (with a vibration of ±1 semitone, visible as the red and blue stripes in the envelope below):

FE 02 12 12 02 02 82 82 02 FF
The instrument goes base semitone, up one semitone, back to base, down one semitone, loop (waiting two ticks every time). The envelope is the already decayed part of the original instrument.

And here's an instrument to stop the vibrato (without the note attack):

FE 02 FF
Just the decayed part of the original instrument at the base semitone.