Maximizing the usage of PSG channels

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

Por Bengalack

Champion (394)

imagem de Bengalack

01-03-2021, 21:38

Would be great if someone could confirm whether my thinking is wrong or right.

For a given game: First I thought, I will have the music in MSX-Music, and sound-effects in PSG. I already have ayFX-player implemented.

But thinking about it, it seems to me that ayFX is generating sound-effects for one channel only. The current ayFX-replayer I have seems to only use (in pratise) one channel, as well. Every running effect is cut off if a new effect is run. So... not utilizing what is there?

If this is the case, I should either modify the replayer to spawn each new effect in it's own channel (round-robin). Or I should possibly use 1 channel for ayFX-effects, and set aside 2 channels for drums-or-something which maybe some composing tools would like to combine with MSX-Music? For example I see this vgm using both PSG+MSX-Music: https://vgmrips.net/packs/pack/aleste-msx2-opll

Question then, is whether composing programs are ok with using only 1 or 2 channels of the 3 PSG. Found this image of moonblaster, and this tool references "PSG drums", so I wonder how this works...

Am I on the right path here, or have I misunderstood?

Entrar ou registrar-se para comentar

Por aoineko

Master (163)

imagem de aoineko

02-03-2021, 00:50

The ASM ayFX replayer have to options :
- SFX use 1 fixed channel.
- SFX switch channel each frame.
According to code comment, the second feature was created to "limit the impact of SFX play over a music" but it don't work well in my opinion (SFX sound weird and music still impacted).

In my C version of the replayer, I added an option to switch channel not each frame, but at each SFX play.

That said, no matter which option you choose, only one SFX is processed in each frame.

To do what you're talking about, you're going to need to deeply modify the replayer imho.

Por thegeps

Paladin (849)

imagem de thegeps

02-03-2021, 01:01

You can use arkos tracker. In your code you can set sfx in the channel you prefere and you can set its volume too:
Ld a,sfx number
Ld c,channel (0-2)
Ld b,volume (inverted 0-16)
call PLY_AKG_PLAYSOUNDEFFECT
This only set the sfx. It will be played when the replayer is called (every frame). There is a replayer sfx only too

Por Bengalack

Champion (394)

imagem de Bengalack

02-03-2021, 10:03

TL;DR: How to know how many, or which PSG-channels are used when making music together with MSX-Music? What is typical?

Thank you @aoineko and @thegeps. You guys are confirming several things. One thing is that a sound effect always/often is one channel. I actually have always thought that the coolest effects have been made up of several channels. Not the case, or at least, it does not have to be the case. Good. This means that I should have two spare channels left. Either I use these two for effects, or I use them in combination with music, hence the music/composer question.

As a typical case where I want to play several effects at the same time: In my game, when the herione is collecting coins in abundance, the "blings" comes rapidly, but sadly each effect is cut off by starting a new, it would (presumably) sound better if I spawn off every new sound effect in a new channel (and also, continue previous channel-effect(s)). Sounds like this must be done by some modifications in ayFX-replayer, but already supported by arkos tracker. -It just sounds overkill to use a full tracker just for the sound-effects, as confirmed in the last section on this page: http://www.julien-nevo.com/arkostracker/index.php/sound-effe...

That said - arkos tracker 2 really looks *fantastic* for PSG!

If someone can shed som light on whether the music software "normally" lays bonds on all three channels or not? I guess Moonblaster is most interesting, as I found MuSICA-information here, and it seems like it is up to the composer to chose which channels to use, https://www.msx.org/wiki/MuSICA. But over to Moonblaster again, this page: https://www.msx.org/wiki/Moonblaster says "For MSX-AUDIO and MSX-MUSIC, also minimal PSG support"

I see that the drums/drumset in moonblaster uses PSG: https://www.msx.org/wiki/Moonblaster_file_format

$0148 15     Drum set-up MSX-MUSIC/PSG
025-027      Change Drumset MSX-Music

And for the drumkit:

header:
       00-56	   Sample start address (16 bit per sample, 14 samps)
data:
       57-xxxx	   ADPCM data

I can't read any PSG usage in here oO So far ADPCM is listed as an MSX-Audio-feature, and explicitly listed as not-supported on MSX-Music. So I presume this drumkit is not related to "drumset" used by PSG. Or is it? I read from this page that PSG can play PCM-samples, as demonstrated in Aleste 2: http://map.grauw.nl/articles/psg_sample.php Unfortunately I don't understand half of it. Not sure if ADPCM and PCM can be mixed :)

Also, I see that Roboplay supports mbm-replay of any PSG-"values" https://gitlab.com/torihino/roboplay/-/blob/master/players/m... in (in "music_play_drum")

Bottom line: How to know how many, or which PSG-channels are used when making music together with MSX-Music? What is typical?

Por JohnHassink

Ambassador (5578)

imagem de JohnHassink

02-03-2021, 11:04

It's hard to say what would be "typical". There aren't a lot of games that use MSX-Music and PSG in tandem.
One would think that it would be logical to preserve one PSG channel (if in-game music) for sound effects, like Konami did with their SCC music.

However, this does not seem the case with the few examples that we have -
Most Microcabin games will use all 3 PSG channels, with "Fray" being the exception of 1, or 2 at most.
"Starship Rendezvous" uses all PSG channels as well.
"Valis II" uses just one PSG channel (for percussion).

So I couldn't tell you what's "typical". Most commercially released software that supports the MSX-Music does not use the PSG at all for the music (when FM is present).

Moonblaster 1.4 stores the presets for the PSG (and FM) drums in the song (MBM file) itself, not a separate file.

Por ro

Scribe (4451)

imagem de ro

02-03-2021, 11:19

For MSX there's not an (integrated) suite of music and sfx players. They all work independently of each other, and that's not always handy. One way to overcome this, is to use a shared PSG data table that players write information too. But they don't OUT to the PSG them self. Another process should take care of that. So, it'll be something like this in case of two, or more, PSG players:
- Music player PSG writes it's data to the buffer
- Sound FX PSG writes it's data too, in most cases overwrite since SFX could have a higher prio.
- dump PSG data table to the PSG

That way the first two mix their stuff and the dump procedure actually plays it. Intelligent an integrated players should work with priority. A 3 channel SFX should not by default overwrite all three psg channels.
something like that.

I've worked on such system with Oracle (music player including PSG) and SEE (Sound Effect Editor PSG), but haven't released it. It is (was... long way back) in beta.

And, perhaps some one noticed, in Musix#3 we use SEE for PSG drums instead of the build-in MB ones. they suck. I adjusted the MB player to have SEE as it's PSG driver. Works nice Smile

anywhoooooooo. it prolly takes some custom work to have such things working. Running Naked in a Field of Flowers

Por wolf_

Ambassador_ (9883)

imagem de wolf_

02-03-2021, 11:22

Now that you mention it... did I actually use PSG drums for muz3? In MB they sucked so hard that I probably just ignored those course silly ticks altogether.

Por Sandy Brand

Master (235)

imagem de Sandy Brand

02-03-2021, 11:40

Not wanting to complicate your question more but you might want to also consider that:

  • 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 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.

Por JohnHassink

Ambassador (5578)

imagem de JohnHassink

02-03-2021, 11:43

Oh, before I forget.

Bengalack wrote:

For example I see this vgm using both PSG+MSX-Music: https://vgmrips.net/packs/pack/aleste-msx2-opll

It really doesn't. Yes, the percussion sounds like PSG, but that's due to Compile's habit of tuning the FM drum frequencies extremely low. ;)

Bengalack wrote:

Question then, is whether composing programs are ok with using only 1 or 2 channels of the 3 PSG.

I can only speak for myself, but for anything that I make on FM+PSG assuming it's meant for a game, I'm usually content with 'just' 2 PSG channels.

wolf_ wrote:

Now that you mention it... did I actually use PSG drums for muz3? In MB they sucked so hard that I probably just ignored those course silly ticks altogether.

I found that the more noisy sounds in there are kind of useful for reinforcing snares or cymbals, but yeah, as you well know, composers would ignore those MB 1.4 PSG 'drums' for a reason. :)

Por Grauw

Ascended (10004)

imagem de Grauw

02-03-2021, 11:55

JohnHassink wrote:
Bengalack wrote:

For example I see this vgm using both PSG+MSX-Music: https://vgmrips.net/packs/pack/aleste-msx2-opll

It really doesn't. Yes, the percussion sounds like PSG, but that's due to Compile's habit of tuning the FM drum frequencies extremely low. ;)

Micro Cabin does though: https://vgmrips.net/packs/pack/xak-the-art-of-visual-stage-msx2

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.

Por JohnHassink

Ambassador (5578)

imagem de JohnHassink

02-03-2021, 11:57

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.

Not wishing to derail the thread, but I wonder if you have seen this?
https://twitter.com/yuzokoshiro/status/1362436115697819648
I think it's reasonable to suppose that the Microcabin OPLL+PSG music that we all love was created in a similar way.
You probably already know what I prefer... ;)

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