Skip to content

Commit a3aecd8

Browse files
authored
Merge pull request #1053 from pljones/ctrlmidich-improved-doc
--ctrlmidich improved documentation
2 parents 7a40c81 + abf5575 commit a3aecd8

File tree

2 files changed

+97
-10
lines changed

2 files changed

+97
-10
lines changed

wiki/en/Include-Client-Commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
- `--mutemyown` Prevent me from hearing what I play in the server mix (headless only)
33
- `-c` or `--connect` Connect to given server address on startup, format `address[:port]`
44
- `-j` or `--nojackconnect` Disable auto JACK connections
5-
- `--ctrlmidich` MIDI controller channel to listen on, control number offset and consecutive CC numbers (channels) and Mute Myself CC number. Format: `channel[;f*][;p*][;s*][;m*][;o]` See [Tips & Tricks](Tips-Tricks-More#using-ctrlmidich-for-midi-controllers)
5+
- `--ctrlmidich` MIDI channel to listen on, Jamulus control + MIDI control number and count of consecutive CC numbers (or Jamulus channels), device selection option. Format: `channel[;fn[*n]][;pn[*n]][;sn[*n]][;mn[*n]][;on][;dDeviceName]` See [Tips & Tricks](Tips-Tricks-More#using---ctrlmidich-for-midi-controllers).
66
- `--clientname` Window title and JACK client name

wiki/en/Tips-Tricks-More.md

Lines changed: 96 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,110 @@ Here is the script:
8080
jack_connect Jamulus:'output right' system:playback_2
8181
~~~
8282

83-
### Using ctrlmidich for MIDI controllers
83+
### Using `--ctrlmidich` for MIDI controllers
8484

85-
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:
85+
The volume fader, pan control and mute and solo buttons in the Client's mixer window strips can be controlled using a connected MIDI controller. This feature is available from version 3.7.0 on macOS, Linux, and the JACK version of Jamulus for Windows. From Jamulus 3.12.0 onwards, it is also available for the non-JACK (ASIO) Windows version. To enable this feature, Jamulus must be launched with the `--ctrlmidich` command-line option.
8686

87-
`--ctrlmidich "1;f0*8;p16*8;s32*8;m48*8;o64"`
87+
When this option is used on the command line, Jamulus will prepend a channel number to each Client name, which can be used to control the channel using MIDI CC numbers. In Jamulus version 3.12.0 onwards, when connected to a server of at least version 3.5.5, your own fader will always be given channel 0, and so will appear first when sorted by channel or when "Own Fader First" is enabled.
8888

89-
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.
89+
*Tip*: 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. To keep the fader strips following a numerical order, go to "View" on the top menu bar and switch to "Sort by Channel" (or type `Ctrl+E`).
9090

91-
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.
91+
When using JACK or macOS, make sure you connect your MIDI device's output port to the Jamulus MIDI in port (QjackCtl (Linux/Windows), Audio/MIDI Setup (macOS) or whatever you use for managing connections). In Linux you may need to install and launch `a2jmidid` so your device shows up in the MIDI tab in Qjackctl. For non-JACK Windows, Jamulus will find the MIDI device(s) automatically, but see the `d` option below if more than one MIDI device is connected.
9292

93-
*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.
93+
`--ctrlmidich` takes a single argument. If you omit it, the parameter is ignored. There are two formats for the argument:
9494

95-
Fader strips in the mixer window are controlled in ascending numerical order. Continuing with the above example, in strip numbered 0, 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.
95+
1. The legacy definition has one or two numbers in the format:
9696

97-
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 may need to install and launch a2jmidid so your device shows up in the MIDI tab in Qjackctl.
97+
```
98+
[MIDI channel];[offset for first fader]
99+
```
98100

99-
*Tip*: When you enable MIDI control in Jamulus, each user's name is prepended with a number, with the first 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. To keep the fader strips following a numerical order, go to "View" on the top menu bar and switch to "Sort by Channel" (or type `Ctrl+E`). In Jamulus version 3.12.0 onwards, when connected to a server of at least version 3.5.5, your own fader will always be given channel 0, and so will appear first, whether or not "Own Fader First" is enabled.
101+
* `MIDI channel` is required or else the parameter argument is ignored and the feature is not active. `0` means "any channel", `1`-`16` listen only to MIDI messages on the specified MIDI channel.
102+
103+
* `offset for first fader` is the first MIDI CC to use to control a Jamulus Channel fader (default 70, which matches the Behringer X-Touch defaults), with all MIDI CCs after that being used; must be a number or else the long form is used.
104+
105+
For example
106+
107+
```
108+
--ctrlmidich "0"
109+
```
110+
111+
would listen on all MIDI channels and use MIDI controller 70 to control Jamulus channel 0 fader and so on. Here's another example:
112+
113+
```
114+
--ctrlmidich "2;50"
115+
```
116+
117+
This would listen on MIDI channel 2 and use MIDI controller 50 to control Jamulus channel 0 fader and so on.
118+
119+
2. The long form is a sequence of offsets and counts for various controllers:
120+
121+
```
122+
[MIDI channel];[control letter][offset](*[count])(;...)
123+
```
124+
125+
* `MIDI channel` is required or else the parameter argument is ignored and the feature is not active. `0` means "any channel", `1`-`16` listen only to MIDI messages on the specified MIDI channel.
126+
127+
* `control letter` defines which Jamulus Control the MIDI controller number is assigned to:
128+
129+
| control letter | Jamulus Control |
130+
|--------:|---------|
131+
| `f` | Fader |
132+
| `p` | Pan |
133+
| `s` | Solo |
134+
| `m` | Mute |
135+
136+
* `offset` is the base MIDI CC number for the control.
137+
138+
* `count` is the number of CC values for the control, defaulting to 1 (i.e. the number Jamulus channels that can be controlled).
139+
140+
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
141+
142+
```
143+
--ctrlmidich "0;f0*8;p16*8"
144+
```
145+
146+
Enhancing this to add eight Solo buttons starting at CC 32, and eight Mute buttons starting at CC 48 would give:
147+
148+
```
149+
--ctrlmidich "0;f0*8;p16*8;s32*8;m48*8"
150+
```
151+
152+
* Two additional `control letter` values are available:
153+
154+
1. `o` controls Mute Myself and has a single `offset` (i.e. `count` is ignored and taken as 1).
155+
156+
2. `d` is an option on Windows non-JACK Jamulus to specify a particular MIDI input device by name -- without this, all devices will be assigned to Jamulus; with it, only the specified device will be used. For example:
157+
158+
```
159+
--ctrlmidich "1;f0*8;dnanoKontrol"
160+
```
161+
162+
would listen for CC0 through CC7 on MIDI channel 1 from a MIDI device called "nanoKontrol". Remember to wrap the whole of the `--ctrlmidich` argument in double quotes and you will have no problems with device names containing spaces.
163+
164+
In order to discover the correct device name to use, start Jamulus from the command line with `--ctrlmidich` and observe the output. Jamulus will list all discovered MIDI devices:
165+
166+
```
167+
C:\Users\Me>"C:\Program Files\Jamulus\Jamulus" --ctrlmidich "0"
168+
- MIDI controller settings: 0
169+
- allocated port number: 22134
170+
- MIDI devices found: 2
171+
0: nanoKONTROL2
172+
1: Keystation Mini 32
173+
174+
C:\Users\Me>"C:\Program Files\Jamulus\Jamulus" --ctrlmidich "1;f0*8;p16*8;s32*8;m48*8;dnanoKONTROL2"
175+
- MIDI controller settings: 1;f0*8;p16*8;s32*8;m48*8;dnanoKONTROL2
176+
- allocated port number: 22134
177+
- MIDI devices found: 2
178+
0: nanoKONTROL2
179+
1: Keystation Mini 32 (ignored)
180+
```
181+
182+
Note that if only one MIDI device is connected, the `d` option is not necessary, as Jamulus will use the device automatically.
183+
184+
On macOS, Linux or Windows with JACK, the `d` option is accepted if given, but ignored.
185+
186+
*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, that is, 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.
100187
101188
## For Server admins
102189

0 commit comments

Comments
 (0)