Maximizing the usage of PSG channels

Página 2/4
1 | | 3 | 4

Por Parn

Hero (652)

Imagen del Parn

02-03-2021, 12:22

I'd like to leave my two cents. @JohnHassink is being careful with his words here, but I'd dare to say typically games with FM music don't use the PSG for music, with a few notable exceptions. There may be many reasons not to use them both at the same time for music, including but not limited to:

  • Balance issues between FM and PSG (hard to predict whether the music will sound right on a particular system)
  • The PSG having only one noise generator (makes it harder to use it for both drums and sfx)

So it's all about compromises. You could even use the opposite approach: reserve all channels to music except for one FM channel, and use only internal FM instruments in your music, so you're free to use one FM channel for sfx based on custom FM instruments (and also have beautifully PSG-enhanced music).

Por Bengalack

Champion (406)

Imagen del Bengalack

02-03-2021, 12:47

Perfect. Thanks all!!! Exactly the insight as was wondering about. This makes things immensely clearer!

And as normal, it seems like one needs to dig deep down into (almost) full knowledge, and custom make a replay-system Smile

Parn wrote:
  • The PSG having only one noise generator (makes it harder to use it for both drums and sfx)

@Sandy Brand pointed this out as well. As a total n00b when it comes to sound, this sounds to complicate things for sure. Looking at register 7: https://www.angelfire.com/art2/unicorndreams/msx/RR-PSG.html... it seems like it controls all channels. So sending PSG data from different sources into PSG at runtime and "randomly" sending data to channel A/B/C, needs careful coordination. In addition to the other shared noise-data. Well, if I understand correctly.

Parn wrote:

You could even use the opposite approach: reserve all channels to music except for one FM channel, and use only internal FM instruments in your music, so you're free to use one FM channel for sfx based on custom FM instruments (and also have beautifully PSG-enhanced music).

Sounds like a good idea. But how good is the custom instrument equipped for good sound-effects? Bumps, crash, bling? I wouldn't know. I would anyway have to rely on help from others to get both music and sfx made (but I need to make it all possible). So far I have been using many sfx from the ayFX-library. Several suitable ones there. Does the equivalent exist for MSX-Music?

Por Bengalack

Champion (406)

Imagen del Bengalack

02-03-2021, 12:52

Sandy Brand wrote:
  • The 3 PSG channels all share the same noise generator wave type and wave frequency. So you will probably need to make a hard cut there: either the music controls the noise generator, or the sound-effects. Either choice will make things harder if you want to make good quality effects / music drums.

Great insight. But I wonder how arkos tracker 2 handles this, when they offer this simple "api":

Ld a,sfx number
Ld c,channel (0-2)
Ld b,volume (inverted 0-16)
call PLY_AKG_PLAYSOUNDEFFECT

(I seem to recall that programmers behind arkos tracker are on these boards from time to time?) Smile

Por JohnHassink

Ambassador (5587)

Imagen del JohnHassink

02-03-2021, 13:30

Bengalack wrote:

Sounds like a good idea. But how good is the custom instrument equipped for good sound-effects? Bumps, crash, bling?

I would say, very well equipped! Take, say, Aleste 2 for reference, that one makes good use of the OPLL for sound effects.
To be honest it never occured to me, but @Parn should be right, and this is probably the reason that this (and other) game(s) don't seem to use custom voices in their music.

Bengalack wrote:

Does the equivalent exist for MSX-Music?

Not that I know of. Maybe someone once tried to 'route' the data that ayfx files are sending to MSX-Music instead of PSG? To me it seems feasible - ofcourse it would need additional values (for voices), but I'm not 100% sure.

Por JohnHassink

Ambassador (5587)

Imagen del JohnHassink

03-03-2021, 03:14

Sandy Brand wrote:

Making good sound-effects is hard (or at least that is what I experience myself). Limiting yourself to just 1 or 2 PSG channels will make it even harder.

The 'key' is to keep the sound effects short. Long enough to matter, but short enough to not hog up the PSG channel(s) for too much time/ticks/interrupts.
IMO, a good PSG sound effect will typically use only one channel.

A lengthy sound effect will inevitabely, but unnecessarily so, screw with the sound registers. You will need a music replayer that collaborates with your sfx generator in a way that the music data written to the registers will pick up really quick after a sound effect is triggered.

Another good way to go is to only use the noise generator in sound effects when it's really, really needed (or, on the other side of the coin - avoid using white noise in your music, but that's quite the sacrifice).
You can make some pretty convincing sound effects without ever using the noise generator!

Sure, it also depends on the type of game you're making. Lots of explosions? In that case, preserving two PSG channels for the sound effects seems like a wise choice.
But as you already stated, those two channels are still going to interfere.
It's a matter of balance, I guess. Smile

Por Bengalack

Champion (406)

Imagen del Bengalack

04-03-2021, 10:09

Grauw wrote:

I’m a big fan of combining PSG with FM. The combination of square waves with FM gives a really nice sound, and using PSG drums can free up a lot of FM channels. But of course you need the right composition tools for it, and at least MoonBlaster isn’t it.

What is the best tool/toolset to make FM-music, possibly with PSG-support then?

I've been searching the net a bit, and, sadly, the OPLL seems a bit abandoned in general. After seing this nice video showing DefleMask I got exited as it listed *Sega Master System* as supported. I also thought that with a widely used tool like that, the number of available composers would increase significantly. Turns out, only the SN76489 PSG, and not YM2413 was supported :-(

Then I found VGM-Music Maker by Shiru. But discontinued, and removed from his pages :-(

The last I found, seems to be TriloTracker. Looks great, but sadly, the last release was 5 years ago :-( But maybe this tool is the right tool afterall?

Por JohnHassink

Ambassador (5587)

Imagen del JohnHassink

04-03-2021, 10:44

Bengalack wrote:

The last I found, seems to be TriloTracker. Looks great, but sadly, the last release was 5 years ago :-( But maybe this tool is the right tool afterall?

We're working to complete the final versions of TriloTracker (both the one for SCC as the one for FM).
Quite some new features and functionality, but with that, still some little issues that have to be ironed out. Basically, it's very near completion.

Por Grauw

Ascended (10074)

Imagen del Grauw

04-03-2021, 10:59

Maybe Bengalack could beta test it? Smile

Por Bengalack

Champion (406)

Imagen del Bengalack

04-03-2021, 12:07

JohnHassink wrote:

We're working to complete the final versions of TriloTracker (both the one for SCC as the one for FM).
Quite some new features and functionality, but with that, still some little issues that have to be ironed out. Basically, it's very near completion.

Nice! Sounds like *the tool* going forward. The often referred-to Moonblaster 1.4 released sources seems to be as old as 1997, so the tool is even older. That's a while ago :-) How does TriloTracker compare?

Por Bengalack

Champion (406)

Imagen del Bengalack

04-03-2021, 12:17

Grauw wrote:

Maybe Bengalack could beta test it? Smile

I could Smile but as you may very well have realised, my research into this area just cautiously started some months ago, and only from a technical perspective. So, not sure, but it would be hard for me to promise much oO

Página 2/4
1 | | 3 | 4