Reproduce instrument tibre with PSG

Página 3/3
1 | 2 |

Por [WYZ]

Champion (451)

Imagen del [WYZ]

28-02-2023, 23:07

two cents more: not only instruments but sfx can be different at 50/60hz

Por aoineko

Paragon (1136)

Imagen del aoineko

28-02-2023, 23:56

What I have in mind (it's a long term project) is to add to the MSXgl library a light music format a bit like MIDI (instrument number + notes).
So, unlike SFX, I need the instruments to be compatible with different notes.
That said, I have the impression that there are a lot of tricks that allow to create a big variety of sounds, even with an ISR based update.

The difficulty is to have several instruments at the same time because it limits the use of the hardware envelope and noise as they are shared by the 3 channels. I would like to be able to allow 3 instruments at once and have the most classical ones: piano, guitar, trumpet, flute, etc. It would be a big strain.

An alternative that could bring much more quality, would be to dedicate the 3 channels to only one instrument. By mudulating over time 3 sound frequencies, the noise and the hardware envelope, there is probably a way to have something quite convincing. It might make for some nice solos.

Then, I guess it depends on the instruments. Some are probably easier to emulate than others.
For example, I don't recall hearing any ISR-based instrument that even comes close to the sound of a guitar.
Do you have an example?

Can someone explain the physical characteristics that make some instruments more difficult to emulate with the PSG square wave signal?

Por Grauw

Ascended (10821)

Imagen del Grauw

01-03-2023, 02:51

There are three main aspects to the sound of an instrument.

  • LFO amplitude modulation (attack, decay, sustain, release, tremolo, etc.)
  • LFO pitch modulation (pitch bend, vibrato)
  • Harmonic frequencies (overtones)

The former two you can change on the PSG, while the latter one you have very little control over, while it is the most important for instrument sound synthesis. (Pitch modulation is the least important.)

A square wave only has the odd harmonics, a sawtooth wave has all harmonics, and a sine wave has a single harmonic (the fundamental). Real intruments have various harmonics contents in different quantities, some are somewhat similar to these basic waveforms, e.g. a flute is mostly sine and a clarinet mostly square, but still they are different and most instruments will be very different.

In subtractive synthesis (e.g. C64 SID chip) you select a basic waveform oscillator and modify the harmonic contents with a filter to better approximate a certain tone. In FM synthesis (e.g. Yamaha FM chips) you can produce waveforms with varying harmonic contents through the phase modulation synthesis. And in wavetable synthesis (e.g. SCC) you have complete freedom in producing harmonics.

However the PSG has neither filters nor phase modulation. The only thing it can do, to a limited degree, is to apply amplitude modulation in the frequency spectrum (AM aka ring modulation) using the PSG’s envelope generator with high frequency settings. In theory, like FM, AM can generate different harmonic contents, though less effectively so. However the AM functionality on the PSG is limited in terms of frequency range, channels, waveforms, and synchronisation, so it can produce interesting results but I wouldn’t call it flexible.

So this means that in terms of similarity to real instruments, on the PSG you will get the best results for instruments whose harmonic contents are relatively similar to square waves (e.g. clarinet), with appropriate LFO modulation applied to them. And otherwise you’ll have to rely mostly on the LFO amplitude modulation to mimick the percussive and characteristics of the tones to give the impression of a certain instrument, rather than really sounding very much like it.

(In ways this “giving the impression” can be related to pixel art where a few well placed pixels can still make people recognise a semblance of a face or an object, even though if you zoom in it looks nothing like it. The same approach also applies to music synthesis. A classical piano piece can sound like a classical piano piece even if the timbre is really not very piano like.)

Por NYYRIKKI

Enlighted (6091)

Imagen del NYYRIKKI

01-03-2023, 07:45

About synchronisation... I know that with SCC you can sync two channels by using "undocumented" deformation register, but is there a way to sync two channels on PSG?

Por aoineko

Paragon (1136)

Imagen del aoineko

01-03-2023, 08:06

Thank you, this is very interesting. I'll review the theory.

Por Metalion

Paragon (1628)

Imagen del Metalion

01-03-2023, 15:33

aoineko wrote:

An alternative that could bring much more quality, would be to dedicate the 3 channels to only one instrument. By mudulating over time 3 sound frequencies, the noise and the hardware envelope, there is probably a way to have something quite convincing. It might make for some nice solos.

This has already been done, if I'm not mistaken.

Por aoineko

Paragon (1136)

Imagen del aoineko

01-03-2023, 19:49

ARTRAG and a japanese user (I can't remember the name right now) have both published ISR-based PCM replayer we can use to play nice sound but I don't know any tool that allow to have such "instrument". I mean sound we can dynamically modulate through notes.

Página 3/3
1 | 2 |