Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is there a way to play/convert directmusic sgt/dls files? (Read 20791 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Is there a way to play/convert directmusic sgt/dls files?

Reply #25
Oh, wait. There are no builds of dmrender/dmplay.
Could you provide some executables that one could try?
Hi mzso :) You can find prebuilt binaries up to date with the current master commit at https://ci.appveyor.com/project/frabert/libdmusic/build/artifacts

Also, you could use dmrender in a batch file and render the files sequentially, but you should be aware that the library is - right now - more geared towards being integrated in game engines and the like, so sgt files are meant to be looped, not rendered as a single file. As a result, you have to specify the length of the rendered section.

I am afraid I am not familiar with NOLF...
Thanks. I gave dmplay a try, by attempting to play the extracted audio files from said game. But I only got a crash at first. It seems like dmplay can't handle either spaces or non-ascii characters in the path. (which is quite sad in this day and age.)

Anyway. After I worked around that bug I got:
Code: [Select]
Loading segment... done.
Start playback...  done.
Begin rendering... Rendering started. Insert the next segment to be played, or 'exit' to end playback.
And it stays like this.
But I don't get any sound. Not looped or anything, nothing at all.

Re: Is there a way to play/convert directmusic sgt/dls files?

Reply #26
Could you elaborate on the issue with non-ascii characters? I am actually quite interested in supporting non-ascii paths on multiple platforms, so this is definitely a bug. Also, could you contact me via eMail (it's on my profile) in case you are interested in helping me with rendering those files? I am going to need the files for tests, but I do not have a game copy handy

Re: Is there a way to play/convert directmusic sgt/dls files?

Reply #27
Could you elaborate on the issue with non-ascii characters? I am actually quite interested in supporting non-ascii paths on multiple platforms, so this is definitely a bug. Also, could you contact me via eMail (it's on my profile) in case you are interested in helping me with rendering those files? I am going to need the files for tests, but I do not have a game copy handy
Hmm... At first I couldn't reproduce it, so it doesn't happen in all instances, but here's how I got a crash:


Re: Is there a way to play/convert directmusic sgt/dls files?

Reply #28
Update:
I sent an e-mail

Re: Is there a way to play/convert directmusic sgt/dls files?

Reply #29
Oh, wait. There are no builds of dmrender/dmplay.
Could you provide some executables that one could try?
Hi mzso :) You can find prebuilt binaries up to date with the current master commit at https://ci.appveyor.com/project/frabert/libdmusic/build/artifacts

Also, you could use dmrender in a batch file and render the files sequentially, but you should be aware that the library is - right now - more geared towards being integrated in game engines and the like, so sgt files are meant to be looped, not rendered as a single file. As a result, you have to specify the length of the rendered section.

I am afraid I am not familiar with NOLF...

frabert, How do you get this libdmusic software of yours to run? There are no executables?


Re: Is there a way to play/convert directmusic sgt/dls files?

Reply #31
Looks like we got a mention, and maybe I can add some more helpful information about that Winamp plugin I mentioned before.

https://www.youtube.com/watch?v=gVPxPBcVDzI

@Peter, who is also the author of foobar2000, made the MIDI plugin for Winamp under contract, and also cracked several obscure MIDI formats from old games back in the day.

He also made a DirectMusic plugin for Winamp. This DirectMusic plugin either played the audio without touching Winamp's output plugins or DSPs or visualization, or it used a really dirty hack that only worked for real-time playback. Basically, DirectMusic also let you pass it your own DirectSound object(s) for output instead of letting it create its own output devices, and he crafted a fake DirectSound output device that just passed sample data to the plugin and eventually to the player, and passed an instance of this device to DirectMusic. Dirty hack. Apparently it was also prone to crashes? But I'm not sure.

This new libdmusic thing is probably way closer to working on anything recent, or on anything other than Windows. It's also a likely step toward Wine supporting the DirectMusic APIs, and maybe writing a shim for running old games on newer Windows systems.

Re: Is there a way to play/convert directmusic sgt/dls files?

Reply #32
Although utilities like libdmusic will ultimately end up being much more convinent to use, I did just want to make it clear for the record that there is a way to render directly to WAV from within DirectMusic Producer. While use of this feature is far from intuitive (par for the course for software from 2001), the built in Help documentation is actually half decent, which funny enough is much less true these days, if even present at all for a given tool.

This is the last version that was created and works for me under Windows 10 1909 with no modifications: http://files.rajko.info/dx90_directmusicproducer.exe

The documentation states that the record to WAV feature at the bottom that the mzso mentioned is supposed to be inaccessible unless everything is set up correctly to use it, which does not seem to be the case and is quite possibly an oversight.

In order for it to work you have to set up a custom "Audiopath" that uses the "FileOutput" effect, by clicking New->Audiopath once you have a project created/opened. I suggest selecting the option to base yours off of one of the existing ones, I named mine "Direct2Wave", name doesn't matter, then in its settings (get there by double clicking the .aup file that was created (it should bring them up automatically).

Right click on it on the list and remove the Standard Buffer, the right click and hit Insert Buffer, then right click on the buffer that was added and select Add/Remove Buses so you can choose if you want stereo or mono recording. Then right click on the buffer again and select Properties and check "Share buffer with other audiopaths" and "Enable Doppler Effect/SetFrequency". I'm not entirely sure what these settings do (the Help documentation covers those topics) but all the default Audiopaths used them so I turned them on. Finally, all the way on the right drag the "FileOutput" effect into the buffer and it then should show up with a FileOutput1 instance under the Effects list.

Now you are ready to record. First, in the upper left dropdown for Audiopaths change from whichever standard one the program is set as to the one you just created. Then, at the bottom click the "..." next to the symbol of an audio waveform (the one to the right of that is for recording to MIDI) and provide an output filename and path.

When you are ready, click the waveform button to start recording and then procceed to make whatever sound you want within the program. Play the SGT directly using the play button at the top, click a note on a key in the SGP editor, play a sample/instrument in the DLS editor, etc. and when you are finished click the waveform icon again. You should get a WAV with everything you just did at the location you set. Worked for me anyways.

This is especially useful for recording SGTs used as sound effects that have pitch or effect variations that are changed to using RNG as you can see which key note corresponds to each variation (1 through 32 possible) and hit each of those exact keys to get all of the varations while you're recording.

I don't know how libdmusic handles SGTs with variations since I haven't tried it yet as I wrote a MATLAB script to help me process the WAV output for use in another game after it is recorded from DMP because it was before I had found this thread.

Re: Is there a way to play/convert directmusic sgt/dls files?

Reply #33
Although utilities like libdmusic will ultimately end up being much more convinent to use, I did just want to make it clear for the record that there is a way to render directly to WAV from within DirectMusic Producer. While use of this feature is far from intuitive (par for the course for software from 2001), the built in Help documentation is actually half decent, which funny enough is much less true these days, if even present at all for a given tool.

This is the last version that was created and works for me under Windows 10 1909 with no modifications: http://files.rajko.info/dx90_directmusicproducer.exe

The documentation states that the record to WAV feature at the bottom that the mzso mentioned is supposed to be inaccessible unless everything is set up correctly to use it, which does not seem to be the case and is quite possibly an oversight.

In order for it to work you have to set up a custom "Audiopath" that uses the "FileOutput" effect, by clicking New->Audiopath once you have a project created/opened. I suggest selecting the option to base yours off of one of the existing ones, I named mine "Direct2Wave", name doesn't matter, then in its settings (get there by double clicking the .aup file that was created (it should bring them up automatically).

Right click on it on the list and remove the Standard Buffer, the right click and hit Insert Buffer, then right click on the buffer that was added and select Add/Remove Buses so you can choose if you want stereo or mono recording. Then right click on the buffer again and select Properties and check "Share buffer with other audiopaths" and "Enable Doppler Effect/SetFrequency". I'm not entirely sure what these settings do (the Help documentation covers those topics) but all the default Audiopaths used them so I turned them on. Finally, all the way on the right drag the "FileOutput" effect into the buffer and it then should show up with a FileOutput1 instance under the Effects list.

Now you are ready to record. First, in the upper left dropdown for Audiopaths change from whichever standard one the program is set as to the one you just created. Then, at the bottom click the "..." next to the symbol of an audio waveform (the one to the right of that is for recording to MIDI) and provide an output filename and path.

When you are ready, click the waveform button to start recording and then procceed to make whatever sound you want within the program. Play the SGT directly using the play button at the top, click a note on a key in the SGP editor, play a sample/instrument in the DLS editor, etc. and when you are finished click the waveform icon again. You should get a WAV with everything you just did at the location you set. Worked for me anyways.

This is especially useful for recording SGTs used as sound effects that have pitch or effect variations that are changed to using RNG as you can see which key note corresponds to each variation (1 through 32 possible) and hit each of those exact keys to get all of the varations while you're recording.

I don't know how libdmusic handles SGTs with variations since I haven't tried it yet as I wrote a MATLAB script to help me process the WAV output for use in another game after it is recorded from DMP because it was before I had found this thread.

Thanks for the effort, but I still don't know how to use it when I download it (that's my problem) and I don't even know how to install it.