MusMod 2 QTM v0.01 available

Discuss SoundTrackers, shims to QTM, 32bitting and ARMv7 compatibility
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: MusMod 2 QTM v0.01 available

Post by steve3000 »

JonAbbott wrote:I let QTM decide what channel to put the sound on, doesn't sound like it's working as well as I'd hoped.
Ok that feature of QTM doesn't always work as well as it should, but particularly not with 3-channel music, such as MusMod music. Krisalis games used Amiga tracks for the most part, and most of those Amiga tracks were 3-channel with the 4th blank channel reserved for sound effects.

However QTM assumes 4-channel music with even note distribution, so when it looks for a blank channel to play the effect, it starts at channel 1, checks if a note is playing, if one is, it tries channel 2...and so on. In order for 3-channel music to sound good you get a large number of different instruments squeezed into the first three channels, so any effect that plays on one of these channels is more likely to get cut more rapidly than 4 channel music, as the next note/instrument plays. And QTM rarely gets as far the the 'official' blank channel no.4 - as the first three channels' notes are usually short and switch rapidly - so there are often apparent blank channels, but really just between notes...

Anyway - I'll improve the detection method some day...

For now, best thing is to select channel 4 (I believe) for all effects.

Steve
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: MusMod 2 QTM v0.01 available

Post by steve3000 »

Not sure why the blank music files don't work - possibly the way MusMod2QTM registers them with QTM. I'll need to take a look at those when I get the time. Will make a note on that!
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: MusMod 2 QTM v0.01 available

Post by JonAbbott »

Using channel 4 improves things, BlowPipe still cuts out though... the solution I've now implemented is to increase the channels to 8 (in Mus_Load, Mus_Run and Mus_MemValid) and cycle the effects around channels 5-8. BlowPipe sounds perfect now, although I'm not sure if there will be any knock on affect with other games.

Continuing game testing... (I'll wrap all the issues up into another post when I've finished testing)

Jahangir Khan World Championship Squash doesn't sound right, the intro music plays, but stops when it gets to the menu and the effects samples sounds like they may be linear - I've tested with the Lemmings MusMod and get the same results so we may need to implement a linear version of QTM_PlayRawSample.

Not sure why the menu music doesn't work, I know it calls Mus_Songpos when the music stops, so I'm guessing it jumps to another part of the current music file (there's only one on the disc). I know Mus_Songpos isn't causing the issue, so I'll have to investigate further.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: MusMod 2 QTM v0.01 available

Post by JonAbbott »

JonAbbott wrote:Jahangir Khan World Championship Squash ...

Not sure why the menu music doesn't work, I know it calls Mus_Songpos when the music stops, so I'm guessing it jumps to another part of the current music file (there's only one on the disc). I know Mus_Songpos isn't causing the issue, so I'll have to investigate further.
Mus_Run is the problem. I'm not entirely sure what this SWI is supposed to do, although looking at MusMod2 it looks like it may silence the currently playing sounds, but doesn't stop the track from playing - although I may be wrong. For the time being, I'll simply ignore the SWI.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: MusMod 2 QTM v0.01 available

Post by JonAbbott »

Mad Professor Mariarti had no sound effects as it needed Mus_Samplestarts - now that's implemented it's working great.

I've figured out what Mus_Patch does, but don't believe we can implement it. When the songpos hits the value passed in R1, songpos is changed to the value in R0 - that will need implementing in QTM.

Mus_EffectControl seems to take a linear value in R0 (0-127) and a scaling factor in R1, it may alter the volume of the current sound effect at a guess.
steve3000
Posts: 198
Joined: Thu May 02, 2013 9:25 pm

Re: MusMod 2 QTM v0.01 available

Post by steve3000 »

JonAbbott wrote:I've figured out what Mus_Patch does, but don't believe we can implement it. When the songpos hits the value passed in R1, songpos is changed to the value in R0 - that will need implementing in QTM.

Mus_EffectControl seems to take a linear value in R0 (0-127) and a scaling factor in R1, it may alter the volume of the current sound effect at a guess.
Great work again - really good to see so many games working with QTM!

For Mus_Patch this might be possible with the QTM music interrupt system... I don't have the documents with me now, but certainly played with a position-triggered interrupt at one point - I hope I put that in the release version?

To change sound effect volume, again this is something I've tried and played with, although I dont think it made it to release. Have a look in the v1.43 SWIs docs - under the playsample SWI, if it allows -1 as the sample number that was how it would have been implemented...
Post Reply