New SD image setup script

Hi @C0d3man!

I’m having problems when saving “new” pedalboards. Can you confirm the issue?

Thanks!

Hi @jofemodo

Confirmed! But if you wait about 1 minute it works… strange…

Regards, Holger

Hi @jofemodo

Found the problem: You have to start mod-monitor. This is an internal jack-client so you have to load it after starting jack with jack_load mod-monitor. I have added this to the systemd service and loaded mod-host also as an internal client. Also disabled the mod-host service and it works!

systemctl stop mod-host
systemctl disable mod-host
cat > /etc/systemd/system/jack2.service <<EOF
[Unit]
Description=JACK2 Audio Server
After=sound.target

[Service]
LimitRTPRIO=infinity
LimitMEMLOCK=infinity
Environment=HOME=/root
Environment=LV2_PATH=/zynthian/zynthian-plugins/lv2:/zynthian/zynthian-my-plugins/lv2
WorkingDirectory=/root
ExecStart=/usr/local/bin/jackd -P70 -t2000 -s -d alsa -dhw:0 -r44100 -p256 -X raw -n2
ExecStartPost=/usr/local/bin/jack_load mod-host
ExecStartPost=/usr/local/bin/jack_load mod-monitor

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl restart jack2
systemctl restart mod-ui

Regards, Holger

1 Like

Hi @C0d3man!

Your solutions is quite elegant, but i would prefer to not enable mod-monitor “by now”. It’s only a hub that redirect output to system output and, if available, to mod-peakmeter.

Using environment variables we can disable the mod-monitor feature in mod-ui:

Environment=MOD_APP=1
Environment=MOD_LIVE_ISO=1

But this also produces some unwanted side effects, like disabling “pedalboards bank feature” in the GUI, so, i’ve modified mod-ui, adding a custom environment variable that only disable mod-monitor usage:

Environment=MOD_APP=0
Environment=MOD_LIVE_ISO=0
Environment=MOD_SYSTEM_OUTPUT=1

As you can see, the zynthian mod-ui fork also add some extra messages to websocket protocol that are needed for sending the pedalboard name to the zynthian UI:

When the new image is released, i will try to get this changes into the MOD main trunk. Will see … :wink:

Regarding the mod-host change to run as a jack internal client, i like this, so i will try to integrate it in the new image.

Regards!

Another way (without touching mod-ui) is to use ‘jack_alias’ to create name aliases for mod-ui…

Regards, Holger

Hi @C0d3man!
Finally we will use older (and more stable) versions of mod-ui and mod-host. FalkTx has recommended to do so.

Regards!

Hi @jofemodo,

found another problem:
in ~/zynthian-sys/scripts/setup_system_rbpi_minibian_jessie.sh, line 324:

wget Download Fantasia-0.9.jar (JSampler)

This redirects to HTTPS and than ERROR: The certificate of ‘vorboss.dl.sourceforge.net’ is not trusted.

I suggest to change line this to the following to avoid this error (or disable using fantasia complete?):

wget --no-check-certificate Download Fantasia-0.9.jar (JSampler)

Regards, Holger

Hi @jofemodo,

another suggestion:
Add to /root/.bashrc the following:

export ZYNTHIAN_DIR=“/zynthian”
export ZYNTHIAN_SW_DIR=“${ZYNTHIAN_DIR}/zynthian-sw”
export ZYNTHIAN_UI_DIR=“${ZYNTHIAN_DIR}/zynthian-ui”
export ZYNTHIAN_SYS_DIR=“${ZYNTHIAN_DIR}/zynthian-sys”
export ZYNTHIAN_DATA_DIR=“${ZYNTHIAN_DIR}/zynthian-data”
export ZYNTHIAN_RECIPE_DIR=“${ZYNTHIAN_DIR}/zynthian-recipe”
export ZYNTHIAN_PLUGIN_DIR=“${ZYNTHIAN_DIR}/zynthian-plugins/lv2”
export LV2_PATH=“${ZYNTHIAN_PLUGIN_DIR}”

machine=uname -m 2>/dev/null || echo unknown
if [ ${machine} = “armv7l” ]
then
model=cat /sys/firmware/devicetree/base/model 2>/dev/null || echo unknown
if [[ ${model} =~ [3] ]]
then
CPU=“-mcpu=cortex-a53”
FPU=“-mfpu=neon-fp-armv8”
else
CPU=“-mcpu=cortex-a7 -mthumb”
FPU=“-mfpu=neon-vfpv4”
fi
FPU=“${FPU} -mneon-for-64bits”
fi
echo “Hardware: Architecture: ${machine} Model: ${model}”
export CFLAGS=“${CPU} ${FPU}”
export CXXFLAGS=${CFLAGS}

It would be nice to have the standard variables exported for using when logged in. The rest of the statements configures the compiler flags on base of Raspi2 or Raspi3 which (perhaps?) creates more optimized binaries.

Regards, Holger

Hi @jofemodo,

and another one:
Please add

apt-get install -y lvtk-tools

to /zynthian/zynthian-sys/scripts/recipes/install_dexed_dcoredump.sh. If not, no ttl2c helper program will be found.

Regards, Holger

Hi @C0d3man!

The fantasía installation fixup and your improvements for .bashrc are accepted. It will be in the repo this morning.
Regarding the last one, i was installing lvtk from git repo, using your “recipe”. Do you think is better to install from the repo?

Regards!

Hi @jofemodo,

many thanks!

ttl2c is not part of the lvtk-repo, so it is no problem to install it from the system.

Regards, Holger

Thanks to you, Mr @C0d3man! Your contribution to Zynthian is huge!! :heart:

OK! It’s added too.

Regards!

Hi @C0d3man!

The changes are in the repo.
I’m generating a new SD image … perhaps this is the last one before the release!! :wink:

Regards!

Hi @jofemodo,

just another addition/suggestion:
When installing modules for mod-ui with pip3, I discovered (many month ago) that you need a correct date/time setting for SSL. That’s the reason why I added ntpdate to the recipe-scripts. But I just discovered a problem with NTP: The incoming UDP port 123 has to be open. This maybe a problem in some networks so installation of software which needs a SSL connection will fail.

I just found that there is a tool, which lets set the clock based on HTTP requests: htpdate. From my point of view it would be better to exchange ntpdate to htpdate:

setup_system_rbpi_minibian_jessie.sh, line 61:
apt-get -y install sudo apt-utils htpdate parted

setup_system_rbpi_minibian_jessie.sh, line 217:
htpdate 0.europe.pool.ntp.org

Regards, Holger

1 Like

OK! I’ve replaced ntpdate by htpdate in the setup script.

Thanks!

Noticing that this script is in the “mod” branch of the git repo–curious if that’s the main branch of development rather than the more traditional “master”?