Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VST in MPTM files, effects and instruments #1

Open
GeminiSquishGames opened this issue Mar 28, 2024 · 7 comments
Open

VST in MPTM files, effects and instruments #1

GeminiSquishGames opened this issue Mar 28, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@GeminiSquishGames
Copy link

MPTM files are pretty great and I'm glad you have them working. I've been looking for a solution like this since I love making small music for games in MPTracker and it's ancestors. I hope the Channel control (maybe row/order position control also?) are as trival as you say and I'll enjoy as much dynamic control of tracker files as I can get. Something I had a lot of control over a couple of decades ago with these types of files.

Now, we all know about MPTracker and that it uses this library for playback, but it's also a VST host. I'm not sure if that is a separate functionality to the libopenmpt library off the top of my head but I put together some free VST .dlls in the same folder as the .mptm file and while It works in the tracker it doesn't in the addon. It doesn't crash or error either, so that's good. I'm not too surprised. But if this is at all possible, it would be next level to have control over your own instruments in that way. Still I think having OPL synths working is pretty great, and they do work in .mptm with your addon, so some non-sampler, analog like synth is available and OPL is nice and retro, but it would be great to have a modern system of synth and effects working as well. Great work and keep it up.

@Dudejoe870
Copy link
Owner

Dudejoe870 commented Apr 2, 2024

Glad you like it! I haven't worked on this in a bit, but really I kind of doubt that VST support is something that can happen unless libopenmpt supports it (VST hosting is an extremely difficult thing to do properly). However as far as row/channel controls and all of that, that's not all that complicated I could probably try to implement that. Currently the addon is quite literally just a wrapper around libopenmpt, and it exposes all of that stuff in a pretty easy interface already.

EDIT: I had actually already forgotten but the AudioMPTPlayback class should already have an overloaded version of seek with order/row functionality! I probably need to create a wiki. it also hasn't been tested so please do update if there are any issues. I'm looking into adding more control right now.

EDIT2: Just looked up the possibility of VST support and it says here that libopenmpt does in fact not support VSTs. Also taking a look at the the documentation, I'm not sure how the VST information is stored, it probably might be able to be retrieved but I have no idea. So I don't know how practical it is to implement it on top of libopenmpt anyway. Either way currently something like that is too big of a task for me to delve into. I will keep this issue open however with the possibility that it could be implemented some day.

@Dudejoe870 Dudejoe870 added the enhancement New feature or request label Apr 2, 2024
@GeminiSquishGames
Copy link
Author

GeminiSquishGames commented Apr 3, 2024 via email

@Dudejoe870
Copy link
Owner

Dudejoe870 commented Apr 3, 2024

I haven't really used the mptm format, but you might be able to also just use subsongs if you want and switch between them, if it supports them (instead of using multiple AudioStreams)

@Dudejoe870
Copy link
Owner

FYI: New build is out. You can download it as an artifact in the actions tab. I'll also probably upload it to the prebuilt branch soon.

@GeminiSquishGames
Copy link
Author

GeminiSquishGames commented Apr 3, 2024

I haven't really used the mptm format, but you might be able to also just use subsongs if you want and switch between them, if it supports them (instead of using multiple AudioStreams)

True but what I mean is to have parts that I can play together that are in sync, a bit like stems. One contains the basic parts of the song, one contains the non-battle parts, and one contains the battle parts. For a simple example. Thanks for the heads up on the release!

ps: https://wiki.openmpt.org/Development:_OpenMPT_Format_Extensions - this is the wiki page that has info on the file structure for extensions, it has VST header data, maybe it's of use to you. I think it's mostly just .it format with the extra things like OPL and Plugins built in. They used to hack in these extensions in .xm and .it files but stopped and made it part of the official .mptm file format only. At any rate, anything you don't get to that I need I'll probably eventually try to get it going at some point, but I don't need VST that much I was just wondering if you may have looked into it. I'm a little surprised it doesn't just work as long as the settings point to the right location of the VSTs, but obviously, it's not that easy.

@Dudejoe870
Copy link
Owner

Well I will also say that, most VSTs (even free ones) probably don't have licenses that allow redistribution at any rate, so packaging them into a game will probably be illegal.

@GeminiSquishGames
Copy link
Author

GeminiSquishGames commented Apr 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants