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

Install mod-ui cabsim-IR-loader #188

Merged
merged 1 commit into from Mar 25, 2021
Merged

Conversation

steveb
Copy link
Contributor

@steveb steveb commented Mar 19, 2021

This is an LV2 plugin which allows arbitrary impulse responses to be loaded.

It is not obvious how other impulse response files are loaded though, currently
it is only showing forward-audio_AliceInBones.wav in the mod-ui plugin menu.

This is an LV2 plugin which allows arbitrary impulse responses to be loaded.

It is not obvious how other impulse response files are loaded though, currently
it is only showing forward-audio_AliceInBones.wav in the mod-ui plugin menu.
@riban-bw
Copy link
Contributor

riban-bw commented Mar 20, 2021

Launching jalv.gtk shows the generic jalv UI with the gain [-90..0] and Impulse Response file selector. Loading a different file from here shows in jalv's output that the new impulse file is loaded and old one released. Attempts to load it in Zynthian were less successful with a key error:

Mar 20 14:59:58 zynthian-3 startx[462]: ERROR:zynthian_engine.start: Can't start engine Jalv/IR loader cabsim => Timeout exceeded.
Mar 20 14:59:58 zynthian-3 startx[462]: <pexpect.pty_spawn.spawn object at 0x6ccc2bb0>
Mar 20 14:59:58 zynthian-3 startx[462]: command: /usr/bin/jalv.gtk
Mar 20 14:59:58 zynthian-3 startx[462]: args: ['/usr/bin/jalv.gtk', '--jack-name', 'IR_loader_cabsim-00', 'http://moddevices.com/plugins/mod-dev
Mar 20 14:59:58 zynthian-3 startx[462]: buffer (last 100 chars): b'ame:    IR_loader_cabsim-00\r\nGain    = 0.000000\r\nResponding to get reques
Mar 20 14:59:58 zynthian-3 startx[462]: before (last 100 chars): b'ame:    IR_loader_cabsim-00\r\nGain    = 0.000000\r\nResponding to get reques
Mar 20 14:59:58 zynthian-3 startx[462]: after: <class 'pexpect.exceptions.TIMEOUT'>
Mar 20 14:59:58 zynthian-3 startx[462]: match: None
Mar 20 14:59:58 zynthian-3 startx[462]: match_index: None
Mar 20 14:59:58 zynthian-3 startx[462]: exitstatus: None
Mar 20 14:59:58 zynthian-3 startx[462]: flag_eof: False
Mar 20 14:59:58 zynthian-3 startx[462]: pid: 29171
Mar 20 14:59:58 zynthian-3 startx[462]: child_fd: 37
Mar 20 14:59:58 zynthian-3 startx[462]: closed: False
Mar 20 14:59:58 zynthian-3 startx[462]: timeout: 20
Mar 20 14:59:58 zynthian-3 startx[462]: delimiter: <class 'pexpect.exceptions.EOF'>
Mar 20 14:59:58 zynthian-3 startx[462]: logfile: None
Mar 20 14:59:58 zynthian-3 startx[462]: logfile_read: None
Mar 20 14:59:58 zynthian-3 startx[462]: timeout: 20
Mar 20 14:59:58 zynthian-3 startx[462]: timeout: 20
Mar 20 14:59:58 zynthian-3 startx[462]: delimiter: <class 'pexpect.exceptions.EOF'>
Mar 20 14:59:58 zynthian-3 startx[462]: logfile: None
Mar 20 14:59:58 zynthian-3 startx[462]: logfile_read: None
Mar 20 14:59:58 zynthian-3 startx[462]: logfile_send: None
Mar 20 14:59:58 zynthian-3 startx[462]: maxread: 2000
Mar 20 14:59:58 zynthian-3 startx[462]: ignorecase: False
Mar 20 14:59:58 zynthian-3 startx[462]: searchwindowsize: None
Mar 20 14:59:58 zynthian-3 startx[462]: delaybeforesend: 0
Mar 20 14:59:58 zynthian-3 startx[462]: delayafterclose: 0.1
Mar 20 14:59:58 zynthian-3 startx[462]: delayafterterminate: 0.1
Mar 20 14:59:58 zynthian-3 startx[462]: searcher: searcher_re:
Mar 20 14:59:58 zynthian-3 startx[462]:     0: re.compile(b'\n> ')
Mar 20 14:59:58 zynthian-3 startx[462]: ERROR:zynthian_gui.zyncoder_read: 'Plugin not found: http://moddevices.com/plugins/mod-devel/cabsim-IR-l
Mar 20 14:59:58 zynthian-3 startx[462]: Traceback (most recent call last):
Mar 20 14:59:58 zynthian-3 startx[462]:   File "./zynthian_gui.py", line 1241, in zyncoder_read
Mar 20 14:59:58 zynthian-3 startx[462]:     self.zynswitches()
Mar 20 14:59:58 zynthian-3 startx[462]:   File "./zynthian_gui.py", line 940, in zynswitches
Mar 20 14:59:58 zynthian-3 startx[462]:     self.zynswitch_short(i)
Mar 20 14:59:58 zynthian-3 startx[462]:   File "./zynthian_gui.py", line 1135, in zynswitch_short
Mar 20 14:59:58 zynthian-3 startx[462]:     self.screens[self.modal_screen].switch_select('S')
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_selector.py", line 251, in switch_select
Mar 20 14:59:58 zynthian-3 startx[462]:     self.click_listbox(None, t)
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_selector.py", line 247, in click_listbox
Mar 20 14:59:58 zynthian-3 startx[462]:     self.select_action(self.index, t)
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_midi_chan.py", line 115, in select_action
Mar 20 14:59:58 zynthian-3 startx[462]:     self.zyngui.screens['layer'].add_layer_midich(selchan)
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_layer.py", line 301, in add_layer_midich
Mar 20 14:59:58 zynthian-3 startx[462]:     zyngine = self.zyngui.screens['engine'].start_engine(self.add_layer_eng)
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_engine.py", line 178, in start_engine
Mar 20 14:59:58 zynthian-3 startx[462]:     self.zyngines[eng]=zynthian_engine_class(info[0], info[2], self.zyngui)
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/home/pi/zynthian-ui/zyngine/zynthian_engine_jalv.py", line 201, in __init__
Mar 20 14:59:58 zynthian-3 startx[462]:     self.lv2_zctrl_dict = self.get_lv2_controllers_dict()
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/home/pi/zynthian-ui/zyngine/zynthian_engine_jalv.py", line 305, in get_lv2_controllers_dict
Mar 20 14:59:58 zynthian-3 startx[462]:     for i, info in zynthian_lv2.get_plugin_ports(self.plugin_url).items():
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/home/pi/zynthian-ui/zyngine/zynthian_lv2.py", line 401, in get_plugin_ports
Mar 20 14:59:58 zynthian-3 startx[462]:     plugin = plugins[plugin_url]
Mar 20 14:59:58 zynthian-3 startx[462]:   File "/usr/local/lib/python3.7/dist-packages/lilv.py", line 981, in __getitem__
Mar 20 14:59:58 zynthian-3 startx[462]:     raise KeyError("Plugin not found: " + str(key))
Mar 20 14:59:58 zynthian-3 startx[462]: KeyError: 'Plugin not found: http://moddevices.com/plugins/mod-devel/cabsim-IR-loader'

It does not seem possible to load IR files from MOD-UI but the description of the plugin says,

In order for your personal IR files to show up in the list of available files for this plugin, please place the files in the “Speaker Cabinet IRs” folder of your device.
I am not sure where that would be on the Zynthian. I tried putting it in the same folder as the plugin but that didn't work.
I have confirmed that changing IR files using jalv.gtk works although it does not support larger files as stated in its description.

@steveb
Copy link
Contributor Author

steveb commented Mar 21, 2021

In order for your personal IR files to show up in the list of available files for this plugin, please place the files in the “Speaker Cabinet IRs” folder of your device.

I can provide a little more context for this. In the mod-ui bottom-left navigation there is now a 'File Manager' icon which tries to load http://zynthian.local:8081/ in the frame. This is meant to be served by the moddevices forked browsepy. There is a whole standard layout for different file types which we'll need to map to our existing zynthian-my-data layout, but I got something basic working locally:

root@zynthian-2:/zynthian/zynthian-my-data/files/mod-ui# tree
.
└── Speaker Cabinets IRs
    ├── V-Type 112 O R-121 Balanced Celestion.wav
    ├── V-Type 112 O R-121 Bright Celestion.wav
    ├── V-Type 112 O R-121 Dark 2 Celestion.wav
    ├── V-Type 112 O R-121 Dark Celestion.wav
    ├── V-Type 112 O R-121 Fat Celestion.wav
    └── V-Type 112 O R-121 Thin Celestion.wav

1 directory, 6 files
root@zynthian-2:/zynthian/zynthian-my-data/files/mod-ui#
browsepy 0.0.0.0 8081 --directory /zynthian/zynthian-my-data/files/mod-ui
 * Serving Flask app "browsepy" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:8081/ (Press CTRL+C to quit)

This resulted in the File Manager UI showing the following, it seems to be a read-only file browser so I don't see how it gets us any closer to integrating with the cabsim plugin. Regardless we should work towards integrating browsepy with the mod-ui service.

@steveb
Copy link
Contributor Author

steveb commented Mar 21, 2021

Here is the logic which defines the expected directory layout . We could replicate these directories in zynthian-my-data with symlinks to other directories in zynthian-my-data

@steveb
Copy link
Contributor Author

steveb commented Mar 21, 2021

falkTX explained how it works here, and I've updated the browsepy pull request to set MOD_USER_FILES_DIR. The cabsim menu is now populated

@jofemodo jofemodo added this to Awaiting in Zynthian Tracker Mar 25, 2021
@jofemodo jofemodo merged commit ac7f20a into zynthian:testing Mar 25, 2021
Zynthian Tracker automation moved this from Awaiting to Testing Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Zynthian Tracker
  
Testing
Development

Successfully merging this pull request may close these issues.

None yet

3 participants