MIDI for Construct Classic #4We're trying to create a MIDI plugin for Construct Classic, a free game builder https://sourceforge.net/projects/construct/As it turns out, it doesn't support the .mid format. Older versions before 0.98.3 and systems before Windows Vista supported it in the DirectSound.csx plugin.The source code is available at https://github.com/aolko/construct/ but it doesn't include the DirectSound plugin. Perhaps it's been converted to ".\Plugins\XAudio2.csx" and ".\Plugins\Runtime\XAudio2.csx" which contains libraries for several formats.Can anyone with C++ knowledge help? The forums say the project used Microsoft Visual Studio 2008.If it can't play MIDI files directly, then maybe it can play MIDI files via hex commands.***One option shown in the video is launching MIDI files via playsmf.exe (https://github.com/MrBMueller/playsmf)But this isn't very convenient and there's a delay.I had to remove the audio track. Video with sound: https://limewire.com/d/hGxrO#NeoQFBl7Bx***What the plugin should be able to do:- Play/loop/pause/stop/change track, load *.mid from resources or a file. Also, position and stop data. This is used as background music.- MIDI playback using MIDI Hex Commands. Examples: NoteOn - 903C7F, NoteOff - 803C00. These are game sounds (SFX).- Optionally use your own .sf2 sound bank from resources or a file (https://github.com/bradhowes/SF2Lib https://github.com/schellingb/TinySoundFont)Alternatively, you don't need a full-fledged MIDI player to play MIDI files. You can convert MIDI files into a 2D array with a set of commands and save them as such.***Sorry, the thread keeps dying, I'm having trouble bumping it.
nobody fucking cares you can stop spamming already
>>108663898Funny man, if you're not interested, you don't have to spam this thread.
>>108663887why are you building a niche plugin for an old game engine that no one uses
>>108663887>The forums say the project used Microsoft Visual Studio 2008so what is the problem? you can download clang and rebuild that project with it
>>108663887I ran `cloc` against the codebase, and it reported 600k LOC, with ~469k LOC as C/C++.if we assume 12 tokens per LOC, that's 5.6M tokens for the C++ stuff.one model that supports context windows of that size is the meta llama 4 scout, boasting 10M context window, but its a llama model so its probably pretty chopped by todays standards.with some effort, you could probably isolate the codebase responsible for audio handling and do it with far smaller context window size, and use a more powerful model.but one thing i definitely wouldn't do is try to figure out how the engine works myself. it is simply not worth the time or effort. you would be a fool to not let an LLM do >95% of the work.
>>108663887Use case? Why not use ogg or mp3 or whatever it supports?
>>108664193
>>108664193Do you think I need to change the entire engine to make a plugin?You can use the Plugin SDK: https://sourceforge.net/projects/construct/files/plugin%20sdk/You could try building something based on this plugin: https://github.com/aolko/construct/tree/master/Plugins/XAudio2
>>108664193ahaha, 600k LOCs to play MIDI.. you guys are retarded
The .h/.cpp/.def files directly in the Plugins/XAudio2 directory are 123'095 bytes in total (subdirectories don't matter since they handle the other audio types).Since it's ASCII code, that might be a third or even a quarter in tokens.You either edit the MIDI code as a new accepted format into the files, or you strip out all the audio processing to replace it with a MIDI only plugin and replace XAudio -> XMIDI in all the source files and the ConstructSDK.rc resource fileI don't see why you'd need to use 2008 VS, you can use a new version or probably even other compilers, although you might have to manually (maybe the AI can do this too) get the command line parameters from the "Template SDK.vcproj" file.It seems like a reasonable thing for an AI to solve, with some direction.
>>108663887>.sf2 sound bankthe good sf2 sound fonts are huge (personally I prefer the omega soundfont)The best sf2's are probably larger than the size of saving the music as a mp3 or whatever.Also you did not mention any reason why you need midi's. I would probably ask for midi's that behave exactly the same as the classic windows media player when you pause it, where notes will continue to play after pausing (but it's also annoying because long notes will play way too long, so transitioning to another song might rape your ears, and resuming the song will not resume the lost note).Or maybe there is some really wacky things you could do with midi hex codes (but I feel like most special effects could be recreated using software, either in real time maybe by VST code made by AI or baked using audacity or whatever audio software).
>>108664432MIDI has a unifying quality, yet at the same time, for example, some people need quality and will have their own favorite, heavyweight sound bank. But the lightweight "Diet Candy Set.sf2" 48kb can be integrated into the plugin itself.
>>108663887BUMP
>>108663887kinda based.you don't happen to have $$$$$ to make this a reality? (should had btc early)