Thought I would try this here before I post on Mod’s website. I’ve been looking at the APIs available as a part of the MOD host and am looking for an API that would give me the curren pedal board’s state, if possible. So I can get the current pedalboard AND that pedalboard’s info. What I can’t seem to find is an API to get the current pedalboard’s state. For example, if the chorus plugin is “off” by default, can I, through an API determine if it’s currently “on”?
Sometimes the best documentation (the one which actually shows what’s going on) is the source code. The mod-ui has its own http API endpoints, see the list here:
@Giedrius yep, that’s what I’ve been using so far. I don’t see any API that gives me current state.
When you said you’re using Mod Host API I thought you were using the direct communication with mod-host process through its socket API: mod-host/mod-host.h at master · BlokasLabs/mod-host · GitHub
I don’t think it’s capable of having multiple connections open, so only mod-ui can access it, but I may be wrong though.
@Giedrius interesting. I’ve never looked at the socket API. So if I’m not running the browser interface could I theoretically connect to this from another program?
Yes, if you stop mod-ui service, you can connect to mod host from another process and work with it. Or just run another mod-host on different ports.
sir, how to connect with mod-host socket with python ? and how to set mod-host environments path ?
@Avijit_Mondal I’ve been doing some work on connecting to MODEP via the web API and the lilv.py package. What are you trying to accomplish? Maybe I can help with the answer.
I’m trying to make an python based graphical ui for mod-host . which can control mod-host without mod-ui . So, I need to connect with mod-host first . But, can’t understand how to connect with mod-host through socket .
I check in webserver.py file , there are parameters for add , remove effects etc .
but dont know how to use them with python request . please help me .
@Avijit_Mondal what you found there is the MOD web API. With these you have to do a Python web request to get the API results.
One suggestion: get Postman and use that to work out the particulars of using the MOD web API. Then you’ll know how to correctly make the call in Python.