Skip to content

Commit

Permalink
Update wiki description
Browse files Browse the repository at this point in the history
  • Loading branch information
pljones committed Oct 5, 2024
1 parent 2ee0b43 commit a71fad6
Showing 1 changed file with 79 additions and 8 deletions.
87 changes: 79 additions & 8 deletions wiki/en/Tips-Tricks-More.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,92 @@ Here is the script:
jack_connect Jamulus:'output right' system:playback_2
~~~

### Using ctrlmidich for MIDI controllers
### Using `--ctrlmidich` for MIDI controllers

The volume fader, pan control and mute and solo buttons in the Client's mixer window strips can be controlled using a MIDI controller by using the `--ctrlmidich` parameter (note: only available for use with macOS and Linux using Jamulus version 3.7.0 or higher, and on Windows using the Jamulus version with JACK support). To enable this feature, Jamulus must be launched with `--ctrlmidich`. There is one global MIDI channel parameter (1-16) and two parameters you can set for each item controlled: `offset` and `consecutive CC numbers`. Set the first parameter to the channel you want Jamulus to listen on (0 for all channels) and then specify the items you want to control (f = volume fader; p = pan; m = mute; s = solo; o = mute myself) with the offset (CC number to start from) and number of consecutive CC numbers. There is one exception that does not require establishing consecutive CC numbers which is the "Mute Myself" command - it only requires a single CC number as it is only applied to one's own audio stream. Take the following example:
When this option is used on the command line, Jamulus will display a server channel number assigned to each client, which can be used to control the channel using MIDI CC numbers. (Note: This is only available for use with macOS and Linux using Jamulus version 3.7.0 or higher, and on Windows using the Jamulus version with JACK support. It also relies on the Jamulus UI being displayed.)

`--ctrlmidich "1;f0*8;p16*8;s32*8;m48*8;o64"`
Make sure you connect your MIDI device's output port to the Jamulus MIDI in port (QjackCtl (Linux/Windows), MIDI Studio (macOS) or whatever you use for managing connections). In Linux you will need to install and launch a2jmidid so your device shows up in the MIDI tab in Qjackctl.

Here, Jamulus listens on MIDI channel 1. Volume fader CC numbers start at 0 and there are 8 of them (so end at CC number 7). Pan controls start at CC number 16 and end at 23; Solo 32 to 39 and Mute 48 to 55. Mute Myself is enabled/disabled by CC number 64.
There are two formats for the command line argument parameter:

Please note that for the functions controlled by buttons to work properly, your MIDI controller needs the buttons to be set to "toggle" mode. This means that when pressed to 'turn on' a control, it must send a MIDI CC number with a value >=64, and to 'turn off' the control it must send the same CC number with a value <64. You can read your controller's manual to find out how to set this.
1. The legacy definition has one or two numbers:

*Note*: Jamulus does not provide feedback on the on/off state of buttons, meaning that your controller must keep track and toggle LEDs (if any) to 'on' or 'off' itself.
```
[MIDI channel];[offset for first fader]
```

Fader strips in the mixer window are controlled in ascending order from left to right. Continuing with the above example, in strip number 1 (farthest left), the volume fader would be controlled by CC number 0; pan by 16; solo by 32 and mute by 48. As we have specified 8 consecutive controllers for each parameter, this would give us MIDI control over 8 strips (volume, pan, solo and mute in each one) in the mixer window. The next strip would be controlled by 1, 17, 33 and 49, and so forth.
* `MIDI channel` defaults to `0`, meaning "any channel".

Make sure you connect your MIDI device's output port to the Jamulus MIDI in port (QjackCtl (Linux/Windows), MIDI Studio (macOS) or whatever you use for managing connections). In Linux you will need to install and launch a2jmidid so your device shows up in the MIDI tab in Qjackctl.
* `offset for first fader` is the first MIDI CC to use to control a Jamulus Channel fader (default 70 for the sake of Behringer X-Touch), with all MIDI CCs after that being used.

The legacy format is very forgiving in checking values. For example

```
--ctrlmidich yes
```
would listen on all MIDI channels and use MIDI controller 70 to control Jamulus channel 0 fader and so on. A more realistic example might be
```
--ctrlmidich "2;50"
```
which would listen on MIDI channel 2 and use MIDI controller 50 to control Jamulus channel 0 fader and so on.
2. The long form is a sequence of offsets and counts for various controllers:
```
[MIDI channel];[control letter][offset](*[count](;...))
```
This format is stricter with its parsing, requiring numbers to be numbers and letters to be known values. You could end up with the legacy default if you get something wrong.
* `MIDI channel` defaults to `0`, meaning "any channel".
* `control letter` defines which Jamulus Control the MIDI controller number is assigned to:
| control letter | Jamulus Control |
|--------:|---------|
| `f` | Fader |
| `p` | Pan |
| `s` | Solo |
| `m` | Mute |
* `offset` is the base MIDI CC number for the control.
* `count` is the number of CC values for the control, defaulting to 1 (i.e. the number Jamulus channels that can be controlled).
* Two additional `control letter` values are available:
1. `o` controls Mute Myself and has a single `offset` (i.e. `count` is ignored and taken as 1).
2. `z` is an option to reserve the first CC number for a control to mean "my Jamulus channel". For example
```
--ctrlmidich "1;f0*9;z"
```
would mean MIDI CC0 controls "my" Jamulus channel fader, with CC1 to CC8 for Jamulus channels 0 to 7 (so if you were channel 3, you get two MIDI CC controls - CC0 and CC4).
An example for a Korg nanoKONTROL2 using eight sliders starting at MIDI CC 0 to control faders and eight knobs starting at MIDI CC 16 to control pan, on any MIDI channnel, for eight Jamulus channels would be
```
--ctrlmidich "0;f0*8;p16*8"
```
Another example:
```
--ctrlmidich "1;f0*9;p16*9;s32*9;m48*9;o64;z"
```
Here, Jamulus listens on MIDI channel 1 and uses nine MIDI controller numbers for each Jamulus control: one for "My Channel" plus eight for Jamulus channels 0 to 7. MIDI CC numbers 0 (for "My Channel") to 8 control faders. Pan controls start at CC number 16 ("my") and end at 24; Solo 32 ("my") to 40 and Mute 48 ("my") to 56; Mute Myself is enabled/disabled by CC number 64.
Please note that buttons on your MIDI controller need to be set to "toggle" mode. This means that when pressed to 'turn on' a control, it must send a MIDI CC number with a value >=64, and to 'turn off' the control it must send the same CC number with a value <64. You can read your controller's manual to find out how to set this.
*Note*: Jamulus does not provide feedback on the on/off state of buttons, meaning that your controller must keep track and toggle LEDs (if any) to 'on' or 'off' itself.
Jamulus channel numbers are assigned by the server and displayed in the mixer when you use `--ctrlmidich`. When you join a server, you can get a different Jamulus channel depending on who else is already there (hence using the "my channel" option, `z`).
*Tip*: When you enable MIDI control in Jamulus, each user's name is prepended with a number, with the leftmost user starting at 0, then 1, etc. With default settings, when some users leave and others join, their left-right arrangement in the GUI may cease to follow a numerical order, making it more difficult to know who each physical fader/knob on your MIDI controller corresponds to. In order to keep the fader strips following a numerical order, go to "View" on the top menu bar and switch between "No User Sorting" and another option and then back again (e.g. type `Ctrl+N`, `Ctrl+O`).
Expand Down

0 comments on commit a71fad6

Please sign in to comment.