Is anyone familiar with ayfx_player and PT3REPLAYER

بواسطة wimpie3

Champion (406)

صورة wimpie3

29-04-2019, 20:06

I've read ayfx_player and PT3REPLAYER can both play music and sound effects at the same time, and that seems to be working indeed. However, the sound effects are "mixed" in a strange way between the music, probably because the player already uses all three PSG channels. I've tried creating a one channel song (on channel 3) but the sounds effects still sound weird. Does anyone know how this works exactly?

Login أوregister لوضع تعليقاتك

بواسطة bore

Master (142)

صورة bore

29-04-2019, 22:37

Well, they way PT3 works is that it renders the channels to a buffer of what it wants the AY registers to be and then dumps them all to the real registers.

At PL2: you will find the call to the instrument rendering and a bit further down you have ROUT: that dumps the data.
You could just change the loop to not touch a channel.

Another way could be to add your sound effects as instruments in the song and use the player for it.
To do that you would load IX with ChanC+12 and BC points at your "fake pattern data" and then you call PTDECOD
I think it should be sufficient to have something like a byte in the range 0xD1 - 0xEF that selects instrument and then one byte in the range 0x50 - 0xB0 that selects note to play.
You might need a byte to set the volume too (0xC0-0xCF) but it needs to be before the note command since the note command ends pattern parsing for that line.

بواسطة MsxKun

Paragon (1111)

صورة MsxKun

29-04-2019, 22:43

There's a version of ayfx_replayer that splits the SFX on all the three channels to minimize the time each channel is used for the SFX and, for that reason, the time the music on that channel will be muted. I think it must be the one you're using.
That can be convenient or not. Maybe you prefer to mute temporally just one channel.
The original ayfx_replayer did this, I think, and should be easy to find around. With that version it will only mute 1 channel temporally and if you make, for example, that one channel song, it won't mute that channel at all, unless it's the channel you choiced for SFX Big smile