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

Disabling channels/instruments #41

Open
Ep8Script opened this issue May 4, 2021 · 5 comments
Open

Disabling channels/instruments #41

Ep8Script opened this issue May 4, 2021 · 5 comments

Comments

@Ep8Script
Copy link

Ep8Script commented May 4, 2021

It would be great if it were possible to disable specific channels or instruments with this library (or libopenmpt), but there doesn't seem to be a way to do it. I've tried a lot of things (including reading up on some information here), but I've unfortunately been unable to get it to work.

Is there something I'm missing, or is this not doable here? Thanks!

@deskjet
Copy link
Owner

deskjet commented May 4, 2021

I'm sure it can be done. libopenmpt can supports muting channels using the set_channel_mute_status function. However, I can't figure out how to call openmpt_module_ext_get_interface from JS correctly to obtain the mod_ext pointer. I'll experiment later today if there is time.

@Ep8Script
Copy link
Author

Ep8Script commented May 4, 2021

Yeah that's where I got stuck unfortunately. Appreciate you taking the time anyway, good luck and thanks for creating this project!

@christiancodes
Copy link

I'm investigating this too. Doesn't look like set_channel_mute_status has made it into the libopenmpt.js conversion.

@deskjet
Copy link
Owner

deskjet commented Jun 11, 2021

I did a bit of research and I think we might have to create some bindings so we can access the openmpt_module_ext_interface_interactive struct from JS and call the functions pointers there using Emscripten's dynCall. Not sure whether it'll work though.

@ramdanirfox
Copy link

@deskjet i prefer to use wasmTable.get(functionPointer) because i can apply argument more flexible.

ramdanirfox added a commit to ramdanirfox/chiptune2.js that referenced this issue Apr 26, 2023
- possible by exposing interactive interface

deskjet#41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants