GithubHelp home page GithubHelp logo

moddevices / mod-host Goto Github PK

View Code? Open in Web Editor NEW
107.0 29.0 53.0 1.39 MB

LV2 host for Jack controllable via socket or command line

License: GNU General Public License v3.0

Makefile 1.18% C 96.73% Python 2.09%

mod-host's Introduction

mod-host

About

mod-host is an LV2 host for JACK, controllable via socket or command line

Currently the host supports the following LV2 features:

  • lv2core
  • atom
  • buf-size
  • event
  • log
  • midi
  • options
  • parameters
  • patch
  • presets
  • state
  • time
  • uri-map
  • urid
  • worker

mod-host is part of the MOD project.

Building

mod-host uses a simple Makefile to build the source code. The steps to build and install are:

make
make install

You can change the base installation path passing PREFIX as argument of make.

Dependencies:

libjack-jackd2  >= 1.9.8
liblilv         >= 0.14.2
libreadline     >= 6.2
lilv-utils      (optional)
fftw            (optional)
hylia           (optional)

On Debian-based Linux distributions (Ubuntu, Mint, etc) most of these can be installed with:

sudo apt install libreadline-dev liblilv-dev lilv-utils libfftw3-dev libjack-jackd2-dev

For Hylia, please go to https://github.com/falkTX/Hylia to install from source.

Running

For developing start it like this:

$ ./mod-host -n -p 5555 -f 5556

mod-host does not startup JACK automatically, so you need to start it before running mod-host.

If you run mod-host without options the process will be forked and it can only be controlled through the socket. The default socket port is 5555, this can be changed by passing the option -p (or --socket-port) to mod-host.

The other way to control mod-host is the interactive mode, in this case the commands must be provided on the shell prompt. The interactive mode has autocomplete, therefore, you can always type [TAB] twice any time you want a hint.

Note: When you are in the interactive mode, socket communication won't work.

Options

-v, --verbose
    verbose messages

-p, --socket-port=<port>
    socket port definition

-f, --feedback-port<port>
    feedback port definition

-i, --interactive
    interactive shell mode

-n, --nofork 
    run in non-forking mode

-V, --version
    print program version and exit

-h, --help
    print help and exit

Commands (or Protocol)

The commands supported by mod-host are:

add <lv2_uri> <instance_number>
    * add an LV2 plugin encapsulated as a jack client
    e.g.: add "http://lv2plug.in/plugins/eg-amp" 0
    instance_number must be any value between 0 ~ 9990, inclusively

remove <instance_number>
    * remove an LV2 plugin instance (and also the jack client)
    e.g.: remove 0
    when instance_number is -1 all plugins will be removed

preset_load <instance_number> <preset_uri>
    * load a preset state of an effect instance
    e.g.: preset_load 0 "http://drobilla.net/plugins/mda/presets#JX10-moogcury-lite"

preset_save <instance_number> <preset_name> <dir> <file_name>
    * save a preset state of an effect instance
    e.g.: preset_save 0 "My Preset" "/home/user/.lv2/my-presets.lv2" "mypreset.ttl"

preset_show <preset_uri>
    * show the preset information of requested URI
    e.g.: preset_show "http://drobilla.net/plugins/mda/presets#EPiano-bright"

connect <origin_port> <destination_port>
    * connect two jack ports
    e.g.: connect "system:capture_1" "effect_0:in"

disconnect <origin_port> <destination_port>
    * disconnect two jack ports
    e.g.: disconnect "system:capture_1" "effect_0:in"

bypass <instance_number> <bypass_value>
    * toggle effect processing
    e.g.: bypass 0 1
    if bypass_value = 1 bypass effect
    if bypass_value = 0 process effect

param_set <instance_number> <param_symbol> <param_value>
    * set the value of a control port
    e.g.: param_set 0 "gain" 2.5

param_get <instance_number> <param_symbol>
    * get the value of a control port
    e.g.: param_get 0 "gain"

param_monitor <instance_number> <param_symbol> <cond_op> <value>
    * monitor a control port according to a condition
    e.g: param_monitor 0 "gain" ">" 2.5

patch_set <instance_number> <property_uri> <value>
    * set the value of a control port
    e.g.: patch_set 0 "gain" 2.5

patch_get <instance_number> <property_uri>
    * get the value of a control port
    e.g.: patch_get 0 "gain"

licensee <instance_number>
    * get the licensee name for a commercial plugin
    e.g.: licensee 0

monitor <addr> <port> <status>
    * open a socket port for monitoring parameter changes
    e.g: monitor localhost 12345 1
    if status = 1 start monitoring
    if status = 0 stop monitoring

monitor_output <instance_number> <param_symbol>
    * request monitoring of an output control port (on the feedback port)
    e.g.: monitor_output 0 "meter"

midi_learn <instance_number> <param_symbol> <minimum> <maximum>
    * start MIDI learn for a control port
    e.g.: midi_learn 0 "gain" 0.0 1.0

midi_map <instance_number> <param_symbol> <midi_channel> <midi_cc> <minimum> <maximum>
    * map a MIDI controller to a control port
    e.g.: midi_map 0 "gain" 0 7 0.0 1.0
    a non-standard midi_cc value of 131 (0x83) is used for pitchbend

midi_unmap <instance_number> <param_symbol>
    * unmap the MIDI controller from a control port
    e.g.: midi_unmap 0 "gain"

monitor_midi_program <midi_channel> <enable>
    * listen to MIDI program change messages (on the feedback port)
    e.g.: monitor_midi_program 0 1

set_midi_program_change_pedalboard_bank_channel <enable> <midi_channel>
    * set the MIDI channel which changes pedalboard banks on MIDI program change. <midi_channel> is in the range of [0,15].
    e.g.: set_midi_program_change_pedalboard_bank_channel 1 5 to enable listening for bank changes on channel 6

set_midi_program_change_pedalboard_snapshot_channel <enable> <midi_channel>
    * set the MIDI channel which changes pedalboard snapshots on MIDI program change. <midi_channel> is in the range of [0,15].
    e.g.: set_midi_program_change_pedalboard_snapshot_channel 1 4 to enable listening for preset changes on channel 5

cc_map <instance_number> <param_symbol> <device_id> <actuator_id> <label> <value> <minimum> <maximum> <steps> <unit> <scalepoints_count> <scalepoints...>
    * map a Control Chain actuator to a control port
    e.g.: cc_map 0 "gain" 0 1 "Gain" 0.0 -24.0 3.0 33 "dB" 0

cc_unmap <instance_number> <param_symbol>
    * unmap the Control Chain actuator from a control port
    e.g.: cc_unmap 0 "gain"

cc_value_set <instance_number> <param_symbol> <value>
    * set the value of a  mapped Control Chain actuator
    e.g.: cc_value_set 0 "gain" 2.5

cv_map <instance_number> <param_symbol> <source_port_name> <minimum> <maximum> <operational-mode>
    * map a CV source port to a control port, operational-mode being one of '-', '+', 'b' or '='
    e.g.: cv_map 0 "gain" "AMS CV Source:CV Out 1" -24.0 3.0 =

cv_unmap <instance_number> <param_symbol>
    * unmap the CV source port actuator from a control port
    e.g.: cv_unmap 0 "gain"

cpu_load
    * return current jack cpu load

load <file_name>
    * load a history command file
    * dummy way to save/load workspace state
    e.g.: load my_setup

save <file_name>
    * saves the history of typed commands
    * dummy way to save/load workspace state
    e.g.: save my_setup

bundle_add <bundle_path>
    * add a bundle to the running lv2 world
    e.g.: bundle_add "/path/to/bundle.lv2"

bundle_remove <bundle_path> <resource>
    * remove a bundle from the running lv2 world
    e.g.: bundle_remove "/path/to/bundle.lv2" ""

feature_enable <feature> <enable>
    * enable or disable a feature
    * feature can be one of "aggregated-midi", "freewheeling" or "processing"
    * the "aggregated-midi" feature requires the use of jack2 and mod-midi-merger to be installed system-wide
    e.g.: feature_enable link 1

set_bpm <beats_per_minute>
    * set the global beats per minute transport value
    e.g.: set_bpm 120

set_bpb <beats_per_bar>
    * set the global beats per bar transport value
    e.g.: set_bpb 4

transport <rolling> <beats_per_bar> <beats_per_minute>
    * change the global transport state
    e.g.: transport 1 4 120

transport_sync <mode>
    * change the transport sync mode
    * mode can be one of "none", "link" or "midi"
    e.g.: transport_sync "midi"

output_data_ready
    * report feedback port ready for more messages

help
    * show a help message

quit
    bye!

For each effect added one client on JACK will be created. The names of clients follow the standard: effect_<instance_number>

If a valid command is executed a response is given as following:

resp <status> [value]

If status is a negative number an error has occurred. The table below shows the number of each error.

status error
-1 ERR_INSTANCE_INVALID
-2 ERR_INSTANCE_ALREADY_EXISTS
-3 ERR_INSTANCE_NON_EXISTS
-4 ERR_INSTANCE_UNLICENSED
-101 ERR_LV2_INVALID_URI
-102 ERR_LV2_INSTANTIATION
-103 ERR_LV2_INVALID_PARAM_SYMBOL
-104 ERR_LV2_INVALID_PRESET_URI
-105 ERR_LV2_CANT_LOAD_STATE
-201 ERR_JACK_CLIENT_CREATION
-202 ERR_JACK_CLIENT_ACTIVATION
-203 ERR_JACK_CLIENT_DEACTIVATION
-204 ERR_JACK_PORT_REGISTER
-205 ERR_JACK_PORT_CONNECTION
-206 ERR_JACK_PORT_DISCONNECTION
-301 ERR_ASSIGNMENT_ALREADY_EXISTS
-302 ERR_ASSIGNMENT_INVALID_OP
-303 ERR_ASSIGNMENT_LIST_FULL
-304 ERR_ASSIGNMENT_FAILED
-401 ERR_CONTROL_CHAIN_UNAVAILABLE
-402 ERR_LINK_UNAVAILABLE
-901 ERR_MEMORY_ALLOCATION
-902 ERR_INVALID_OPERATION

A status zero or positive means that the command was executed successfully. In case of the add command, the status returned is the instance number. The value field currently only exists for the param_get command.

mod-host's People

Contributors

alercunha avatar bgola avatar dsheeler avatar falktx avatar foolswood avatar fps avatar henning avatar jwbverheesen avatar kasbah avatar lfagundes avatar odurc avatar rominator1983 avatar tristantarrant avatar x42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mod-host's Issues

Load plugins on localhost

How does the URL feature work? I tried to write a URL to a plugin on localhost with the following syntax file:///usr/lib/lv2/plugin.lv2 and mod-host replies with an invalid URL error.

mod-monitor sometimes stuck in an XRUN loop after startup

I'm using mod-host headless on a Raspberry Pi. It is started by systemd, and connections between it and other JACK clients are done with a framework of scripts.
During startup, there is a slight chance (maybe one in 20 or so) that jackd will produce xruns as follows:

JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = mod-monitor was not finished, state = Triggered
...

These go on forever, hundreds per second. The audio performance of the JACK graph is not affected, though - no audible clicks, just a slighly higher CPU load which may be entirely due to the many log messages.

I have never seen this occur during normal operation, it either happens immediately after initially starting the JACK graph or not at all. I have seen it on Hifiberry soundcards as well as using the built-in PWM sound.

I started seeing this error since mod-monitor is activated by default. What could be the cause?
My particular problem would be solved with command-line option to disable the mod-monitor client...

'worker' feature not supported?

Hello,

I'm currently trying to use the worker schedule LV2 feature in a plugin and mod-host doesn't seem to support it, even though it is mentioned on the Readme.md file. When I print out all of the supported features in the instantiate function, I get:

for (int i = 0; features[i]; ++i)
    lv2_log_error(&self->logger, "Host feature:  %s\n", features[i]->URI);
Host feature detected:  http://lv2plug.in/ns/ext/uri-map
Host feature detected:  http://lv2plug.in/ns/ext/urid#map
Host feature detected:  http://lv2plug.in/ns/ext/urid#unmap
Host feature detected:  http://lv2plug.in/ns/ext/options#options
Host feature detected:  http://moddevices.com/ns/ext/license#feature
Host feature detected:  http://lv2plug.in/ns/ext/buf-size#powerOf2BlockLength
Host feature detected:  http://lv2plug.in/ns/ext/buf-size#fixedBlockLength
Host feature detected:  http://lv2plug.in/ns/ext/buf-size#boundedBlockLength

Also in this list I can't find some other features mentioned there, which are known to work, for example midi and logger (which is clearly working as the lines are printed out, though the LV2_Log_Log pointer is not properly initialized). Am I missing something?

Thanks in advance

problem understanding how to load a plugin

Hi,

I've a problem to understand how to load a local plugin.

I've a plugin located under /home/pi/.lv2/GigaVerb.lv2 and I try to load it in mod-host (with interactive mode) using the command :
add file:///home/pi/.lv2/GigaVerb.lv2/GigaVerb.lv2 0

I receive an error :

can't get plugin
resp -101

I'm sure I miss something, but I don't know what... Can you help me ?

Regards,

Jérémie

midi program change commands in readme not actually implemented?

While trying to issue either of those commands:
set_midi_program_change_pedalboard_snapshot_channel set_midi_program_change_pedalboard_bank_channel
mentioned in the readme I get a "not found" response. grepping for them didn't find any references in the sources as well. Am I missing something or are they not there?

Abrir mod-host mediante script.

Hola, creo que lo que intento hacer no es posible:

Busco generar un script (#!/bin/bash) que automáticamente inicie mod-host con un plugin LV2 y le asigne a este un Midi CC en un determinado <param_symbol>.

Es la unica forma en que me resultaría útil mod-host, pero parece que no es posible. Si alguien tiene alguna idea coméntela. Busco un Host LV2 liviano con posibilidad de asignar Midi CC a los plugins.

Socket interface seems to be broken

Trying to connect using nc or telnet to port 5555, I don't get any action or reponse. echo "help" | nc localhost 5555 should return something, right? I'm using expect instead atm ..

Fake Hw descriptor

Is there a way to fake the mod dwarf hw descriptor to utilize the new gate and compressor features? I have mod running on a raspberry pi and it could use the noise gate in particular.

monitor port output should produce some kind of end-of-message marker

To experiment with the monitoring feature, I'm running a netcat listener like so:

pi@pieight:~ $ nc -l 6666

This results in the following output for multiple monitored events:
monitor 1 gain -10.000000monitor 1 gain -3.000000...
Which is somewhat tedious to parse. Is this intentional? If not, can I suggest to add a newline to mark the end of a message, like so:

pi@pieight:~/build/mod-host $ git diff
diff --git a/src/monitor.c b/src/monitor.c
index 1057598..64676ea 100644
--- a/src/monitor.c
+++ b/src/monitor.c
@@ -164,7 +164,7 @@ int monitor_send(int instance, const char *symbol, float value)
     int ret;
 
     char msg[255];
-    sprintf(msg, "monitor %d %s %f", instance, symbol, value);
+    sprintf(msg, "monitor %d %s %f\n", instance, symbol, value);
 
     ret = write(g_sockfd, msg, strlen(msg) + 1);
     if (ret < 0)

Trouble using preset_save

I've run into a few issues using preset_save and consecutive preset_load:
Saving the current state into a new preset using preset_save 0 "Preset Name" <home>/.lv2/helm.lv2 preset_name.ttl successfully creates files. But in manifest.ttl, the tag is <preset_name.ttl> instead of e.g. <http://url#preset_name>. In preset_name.ttl, the tag is empty <>. If I want to load this preset, I didn't succeed using something like preset_load 0 preset_name or preset_load 0 http://url#preset_name like it works for the factory presets of the synth. I can load the preset if I manually change the titles to the url form.
The other big issue is that I can't read a preset I just saved unless I restart mod-host as it seems to have cached the values/files. It also takes a bit of time to load the first preset, so it appears to get everything once when the first preset_load is called? I'd be ok if it could at least re-read the values from the file every time (with cached preset names).

Add ability to hide external UI

There is a command show_external_ui which shows the LV2 plugin's external UI. There should be the complementary function to hide the UI. There should also be a check as to whether the external UI is already showing before launching it, otherwise you can get orphaned displays.

IR-files don't get loaded

Hi,

Probably not an issue but pebcak. I did not exactly know where to post this. This repositoriy seemed to fit best. If you think it should be posted somewhere else please let me know.

I am compiling mod-host on my machine for ubuntu using x86_64 as a platform in order to run it on the box directly.
Thus mod-host reads all plugins from /usr/lib/lv2/
So I compiled some plugins and also https://github.com/moddevices/mod-cabsim-IR-loader using https://github.com/moddevices/mod-plugin-builder and copied the output from ~/mod-workdir/x86_64/plugins/* to /usr/lib/lv2/ to get things to show up when starting mod-host and mod-ui.
https://github.com/moddevices/mod-cabsim-IR-loader/blob/master/source/cabsim-IR-loader.lv2/cabsim-IR-loader.ttl states that I should put my IR files at the Speaker Cabinet IRs folder. But unfortunately I cannot find the folder and do not know where to place the IR files instead. The default IR (...AliceInBones...) will always get loaded and resides in /usr/lib/lv2/cabsim-IR-loader.lv2. Putting my IRs right next to this default IR file did not do the trick. Event if I restart the computer in between.

So obviously I am doing something wrong here and should be putting the IR files somewhere else. Can you give me a hint, where the files should be placed in order to have them show up?

How to enable midi slave?

Hey there! After being recommended by FalkTX to use this package as a method of syncing to BPM, I've been running into some issues.

I was excited to see the "midi_clock_slave" option available in the Readme, but now find that that feature seemingly doesn't exist. Is there something I'm missing? I've been fiddling with it on and off for the last few weeks, but I just can't seem to get it too work.

Version v0.10.6-391-gf3ecdda

-t option not recognised

The --self-test command line option has the short option -t but t is missing from the getopt_long call and hence -t is not recognised.

Can be fixed by adding t to the getopt_long call in mod-host.c main function.

I am not sure how valid the self test is. It looks more relevant to Cardinal project!

Compiling Error

Hi,
during "make" I get two errors:

src/mod-host.c: In function ‘help_cb’:
src/mod-host.c:571:28: error: ‘help_msg’ undeclared (first use in this function)
571 | size_t i, len = strlen(help_msg);
| ^~~~~~~~
src/mod-host.c:571:28: note: each undeclared identifier is reported only once for each function it appears in
src/mod-host.c: In function ‘main’:
src/mod-host.c:779:26: error: ‘version’ undeclared (first use in this function)
779 | argv[0], version);
| ^~~~~~~

Whats going wrong?

ToM

verbose argument does nothing

Setting the verbose option does not have an effect, e.g. messages received via socket are not printed (protocol.c:129)

Interactive mode is unuseable

Issuing commands in interactive mode results in error loop of

"send error: Socket operation on non-socket"

I tracked it down in the code to the fact that even in interactive mode the program wants to send the responses back using
socket_send( ) function, but using file descriptor "1" (STDOUT stream), which causes the socket lib to error out.

OS is Debian, from Stable to Sid, kernels : 6.1 and 6.7, arch amd64 and arm64.

Commands not documented in Readme

Hello, checking the source code I noticed some commands that are not documented in Readme

I believe the following list represents all commands supported by mod-host:

mod-host/src/mod-host.h

Lines 54 to 81 in 299a397

#define EFFECT_ADD "add %s %i"
#define EFFECT_REMOVE "remove %i"
#define EFFECT_PRESET_LOAD "preset_load %i %s"
#define EFFECT_PRESET_SAVE "preset_save %i %s %s %s"
#define EFFECT_PRESET_SHOW "preset_show %s"
#define EFFECT_CONNECT "connect %s %s"
#define EFFECT_DISCONNECT "disconnect %s %s"
#define EFFECT_BYPASS "bypass %i %i"
#define EFFECT_PARAM_SET "param_set %i %s %s"
#define EFFECT_PARAM_GET "param_get %i %s"
#define EFFECT_PARAM_MON "param_monitor %i %s %s %f"
#define EFFECT_LICENSEE "licensee %i"
#define MONITOR_ADDR_SET "monitor %s %i %i"
#define MONITOR_OUTPUT "monitor_output %i %s"
#define MIDI_LEARN "midi_learn %i %s %f %f"
#define MIDI_MAP "midi_map %i %s %i %i %f %f"
#define MIDI_UNMAP "midi_unmap %i %s"
#define MIDI_PROGRAM_LISTEN "midi_program_listen %i %i"
#define CC_MAP "cc_map %i %s %i %i %s %f %f %f %i %s %i ..."
#define CC_UNMAP "cc_unmap %i %s"
#define CPU_LOAD "cpu_load"
#define LOAD_COMMANDS "load %s"
#define SAVE_COMMANDS "save %s"
#define BUNDLE_ADD "bundle_add %s"
#define BUNDLE_REMOVE "bundle_remove %s"
#define OUTPUT_DATA_READY "output_data_ready"
#define HELP "help"
#define QUIT "quit"

I'm developing PluginsManager, a python library to control lv2 plugins (using mod-host). I intend in the future to give a greater support, so I need the information about the options implemented in mod-host.

External UI is unusable

Some LV2 plugins provide their own GUI that they can host themselves, not dependant on the LV2 host. This is launched with the show_external_ui call. An example LV2 with this feature is synthv1. The LV2 plugin needs to have its idle function called peridically to allow it to perform functions such as update its GUI. This only happens in mod-host when there is a socket connection and a command is processed, i.e. the LV2 plugin's GUI is only updated after a mod-host command over socket. It won't work at all with the CLI.

The GUI does function, i.e. changes made on the GUI seem to take affect but the GUI is not updated with those changes until mod-host receives a command.

The call to effects_idle_external_uis is within the socket recv handler. For this to work we probably need effects_idle_external_uis to be called more regularly in its own (or another appropriate) thread. We could use poll instead of socket.recv to allow timeout and subseqent effects_idle_external_uis call but this does not fix it not working in the CLI (interactive) mode.

Tests use obsolecent Python 2

The Python scripts in the tests directory fail when run with Python 3. Python 2 was end-of-life 4 years ago and is often not installed on developer's systems. It would be advantageous for the test scripts to be updated to run with Python 3.

some commands only work in interactive mode, not via telnet/netcat

Hi, I have a strange problem where some commands work fine in interactive mode, but not via telnet/netcat.
This is one: connect effect_0:outR effect_1:in_r. Succeeds in interactive, but throws a -205 every time I try it via the socket.
save foo.txt is another. Via the socket, it will freeze the telnet session, audio continues, no file ever appears. In interactive mode, it works correctly.

With the first example, I can't be completely sure if it isn't some weird character escaping thing, but the second one seems simple enough that it can't plausibly be eaten by any stupid 7bit channel in between...

How to delimit messages over socket connection?

Hi, I'm playing with controlling mod-host over nodejs

The problem I'm having is that if a I send more than one messages in a short period of time, they are being sent in the same TCP packet, this is expected behaviour afaik.

Mod-host receives as one message and throws 'many arguments' error.
The question is if I can send a flag (line '\n') so mod-host splits the commands and executes them sequentially

I've tried setting '\n' at the end of each command, but its being ignored. What seems to partially work is adding a '\0' flag but then it will only process the first message.

Thank you

when loading a saved history , the "map" clauses (to midi) do not get reassigned

This is expected as a statement such as
"map 0 gain" does not contain the assigned midi channel , so saving and retrieving this history will not re-connect a midi channel to a control (ie. gain).
It would be extremely useful if I was able to set the midi channel I want to connect to a controller. F.e.:
map 0 gain 1 10

this could potentially connect "gain" of FXid "0" to midi control #10 , on midi channel #1).

external host sync with clock+start/stop when using mclk.lv2 plugin

Hi!

Seems like mclk clock gets messed'up when using host sync in mode clock+start/stop, it's somehow just set to 280bpm.
I'm trying to sync a Duo Mod X to Bitwig for recording.
If I set mclk to midi clock only it works fine.
Tried in Ardour, just to eliminate possible Bitwig problem, but same stuff happens.

Here is a video showing in details, hope this helps.
In the video you can see the Mod Duo X transport, the mclk plugin and Bitwig transport.

I reported this initially on mclk repo as issue but it seems like mclk is working fine if wired in Carla and using Carla's host transport (Jack transport), so I guess it could be a mod-host issue?

no JACK ouput

Hello,

I try to load a LV2 plugin with mod-host but in jack there is no output port

I just cloned the repo and did make && sudo make install

is there anything I am missing ?

thanks

https://i.imgur.com/Db4y6BT.png

Tag new release?

The last release was in 2014 but since then 148 commits have been made. Will a new release be tagged?

(I'm packaging mod-host for GNU Guix.)

PPQ of Mod-Host -> Host Time module in Cardinal?

I'm trying to use Mod-Host and Cardinal to sync to external midi clock.

My understanding is that 24 ppq is the MIDI clock standard but I seem to only get a max of 4 ppq out of the Host Time module.

Am I misunderstanding how to use Host Time? I need a higher ppq so that Cardinal clocks can calculate the incoming BPM fast enough to hold sync on clock start.

Option to connect to virtual midi ports?

Hi, thanks for the great software!

I'm using mod-host on PC and trying to make it work with Launchkey Mini mk3 midi-controller. Overall it works fine, but this controller doesn't provide an option to reconfigure the pads to send CC messages with toggle behavior. Thus I can't assign the pads to toggle plugin buttons. I've found a software (https://github.com/aolsenjazz/super-controller) that allows to remap keys by creating a new virtual midi port and sending patched midi commands there. However, it turned out that these virtual ports aren't available in mod-host, as only physical ports are added.

So my question is: is it possible to also add virtual ports to mod-host? Are there any restrictions aside from keeping UI simple?

Midi clock filtered too much, slow reaction time to tempo changes

I use a Kemper Profiler guitar amp to generate the midi clock signal. However, when I switch to a different performance (bank/slot) with a different tempo, mod-host takes too long to adjust to the new tempo (it ramps up or down too slowly). I find that the filter does not react fast enough. It makes it impossible to use the midi clock for songs that change suddenly change tempo. If I use:

#define AVERAGE_FILTER_STEPS 7 (instead of 47)

and completely disable the binomial filter, it works perfectly.

first compilation: error: readline/readline.h: No such file or directory

could be a beginners fault ;-), ToM

arm-mod-linux-gnueabihf-gcc -I/home/tmaier/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include -I/home/tmaier/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/lilv-0 -I/home/tmaier/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/serd-0 -I/home/tmaier/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/sord-0 -I/home/tmaier/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/sratom-0 -I/home/tmaier/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include -DHAVE_FFTW335 -DHAVE_NEW_LILV -O3 -D__MOD_DEVICES__ -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -mvectorize-with-neon-quad -ffast-math -fno-finite-math-only -fprefetch-loop-arrays -funroll-loops -funsafe-loop-optimizations -isystem /home/tmaier/mod-workdir/plugins-dep/staging/usr/include -O3 -Wall -Wextra -c -std=gnu99 -fPIC -D_GNU_SOURCE -fvisibility=hidden -o src/mod-host.o src/mod-host.c
src/mod-host.c:39:31: fatal error: readline/readline.h: No such file or directory
#include <readline/readline.h>
^
compilation terminated.

mod-host not responding to commands over control port until feedback port is connected to

run the following in this order (this is using BSD netcat):

  1. mod-host -p 5555 -f 6666

wait until it has forked..

  1. nc localhost 5555

  2. in this nc session: add foo 0

step 3 should have produced an error message but nothing happens. try too send any command to mod-host via nc.

  1. in another terminal: nc localhost 6666

after step 4 the error to the previous command appears.

  1. kill the nc on port 6666

after step 5 mod-host continues to operate over the control port as expected.

this is running mod-host on archlinux-arm (on a raspberry pi 4) from the mod-host-git package:

[alarm@alarmpi mod-host-git]$ mod-host --version
mod-host version: v0.10.6-352-gb70f6e3
source code: https://github.com/moddevices/mod-host

JackTickDouble undeclared

When running make on Ubuntu 18 or 20 it fails with that error.
What's the previous version that works on those distros?

pid file is annoying

Having exach instance of mod-host trying to open the same file to store a PID (why?) is annoying for those of us who run it as different users.

I have an instance of mod-host run by modep-mod-host service, and I run an instance (on a different port) for other reasons.

So they collide over /tmp/mod-host.pid

Pass through midi notes?

I wonder why it is not possible to pass through midi notes to loaded effects, possibly connecting a midi channel to an effect instance with a command. I've so far connected midi input to mod-host and effects separately. I've come to notice this is sub-optimal since most synths (juce based and others) simply use all midi input and pass it to the engine same as when running standalone. This leads to the problem that CC values that are mapped to params in mod-host also get changed again within the synth from the midi message directly (if they are mapped there e.g. from previous standalone usage). One could argue that synths need to check if they're running as lv2 and ignore midi cc but in fact most are not doing that. One way would be pass all midi to the effect through mod-host except cc messages (as they can/are mapped to params directly anyway). Then only one jack connection between device and mod-host is necessary.

Multiple instances

I have a virtual studio for my band, one that every musician listens through earphones... It would be nice if I could run multiple instances of mod-host, connected to the same jack session, but each with some input/output available. Then each musician would have an instance of mod-ui served in different ports, so everyone would be able to set his own chain separately. It doesn't seem to be feasible in current documentation. Is it an improvement that the mod team would be interested? I'm not a professional developer, but I can do some coding. Can anyone point me in the right direction? Thanks!

mod-monitor is now running by default

I'm testing hotfix-1.11 and noticed mod-monitor is now launched by main mod-host module and can no longer disabled. This could have been introduced earlier in the code, need to check.

This ends up in having mod-monitor module always between the last plugin output port and system:playback_*

In mono, this results in following jack routing

system:capture_1 -> effect_1:in -> effect_1:out -> effect_2:in -> effect_2:out -> mod-monitor:in_1 -> mod-monitor:out_1 -> system:playback_1

while on mod-ui interface right outputs are reported as Hardware Playback 1 (misleading)

I see mod-monitor implements a compressor functionality, however there are no controls on mod-ui for the parameters of this effect so I assume that is controlled by the moddevices hw hmi somehow.

I cannot find any documentation on this functionality both in mod-host and mod-ui source codes, please let me know otherwise.

[NOTE] derivative moddevices projects may prefer to not use mod-monitor/compressor

Cannot unload mod-monitor

Usint jack_load mod-host creates a jack client called mod-monitor and automatically connects its audio outputs to system playback ports. When jack_unload mod-host is run, the mod-monitor client remains active and connected. There seems no way to unload mod-monitor client.

Running on arm-32 OS (Debian based) on Raspberry Pi 4 (aarch64) using mod-host version: v0.10.6-532-g0d1cb54.

bypass still uses same amount of CPU

This is maybe half a feature request, half a question. I understand the bypass command is intended to temporarily disable effects in the processing chain. I've noticed that plugins which are bypassed still run as if they were not bypassed, no input and no output is passed. Would it be possible within mod-host/lilv to set these plugins to a proper idle mode so they consume no cpu?

List limit params (min, max)

Olá! Estou criando um projeto que irá utilizar esta biblioteca.

Testei no Readme o "preset_show < instance_number > < preset_uri >". Ele lista as portas com o valor padrão (pressuponho eu).

Gostaria de saber se é possível pegar os limites, como lv2info informa

Obs: Clonei hoje e "preset_show < instance_number > < preset_uri> " só funciona como "preset_show < preset_uri >"

Obrigado!


Hello! I'm creating a project that will use this library.

Tested in the Readme "preset_show < instance_number > < preset_uri >". It lists the ports with the default value (I presume).

I wonder if you can catch limits, as lv2info reports

Note: cloned today and "preset_show < instance_number > < preset_uri >" only works as "preset_show <preset_uri>"

preset_load with wrong params can lead to crash

If for example I load a preset with wrong uri

mod-host> preset_load 0 test
error: attempt to map invalid URI `test'
Segmentation fault
$ ...
Maybe because in effects.c, lilv_node_free() is called even if lilv_world_load_resource failed?

Status code == 0 when jack not started

When the mod-host runs without a server running jack, error messages appear, the mod-host is terminated but the status code of the returned mod-host is zero.

mod-host$ sh -c './mod-host'; echo $?
Forking... child PID: 11341
0
mod-host$ Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock

In my conception, a code status should be returned equivalent to an error.

Not building with Ubuntu Studio LTS or 23.10

I get the following error when trying to build the latest master. Probably has something to do with the latest changes since it has been working 2 weeks ago.
Pretty vanilla Ubuntu Studio except for installing needed jack development libraries etc.

I checked and jack_set_property and jack_get_property are present in /usr/include/jack/metadata.h

cc ./src/completer.o ./src/effects.o ./src/filter.o ./src/lv2_evbuf.o ./src/mod-host.o ./src/monitor.o ./src/protocol.o ./src/socket.o ./src/state-paths.o ./src/symap.o ./src/uridmap.o ./src/utils.o ./src/worker.o ./src/dsp/compressor_core.o ./src/monitor/monitor-client.o ./src/sha1/sha1.o ./src/rtmempool/rtmempool.o -s -Wl,--no-undefined -ljackserver -llilv-0 -ldl -lsratom-0 -lsord-0 -lserd-0 -lpthread -lm  -lfftw3_threads -lfftw3f_threads -lfftw3 -lfftw3f -lreadline -lrt -shared -o mod-host.so
/usr/bin/ld: ./src/effects.o: in function `effects_add':
effects.c:(.text+0xa983): undefined reference to `jack_set_property'
/usr/bin/ld: effects.c:(.text+0xa9da): undefined reference to `jack_set_property'
/usr/bin/ld: ./src/effects.o: in function `effects_cv_map':
effects.c:(.text+0xe8a1): undefined reference to `jack_get_property'
/usr/bin/ld: effects.c:(.text+0xe9eb): undefined reference to `jack_get_property'
collect2: error: ld returned 1 exit status
make: *** [Makefile:125: mod-host.so] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.