Test SD-Image MOD-UI

Hi Zynthianics,

here is a test image for MOD-UI. This image is currently not using the encoders or the TFT! It is only for testing and playing around with MOD-UI. The goal is to integrate the MOD-UI function into the Zynthian image. But for this I need some time…

NEW IMAGE FILE IS DOWNLOADABLE UNTIL 25.9.2016!

You need:

  • Raspi 2 or 3
  • Hifiberry DAC(+)
  • SD card (>=4GB)
  • DHCP-Server in LAN or Ehternet PtP (in your browser http://raspberry.local:8888)
  • ttymidi (normal Zynthian MIDI jacks) or USB-MIDI

Download the image and write it onto your SD-card. Start the Raspi and wait… it currently takes some time to start the system. After some time you can try to connect from another computer to :8888

MOD_Zynthian-0.4.img.xz

Have fun, Holger

1 Like

Nice!! I’ve the image. I will try to test it ASAP and give you some feedback :wink:

The filename is a little bit confusing: currently this image is a headless and standalone software only supporting MOD-UI. Integration into Zynthian follows…

This is a screendump from a very complex example I made with MOD-UI:
A step sequencer plays a fluidsynth drumkit (the rhythm of Genesis’ Mama). A keysplitter splits a lower octave to channel 1, a doubler doubles the pressed key by an octave and sends it to a fluidsynth ensemble with a chorus in chain. the other side of the keysplitter (channel 2) goes to another keypslitter (splits to channel 3 and 4). The channels are send to a fluidsynth organ and a fluidsynth synth-pad on different octaves from the midi keyboard. All audio signals are then connected together and send to a reverb and the reverbs goes to the outout.

CPU usage is about 50% and RAM usage around 20%.

2 Likes

Hi @C0d3man,

Just to tell you your MOD-UI image is awesome. I’ll be looking forward it’s integrated in Zynthian. I guess it will not be so simple as MOD-UI use a graphical interface.

Thanks for sharing your nice work!!

Regards, Jose

Hi @jofemodo, @smespresati,

I have some ideas how to do this. First login to the raspi and run

pedalboard

With the shell script pedalboard you can load with MOD-UI generated pedalboards directly in MOD-UI. Currently it’s a work-around where you need MOD-UI running for loading and you have to reload MOD-UI after loading a pedalboard from shell (a pedalboard is such a configuration like the picture above). I have to create a load mechanism that works without MOD-UI - but i think it is not to difficult.

So I think the best way would be to add an engine name “MOD” and than show a list of the pedalboards. For loading and playing the pedalboard you don’t need a running MOD-UI (but this feature is currently not implemented in my CLI pedalboard program). It’s enough that you start a mod-host with some parameters to load a bundle. Than you can play your preconfigured pedalboard without MOD-UI.

I think there should be two entries added to the list of pedalboards:

  1. Start MOD-UI (should be renamed Stop MOD-UI if MOD-UI is running)
  2. Start MOD-SDK (this is needed if you want to create a GUI element for a “native” LV2 plugin, should also be called Stop…)

BTW: MOD-UI and MOD-SDK can be started/stopped/restarted from the shell with sudo systemctl [start|stop|restart] mod-ui|mod-sdk

So I think it should not be so difficult to do it, or? MOD-UI is only needed for configuration and only than you have to connect via external browser. On stage you can recall without MOD-UI and external equipment.

Have fun!

Holger

Hi @C0d3man!

I’m running your MOD-image and testing your saved “pedalboards”. It’s very impressive. MOD-UI is really responsive. As fast as light! Congratulations for the great integration you are doing !! :wink:

I’m running your image in a headless RBPi2+HifiBerry combo:

Some minor details:

  • While booting it blocks for 1 min trying to raise some network service. I’ve not investigated deeply …

  • I’ve replaced “dhclient” by “dhcpcd” and enabled avahi-daemon. Dhcp-client is not capable (currently) of configuring link-local IPv4 and that is really useful in our scenario. With IPv4 link-local configured, you can connect the RBPi to the PC with a ethernet cable (point2point) and simply write “raspberrypi.local:8888” in the browser’s address bar :wink:
    What i’ve done:

  • sudo systemctl enable dhcpcd

  • sudo systemctl enable avahi-daemon

  • sudo systemctl disable dhcp-client

Some questions:

  • Have you wrote the init scripts for the specific services (mod-host, mod-ui, a2jmidid)?
  • What directory is used to store the saved pedalboards? :wink:
1 Like

Hi @jofemodo,

many thanks :slight_smile:!
Currently I am compressing the 0.2 image. This version has ttymidi integration and some additional plugins.

BTW: My hardware setup looks nearly the same than yours (but uses a plastic case).

Yes, there is a network-DHCP problem. If I enable WLAN it takes much more time to boot. I havn’t investigated that problem because I want to drop the current image setup and start install MOD onto the last Zynthian image.

The hint with the dhcpd/avahi is really nice!!! MOD-Duo can emulate a network device via USB (RNDIS). This maybe also a feature for us - but later…

The systemd init scripts are made by me, yes. I am totaly new to systemd and I have had much problems to get it running. They seem to work - so I am happy and won’t touch them until someone knows it better :smile:

The pedalboards are in /home/pi/.pedalboard. For the 0.2 I have added a simple perl script (/home/pi/bin/pedalboard2modhost) which takes a pedalbaord-filename as argument and writes mod-host commands to standard-out. Why doing this? Because then you are able to run a pedalboard without MOD-UI (headless), e.g.

$ pedalboard2modhost /home/pi/.pedalboard/Rhodes.pedalboard/Rhodes.ttl | /usr/local/bin/mod-host -i

So it is very easy to fire up apedalboard from zynthian_gui.py :wink:

New version maybe uploaded at the weekend - depending on my next tests…

Regards, Holger

Great! Then we are ready to integrate MOD into Zynthian image as a new engine! Really wonderful!

If you integrate everything over the last Zynthian image, i could patch the zynthian init scripts and implement the new MOD-engine class.

Anyway, I would like to conserve Carla engine by now, until we add midi-CC integration to the new MOD-engine, so, it would be nice to unify the plugins directories for Carla and MOD.
Currently there is a “zynthian/zynthian-plugins” dir, that is updated from github. What do you think about this? Should be use the pseudo-standard plugins directories in /usr/share and /usr/local/share and forget the current setup?

Super-Regards! :wink:

I will begin with adding MOD-UI to the current Zynthian image the next days. When I am ready I will send you the “recipe” and an link to the new image.

One question: MOD-UI thinks the midi input is called ttymidi in jack. I solved this by starting mod-ttymidi at boot time and using an udev rule which stops mod-ttymidi, creates a jack-alias for the usb-midi interface (called ttymidi) and restarts mod-host/mod-ui (what a dirty hack! :smile:) when adding a usb-midi interface. Unplugging usb-midi removes the link and starts mod-ttymidi (+ restart mod-host/mod-ui). Does this match the current zynthian midi logic?

Regards, Holger

Zynthian uses ttymidi as the standard (legacy) MIDI-IN (same as MOD-DUO) and list the MIDI inputs filtering their features (is_input, is_hardware). The autoconnector daemon creates connections from every MIDI input (ttymidi/USB) to the current engine. Perhaps this should be improved.
One key feature of Zynthian is that you can connect 2 or more MIDI devices. It would be nice id MOD-UI could “list” all the MIDI inputs as connectors in the left side, including ttymidi and USB. Do you think that will be difficult to achieve?

From the current state of MOD-UI: yes, it will be difficult. I think mod-host engine should not have any problems but if I understand the sources of MOD-UI right, this must be done additionaly (by us). As MOD-UI is the “firmware” of the MOD-Duo and MOD-Duo has only one MIDI port, so more MIDI inputs have to be coded by us (I don’t think that MOD has currently any interrest or time for doing this).

I think we should first install MOD-UI on the main Zynthian image and than try to add more MIDI inputs. Perhaps we can arrange this with the MOD Team together.

Regards, Holger

Just tested my MOD-Duo: It can use ttymidi AND adding of additional USB-MIDI works! I will take a look at the sources how to manage adding and will try to fix it for our usage.

Regards, Holger

@jofemodo

I am testing with adding USB-MIDIs to MOD-UI. This seems to be a little bit tricky because MOD-UI searches the jack ports for MIDI in/outs - but they have to use “special” names, starting with “system:” and they are doing some confusing string splits:

    for port in ports:
        if not port.startswith(("system:", "nooice")):
            continue
        alias = get_jack_port_alias(port)
        if alias:
            title = alias.split("-",5)[-1].replace("-"," ")
            out_ports[title] = port

If I understand right the name MUST begin with “system:” and there has to be an alias. I won’t touch the sources of MOD-UI, so I have to replace auto alsa2jack (a2jmidid) with a selfmade port mapping by udev+script (to get a “system:” at the beginning of the name string…

Regards, Holger

I addded the new download URL for a news image to the first article in this thread.

Changes:

  • some more plugins
  • ttymidi works (xor USB-MIDI)

I am working on supporting additional USB-MIDIs…

Regards, Holger

Hi @C0d3man!

I’m downloading the new image. I will try it ASAP.
Have you replaced dhcpclient by dhcpcd and enabled avahi-daemon? The link-local feature is very useful!! :wink:

Regards!

@jofemodo Oh - aeh… I made the image last friday. I think I have done this, but I have tested so much the last days that I really don’t remeber anymore what I have exactly done last friday :confused:

Sorry guys - I have added a newer and better MOD-UI Testimage - now version 0.3 and the last before integrating into Zynthian. Why so fast a new image? Because I got adding of USB-MIDI running! Here are the changes:

  • With the button ADD MIDI DEVICE at the bottom you can add further USB inputs/outputs.
  • Added AT-1 autotune plugin
  • Added MIDI Clock (Play/Rewind) plugin
  • Added smaller step sequencers: 84 and 44

As usual I changed the download link in the top article of this thread.

Regards, Holger

There is a little bug in 0.3: it seems that the creation of preview images of pedalboards is broken due to an old version of phantomjs. It will be fixed in the Zynthian-integrated version.

Regards, Holger

Ok, new version: 0.4 (see top article for download link). I fixed some problems with creating the thumbnails for the pedalboards…

Regards, Holger