lequietriot / RuneScape-MIDI-Player-Suite

A suite of experimental tools that I used for manipulating old runescape audio. No longer maintained/updated, please see the link for the latest project.
https://github.com/lequietriot/Old-School-RuneScape-Cache-Tools
47 stars 8 forks source link

Rendering/Encoding MIDI files to wav not providing expected results. #10

Open ghost opened 2 years ago

ghost commented 2 years ago

I wished to use this tool to encode or render some MIDI files to wav files with supposed high quality audio. I followed the instructions within the ReadMe file and tried to write the song to file in high quality. However, while I did hear a slightly distorted version of the sound I intended to stream, the result was a 44-byte mid.wav file within my workspace. It's quite clear I don't understand my options or may have missed a step. Is what I'm trying to do sensible? Does it have to do with me running it in Eclipse rather than IntelliJ, or in a later version than that suggested in one of the closed issues?

Edit: I suppose it doesn't help much to just describe the issue. Here's the console output I get after the given song to be written to a file stops playing:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot read the array length because "this.trackPositions" is null at main.MidiFileReader.isDone(MidiFileReader.java:192) at main.GUI$SoundBankSongDumperHQ.actionPerformed(GUI.java:3475) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1012) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1056) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6614) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342) at java.desktop/java.awt.Component.processEvent(Component.java:6379) at java.desktop/java.awt.Container.processEvent(Container.java:2263) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4990) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4822) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4919) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4548) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4489) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2769) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4822) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

lequietriot commented 2 years ago

@Darkyyo I know this is a really late reply, but I think the issue was that you played the song out loud as per the readme instructions, and then tried to export/render it. This program tends to be pretty buggy, I always just fixed issues by closing and reopening the app. Please let me know if you're still running into this issue.

Also, if you are still interested in getting HQ RuneScape music, I would recommend checking out the newer project. It functions a lot better and is less cluttered: https://github.com/lequietriot/Old-School-RuneScape-Cache-Tools

ghost commented 2 years ago

@lequietriot I believe that the issues I was experiencing generated themselves somehow. I'd press the corresponding export/render button, and the file would start to be rendered/exported at the same time as a preview of it would be spontaneously played. This sudden playback, as you suggested, is what most probably caused nothing to be produced at all. Of course, closing the application would stop the erroneous process, but it certainly wouldn't prevent the application from encountering the same exact same issue once I tried to render/export a file again.

On another note, after trying out the newer iteration of your project, it certainly met my needs: the files were rendered/exported correctly, and the quality of the custom files was astounding, to say the least.