Open oblivioncth opened 4 years ago
I have analyzed the files, and at least one uses the "wave segment" feature which is not currently implemented.
Overall, you bring up good points regarding being able to tell the length of a segment in advance. I'll have to add such a feature to the complete rewrite of the library that will happen "somewhere in the future".
Regarding your specific use case for sound effects, maybe you could extract the needed wav files from the DLS as needed and play them according to the sgt files.
I am able to successfully record these to WAV using DirectMusic Producer so this is mainly to help you with perfecting this library, though also because bulk conversion via a CLI would ultimately be more ideal.
This game primarily uses segments for speech and sound effects.
Example command tried: dmrender --length=10 --sample=48000 --channels=1 "abe_chant.sgt" "123.wav"
Issues encountered:
Samples: O-MO-SGT.zip
Many of these SGTs have variations that are assigned to separate PChannels (i.e. channels 1-3 are used for one effect and all 3 use the same instrument but are set to play back at different velocities/keys, so the pitch and duration ends up being different) instead of using variation switch points, which I suspect to be part of the issue.
Also, this game makes large use of segments as sound effects and so I think that for other cases like this it would also be useful if the tool had a command line option to automatically set the length of the render so that exactly one iteration of the segment is played during output generation (assuming you have figured out how to abstract this length from the format). This would avoid having to manually edit the output of each file afterwards to truncate unwanted repetitions that make more sense in the context of BGM, but not SFX.