Excellent work! If I could make a suggestion, a short fade in on resuming a track to make the transition less sudden would make this even more immersive.
Good idea. The problem is that a fade-in cannot be applied without re-encoding the audio, which increases command execution time and can impact game's performance. The battle theme can even end before the ffmpeg command.
But if you look for .streamMusic in HeartStrings/main.lua near "-- resume to cut music" and change the crossfade param from 1 to a greater value (i.e. to 5 seconds) it will increase the fade out time of the battle music. Not exactly the same but should make the transition less abrupt.
Actually, I can simulate a fade-in effect by simply turning down game's music volume and gradually increasing it every second, for 4 seconds, until the original volume (I find 5 seconds a bit too slow). Check out the new version.
Wow works great! Just a slight flash of a window/command line when the output is created (is that normal?) but otherwise it works perfect. Will now be using heartstrings instead of muse, once completing the process of adding more specific types of cells.
Hmm, I cannot reproduce it. Is your game in your user's directory and are you playing in borderless window in full resolution (imitating fullscreen)? With these settings I don't see any flashing windows, even in the background, when playing in a small window. Maybe running the game as administrator can help.
I did see the flashing window when I originally ran ffmpeg with os.execute or io.popopen, but after switching to LuaCom it finally runs hidden, so I'm surprised you can still see it.
Do you run the game with Mod Organizer 2 by any chance? I've started using it and noticed the same behavior. When I run the game directly by Morrowind.exe (or Wrye Mash) there is no window flash.
Edit: I've came up with a radical workaround for this, one that still allows using MO2 for installing mods, but without having to launch the game through MO2. It's a huge overkill, but it gets the job done: 1. In MO2 add a new executable to any file explorer (I selected the good old total commander). 2. Run that new executable via MO2. 3. Copy the whole game directory (that includes files from MO's virtual file system) to your physical drive. 4. Close MO2 (optional). 5. Run the copied game directly via Morrowind.exe. On next iteration one can use some more sophisticated software to copy only the files that have changed.
11 comments
But if you look for .streamMusic in HeartStrings/main.lua near "-- resume to cut music" and change the crossfade param from 1 to a greater value (i.e. to 5 seconds) it will increase the fade out time of the battle music. Not exactly the same but should make the transition less abrupt.
I did see the flashing window when I originally ran ffmpeg with os.execute or io.popopen, but after switching to LuaCom it finally runs hidden, so I'm surprised you can still see it.
Edit: I've came up with a radical workaround for this, one that still allows using MO2 for installing mods, but without having to launch the game through MO2. It's a huge overkill, but it gets the job done:
1. In MO2 add a new executable to any file explorer (I selected the good old total commander).
2. Run that new executable via MO2.
3. Copy the whole game directory (that includes files from MO's virtual file system) to your physical drive.
4. Close MO2 (optional).
5. Run the copied game directly via Morrowind.exe.
On next iteration one can use some more sophisticated software to copy only the files that have changed.
As for LuaFileSystem, I already use it for cleaning old output files.