Difference between revisions of "Accessing Zynthian from your computer"

From ZynthianWiki
Jump to navigation Jump to search
m (Fix formatting in OSC section.)
(45 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Basic Remote Network Connection ==
+
== Network Connection ==
  
The easier way of connecting your Zynthian is using the ethernet RJ45 connector to connect your unit to your local network.
+
The easier way of connecting your Zynthian is to use the Ethernet RJ45 connector with a CAT-5 cable to connect your unit to your local network (DHCP) or directly to your computer (Ethernet to Ethernet, aka link-local). Your Zynthian box uses the link-local name "zynthian.local" and its filesystem can be accessed with '''sftp''' and '''scp''' (If you are using Windows, use '''Winscp''' - free software needed to communicate using this Internet protocol).
You can access the Zynthian with sftp or scp (winscp, if you are using windows yet). Of course, you can login with ssh too. The login and password are the default for Raspbian:
+
 
 +
You can also login with '''ssh''' to access the Linux console. see [[Command_Line_User_Guide]] (use '''PuTTY''' software for Windows). The username and default password are:
 +
 
 +
user=root
 +
password=raspberry
 +
 
 +
If the link-local address (zynthian.local) is not found, test that the link-local feature is enabled in your system. Sometimes is disabled and local names are not recognized (i.e. on Windows). Instead, you can use the Zynthian's IP address. Find out what that is using the "Network Info" utility in the Zynthian's Admin menu. or See: [[Finding your IP address]]
 +
 
 +
== Accessing the Web Configuration Tool ==
 +
 
 +
You can access web configuration tool using the web browser from your computer:
 +
 
 +
# Connect your Zynthian to your local network using the ethernet connector (RJ45) or directly to your computer (Ethernet to Ethernet)
 +
# Open the browser in your computer and type in the address bar:
 +
 
 +
zynthian.local  (or the IP address of your Zynthian)
 +
 
 +
(If zynthian.local does not work, see [[Finding your IP address]] )
 +
 
 +
The web config tool will load and prompt for the admin password. It is "raspberry".
 +
 
 +
[[File:zynthian_webconf_login.png]]
 +
 
 +
Here's details on using the Web configuration tool: [[Configuration_Users_Guide]]
 +
 
 +
== Wifi Configuration ==
 +
 
 +
Wifi credentials can be set via the web config tool: System - Wifi - Add Network. Wifi must be enabled in the Zynthian Gui: press the Back button until you are in the Admin menu. Then select 'Start WIFI'.
 +
 
 +
== Accessing the MOD-UI web interface ==
 +
 
 +
If you have a recent zynthian image with MOD integration (Gorgona or later), you can access the MOD-UI web interface using the web browser from your computer:
 +
 
 +
# Connect your Zynthian to your local network using the ethernet connector (RJ45) or directly to your computer (ethernet to ethernet)
 +
# Open the browser in your camputer and type in the address bar:
 +
 
 +
zynthian.local:8888
 +
 
 +
The MOD-UI webpage should appear. Enjoy! ;-)
 +
 
 +
If the link-local address (zynthian.local) is not found, test that the link-local feature is enabled in your system. Sometimes is disabled and local names are not recognized.
 +
Instead, you can use the zynthian's IPaddress.  Find out what that is using the "Network Info" utility in the Zynthian's Admin menu.
 +
 
 +
== Opening Synth Engine Native GUIs in your Computer ==
 +
 
 +
Some engines have a native GUI that can be accessed from your desktop/laptop computer. There are several methods for achieving this:
 +
 
 +
===X11 Server===
 +
 
 +
For using this method, you need an X11 Server running on your desktop/laptop computer.
 +
 
 +
* If you use Linux, probably you already have it, so you don't need to do nothing special. Simply login into your zynthian using the ssh with the "-Y" option for forwarding the X session:
 +
 
 +
  $ ssh -Y root@zynthian.local
 +
 
 +
* If you are a "Mac" user, you should install and enable the '''XQuartz''' package. After that, login into your zynthian with the same command.
 +
 
 +
* If you are a "Windows" user, then you should install the '''XMing''' package and login into your zynthian using Putty with the "X11 forwarding" option enabled.
 +
 
 +
[[File:Putty-on-zynth-X11.png]]
 +
 
 +
===VNC===
 +
 
 +
You also could use VNC on any platform, although it's slighty complex:
 +
 
 +
* Login into your zynthian box and enter:
 +
 
 +
  # apt-get install vnc4server blackbox
 +
  # pico ~/.vncrc
 +
 
 +
* enter this line to set the desktop size:
 +
 
 +
    $geometry = “2048x1600”;
 +
 
 +
* start the vnc server:
 +
 
 +
  # vnc4server
 +
 
 +
* Connect to the vnc server using (e.g.) windows TightVNC viewer.
 +
 
 +
===Supported Engines with Native GUI===
 +
 
 +
Currently ''ZynAddSubFX'', ''Aeolus'' and ''Pure Data'' have support for native GUI, that is launched automatically when layer is created. Other GUI software can be launched, like ''qjackctl'' or a virtual MIDI keyboard for testing. Support for Soundfont GUI using ''Polyphone'' will be added in the future ;-)
 +
 
 +
'''IMPORTANT:''' Using an ethernet-to-ethernet (cable) connection will reduce latency and improve usability.
 +
 
 +
== Copying your presets/soundfonts to Zynthian ==
 +
 
 +
You can copy your presets/soundfonts/pedalboards in the next folder:
 +
 
 +
/zynthian/zynthian-my-data
 +
 
 +
There are different subfolders:
 +
 
 +
+ mod-pedalboards
 +
+ soundfonts
 +
  + gig
 +
  + sfz
 +
  + sf2
 +
+ snapshots
 +
+ zynbanks
 +
 
 +
In 'mod-pedalboards' you will find your stored MOD-UI pedalboards.
 +
Use SFZ and GIG soundfonts with LinuxSampler. SF2 soundfonts must be used with FluidSynth. SFZ and GIG fonts must be stored in 'category' subfolders.
 +
User's ZynAddSubFX presets/banks must be stored in the "zynbanks" directory.
 +
 
 +
If you have doubts of how to store your data, take a look in this directory:
 +
 
 +
/zynthian/zynthian-data
 +
 
 +
Here you will find the same folder structure, with some additions.
 +
 
 +
If you are really interested, you could, for instance, edit the setBfree configuration, and change the CC assignments, etc.
 +
 
 +
'''IMPORTANT:''' after adding or changing something in 'zynthian-data', you can’t update the zynthian-library from the Admin menu. (The "git-based" updating system should be improved...)
 +
 
 +
If you are using an old SD image (prior to Gorgona), the username and password are the default for Raspbian:
  
 
  user=pi
 
  user=pi
 
  password=raspberry
 
  password=raspberry
  
Once you are in, you can configure the wifi in your Zynthian by editing the file:
+
==CUIA Callable UI Actions==
 +
 
 +
The Zynthian may be controlled by MIDI messages applied to the Master MIDI Channel (default 16) defined in The Webconf Interface
  
/etc/wpa_suppplicant/wpa_supplicant.con
+
The Interface allows applying on MIDI IN commands on channel 16 (default) that mimic various zynthian gui interface commands with some functional short cuts also provided ('POWER_OFF', ALL_NOTES_OFF').
  
Note that this file is protected and you have to edit as root user (sudo).
+
The Message is sent as a Note on Message (0x9)  
  
After editing the WPA settings, you can restart the network interface using a command like this:
+
So To Power Off a zynthian one sends
 +
0x9F  ( Channel 16 Note ON)
 +
0x00  ( Note code for POWER_OFF as below )
 +
0x00  (Velocity/parameter)
  
  $ sudo ifdown wlan0
+
This is why you should operate secure networks . . . :-D
$ sudo ifup wlan0
 
  
== Opening Synth Engine Natives GUIs in your Computer ==
 
  
For doing this, you need a XServer running on your computer. Linux is best tested, but i've tested with Mac and Windows too.
 
You must follow this simple steps:
 
  
  1. Login into zynthian using the "-Y" option or equivalent (tunnel X connections)
+
  "0": "POWER_OFF",
  $ ssh -Y pi@zynthianip
+
  "1": "REBOOT",
   
+
  "2": "RESTART_UI",
  2. Stop zynthian GUI:  
+
"3": "RELOAD_MIDI_CONFIG",
  $ sudo /etc/init.d/zynthian stop
 
  
  3. Start zynthian GUI in remote GUI mode:  
+
  "10": "ALL_NOTES_OFF",
  $ sudo /etc/init.d/zynthian startx
+
"11": "ALL_SOUNDS_OFF",
 +
"12": "ALL_OFF",
  
  4. From Zynthian GUI, select the synth engine. Currently only ZynAddSubFX and Carla have supported native GUIs.
+
  "51": "SELECT",                     D#3/Eb3
 +
"52": "SELECT_DOWN",                E3
 +
"53": "SELECT_UP",                  F3
  
  5. Enjoy!! ;-)
+
  "64": "SWITCH_BACK_SHORT",          E4
 +
"63": "SWITCH_BACK_BOLD",          D#4/Eb4
 +
"62": "SWITCH_BACK_LONG",          D4
  
'''IMPORTANT:''' Try to use an ethernet (RJ45) connection as it will reduce latency and improve usability.
+
"65": "SWITCH_SELECT_SHORT",        F4
 +
"66": "SWITCH_SELECT_BOLD",        F#4/Gb4
 +
"67": "SWITCH_SELECT_LONG",        G4
 +
 +
"60": "SWITCH_LAYER_SHORT",        C4
 +
"61": "SWITCH_LAYER_BOLD",          C#4/Db4
 +
"59": "SWITCH_LAYER_LONG",          B4
  
== Copying your presets/soundfonts to Zynthian ==
+
"71": "SWITCH_SNAPSHOT_SHORT",      B5
 +
"72": "SWITCH_SNAPSHOT_BOLD",      C5
 +
"73": "SWITCH_SNAPSHOT_LONG"        C#5/Db5
  
You can copy your presets/soundfonts in the next forlder:
+
[[File:2Oct_Keyboard_CUIA.png|400px|Keyboard]]
  
/home/pi/zynthian/zynthian-data
 
  
There are different subfolders for every type/synth-engine:
+
== OSC ==
  
carla
+
Open Sound Control (OSC) is a protocol for networking sound synthesizers, computers, and other multimedia devices for purposes such as musical performance or show control.
dexed
 
lscp
 
midish
 
setbfree
 
soundfonts
 
zynbanks
 
zynconf
 
  
You can use SFZ soundfonts with LinuxSampler but GIG are not integrated yet. I will do it very soon. SF2 soundfonts can be used with FluidSynth.
+
Zynthian implements OSC in various ways.
  
Also, you can add your ZynAddSubFX instruments/banks, Carla patches, edit the setBfree configuration, etc.
+
=== CUIA ===
 +
The CUIA features described above may be controlled using OSC on port 1370 using UDP datagrams. The OSC path for CUIA messages is
 +
/cuia
 +
Example:
 +
/cuia/reboot
 +
Note: CUIA paths are case insensitive, e.g.
 +
/cuia/reboot
 +
is interpreted the same as
 +
/CUIA/REBOOT
  
'''IMPORTANT:''' after adding or changing something in zynthian-data, you can’t update the zynthian-library from the Admin menu nevermore.  
+
=== TouchOSC ===
I have to implement the use of “zynthian-my-data” folder to avoid this problem and maintain separated the “official” library from user’s library. TODO!
+
TouchOSC protocol is supported if the option is enabled on the Zynthian admin menu. This accepts OSC on port 12101 using UDP datagrams and includes raw MIDI data interpretation on OSC path
 +
/midi
 +
This path accepts an OSC MIDI type message. An example Python script to send MIDI note on / off messages:
 +
import liblo
 +
import time
 +
 +
cmdNoteOn = 0x90
 +
cmdNoteOff = 0x80
 +
note = 60
 +
vel = 100
 +
 +
liblo.send(('zynthian.local', 12101), "/midi", ('m', (vel,note,cmdNoteOn,0)))
 +
time.sleep(1)
 +
liblo.send(('zynthian.local', 12101), "/midi", ('m', (0,note,cmdNoteOff,0)))

Revision as of 08:28, 10 June 2019

1 Network Connection

The easier way of connecting your Zynthian is to use the Ethernet RJ45 connector with a CAT-5 cable to connect your unit to your local network (DHCP) or directly to your computer (Ethernet to Ethernet, aka link-local). Your Zynthian box uses the link-local name "zynthian.local" and its filesystem can be accessed with sftp and scp (If you are using Windows, use Winscp - free software needed to communicate using this Internet protocol).

You can also login with ssh to access the Linux console. see Command_Line_User_Guide (use PuTTY software for Windows). The username and default password are:

user=root
password=raspberry

If the link-local address (zynthian.local) is not found, test that the link-local feature is enabled in your system. Sometimes is disabled and local names are not recognized (i.e. on Windows). Instead, you can use the Zynthian's IP address. Find out what that is using the "Network Info" utility in the Zynthian's Admin menu. or See: Finding your IP address

2 Accessing the Web Configuration Tool

You can access web configuration tool using the web browser from your computer:

  1. Connect your Zynthian to your local network using the ethernet connector (RJ45) or directly to your computer (Ethernet to Ethernet)
  2. Open the browser in your computer and type in the address bar:
zynthian.local   (or the IP address of your Zynthian)

(If zynthian.local does not work, see Finding your IP address )

The web config tool will load and prompt for the admin password. It is "raspberry".

Zynthian webconf login.png

Here's details on using the Web configuration tool: Configuration_Users_Guide

3 Wifi Configuration

Wifi credentials can be set via the web config tool: System - Wifi - Add Network. Wifi must be enabled in the Zynthian Gui: press the Back button until you are in the Admin menu. Then select 'Start WIFI'.

4 Accessing the MOD-UI web interface

If you have a recent zynthian image with MOD integration (Gorgona or later), you can access the MOD-UI web interface using the web browser from your computer:

  1. Connect your Zynthian to your local network using the ethernet connector (RJ45) or directly to your computer (ethernet to ethernet)
  2. Open the browser in your camputer and type in the address bar:
zynthian.local:8888

The MOD-UI webpage should appear. Enjoy! ;-)

If the link-local address (zynthian.local) is not found, test that the link-local feature is enabled in your system. Sometimes is disabled and local names are not recognized. Instead, you can use the zynthian's IPaddress. Find out what that is using the "Network Info" utility in the Zynthian's Admin menu.

5 Opening Synth Engine Native GUIs in your Computer

Some engines have a native GUI that can be accessed from your desktop/laptop computer. There are several methods for achieving this:

5.1 X11 Server

For using this method, you need an X11 Server running on your desktop/laptop computer.

  • If you use Linux, probably you already have it, so you don't need to do nothing special. Simply login into your zynthian using the ssh with the "-Y" option for forwarding the X session:
  $ ssh -Y root@zynthian.local
  • If you are a "Mac" user, you should install and enable the XQuartz package. After that, login into your zynthian with the same command.
  • If you are a "Windows" user, then you should install the XMing package and login into your zynthian using Putty with the "X11 forwarding" option enabled.

Putty-on-zynth-X11.png

5.2 VNC

You also could use VNC on any platform, although it's slighty complex:

  • Login into your zynthian box and enter:
  # apt-get install vnc4server blackbox
  # pico ~/.vncrc
  • enter this line to set the desktop size:
   $geometry = “2048x1600”;
  • start the vnc server:
  # vnc4server
  • Connect to the vnc server using (e.g.) windows TightVNC viewer.

5.3 Supported Engines with Native GUI

Currently ZynAddSubFX, Aeolus and Pure Data have support for native GUI, that is launched automatically when layer is created. Other GUI software can be launched, like qjackctl or a virtual MIDI keyboard for testing. Support for Soundfont GUI using Polyphone will be added in the future ;-)

IMPORTANT: Using an ethernet-to-ethernet (cable) connection will reduce latency and improve usability.

6 Copying your presets/soundfonts to Zynthian

You can copy your presets/soundfonts/pedalboards in the next folder:

/zynthian/zynthian-my-data

There are different subfolders:

+ mod-pedalboards
+ soundfonts
 + gig
 + sfz
 + sf2
+ snapshots
+ zynbanks

In 'mod-pedalboards' you will find your stored MOD-UI pedalboards. Use SFZ and GIG soundfonts with LinuxSampler. SF2 soundfonts must be used with FluidSynth. SFZ and GIG fonts must be stored in 'category' subfolders. User's ZynAddSubFX presets/banks must be stored in the "zynbanks" directory.

If you have doubts of how to store your data, take a look in this directory:

/zynthian/zynthian-data

Here you will find the same folder structure, with some additions.

If you are really interested, you could, for instance, edit the setBfree configuration, and change the CC assignments, etc.

IMPORTANT: after adding or changing something in 'zynthian-data', you can’t update the zynthian-library from the Admin menu. (The "git-based" updating system should be improved...)

If you are using an old SD image (prior to Gorgona), the username and password are the default for Raspbian:

user=pi
password=raspberry

7 CUIA Callable UI Actions

The Zynthian may be controlled by MIDI messages applied to the Master MIDI Channel (default 16) defined in The Webconf Interface

The Interface allows applying on MIDI IN commands on channel 16 (default) that mimic various zynthian gui interface commands with some functional short cuts also provided ('POWER_OFF', ALL_NOTES_OFF').

The Message is sent as a Note on Message (0x9)

So To Power Off a zynthian one sends

0x9F  ( Channel 16 Note ON) 
0x00  ( Note code for POWER_OFF as below )
0x00  (Velocity/parameter)

This is why you should operate secure networks . . . :-D


"0": "POWER_OFF",
"1": "REBOOT",
"2": "RESTART_UI",
"3": "RELOAD_MIDI_CONFIG",
"10": "ALL_NOTES_OFF",
"11": "ALL_SOUNDS_OFF",
"12": "ALL_OFF",
"51": "SELECT",                     D#3/Eb3
"52": "SELECT_DOWN",                E3
"53": "SELECT_UP",                  F3
"64": "SWITCH_BACK_SHORT",          E4
"63": "SWITCH_BACK_BOLD",           D#4/Eb4
"62": "SWITCH_BACK_LONG",           D4
"65": "SWITCH_SELECT_SHORT",        F4
"66": "SWITCH_SELECT_BOLD",         F#4/Gb4
"67": "SWITCH_SELECT_LONG",         G4

"60": "SWITCH_LAYER_SHORT",         C4
"61": "SWITCH_LAYER_BOLD",          C#4/Db4
"59": "SWITCH_LAYER_LONG",          B4
"71": "SWITCH_SNAPSHOT_SHORT",      B5
"72": "SWITCH_SNAPSHOT_BOLD",       C5
"73": "SWITCH_SNAPSHOT_LONG"        C#5/Db5

Keyboard


8 OSC

Open Sound Control (OSC) is a protocol for networking sound synthesizers, computers, and other multimedia devices for purposes such as musical performance or show control.

Zynthian implements OSC in various ways.

8.1 CUIA

The CUIA features described above may be controlled using OSC on port 1370 using UDP datagrams. The OSC path for CUIA messages is

/cuia

Example:

/cuia/reboot

Note: CUIA paths are case insensitive, e.g.

/cuia/reboot

is interpreted the same as

/CUIA/REBOOT

8.2 TouchOSC

TouchOSC protocol is supported if the option is enabled on the Zynthian admin menu. This accepts OSC on port 12101 using UDP datagrams and includes raw MIDI data interpretation on OSC path

/midi

This path accepts an OSC MIDI type message. An example Python script to send MIDI note on / off messages:

import liblo
import time

cmdNoteOn = 0x90
cmdNoteOff = 0x80
note = 60
vel = 100

liblo.send(('zynthian.local', 12101), "/midi", ('m', (vel,note,cmdNoteOn,0)))
time.sleep(1)
liblo.send(('zynthian.local', 12101), "/midi", ('m', (0,note,cmdNoteOff,0)))