aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/jack.md2
-rw-r--r--backends/midi.md2
-rw-r--r--backends/mqtt.c13
-rw-r--r--backends/rtpmidi.md2
-rw-r--r--backends/winmidi.md2
5 files changed, 10 insertions, 11 deletions
diff --git a/backends/jack.md b/backends/jack.md
index c67f060..f57d303 100644
--- a/backends/jack.md
+++ b/backends/jack.md
@@ -65,7 +65,7 @@ used instead of the word `channel` (Note that `channel` here refers to the MIDI
The following values are recognized for `type`:
* `cc` - Control Changes
-* `note` - Note On/Off messages
+* `note` - Note On/Off messages (also known as note velocity)
* `pressure` - Note pressure/aftertouch messages
* `aftertouch` - Channel-wide aftertouch messages
* `pitch` - Channel pitchbend messages
diff --git a/backends/midi.md b/backends/midi.md
index 6280205..ae03440 100644
--- a/backends/midi.md
+++ b/backends/midi.md
@@ -27,7 +27,7 @@ Each instance also provides a virtual port, so MIDI devices can also be connecte
The MIDI backend supports mapping different MIDI events to MIDIMonster channels. The currently supported event types are
* `cc` - Control Changes
-* `note` - Note On/Off messages
+* `note` - Note On/Off messages (also known as note velocity)
* `pressure` - Note pressure/aftertouch messages
* `aftertouch` - Channel-wide aftertouch messages
* `pitch` - Channel pitchbend messages
diff --git a/backends/mqtt.c b/backends/mqtt.c
index 6bc366e..6d25fd3 100644
--- a/backends/mqtt.c
+++ b/backends/mqtt.c
@@ -121,7 +121,7 @@ static int mqtt_generate_instanceid(instance* inst){
mqtt_instance_data* data = (mqtt_instance_data*) inst->impl;
char clientid[24] = "";
- snprintf(clientid, sizeof(clientid), "MIDIMonster-%d-%s", (uint32_t) time(NULL), inst->name);
+ snprintf(clientid, sizeof(clientid) - 1, "MM-%s-%d", inst->name, (uint32_t) time(NULL));
return mmbackend_strdup(&(data->client_id), clientid);
}
@@ -287,6 +287,11 @@ static int mqtt_reconnect(instance* inst){
return 2;
}
+ if(!data->client_id && mqtt_generate_instanceid(inst)){
+ LOGPF("Failed to generate instance ID for %s", inst->name);
+ return 2;
+ }
+
if(data->fd >= 0){
mqtt_disconnect(inst);
}
@@ -456,9 +461,6 @@ static int mqtt_configure_instance(instance* inst, char* option, char* value){
mmbackend_strdup(&(data->client_id), value);
return 0;
}
- else{
- return mqtt_generate_instanceid(inst);
- }
}
else if(!strcmp(option, "protocol")){
data->mqtt_version = MQTT_VERSION_DEFAULT;
@@ -518,9 +520,6 @@ static int mqtt_instance(instance* inst){
data->current_alias = 1;
inst->impl = data;
- if(mqtt_generate_instanceid(inst)){
- return 1;
- }
return 0;
}
diff --git a/backends/rtpmidi.md b/backends/rtpmidi.md
index 8014572..dd9cb56 100644
--- a/backends/rtpmidi.md
+++ b/backends/rtpmidi.md
@@ -60,7 +60,7 @@ Common instance configuration parameters
The `rtpmidi` backend supports mapping different MIDI events to MIDIMonster channels. The currently supported event types are
* `cc` - Control Changes
-* `note` - Note On/Off messages
+* `note` - Note On/Off messages (also known as note velocity)
* `pressure` - Note pressure/aftertouch messages
* `aftertouch` - Channel-wide aftertouch messages
* `pitch` - Channel pitchbend messages
diff --git a/backends/winmidi.md b/backends/winmidi.md
index 9e7d9cc..6de6348 100644
--- a/backends/winmidi.md
+++ b/backends/winmidi.md
@@ -29,7 +29,7 @@ to the listing shown at startup when using the global `list` option.
The `winmidi` backend supports mapping different MIDI events as MIDIMonster channels. The currently supported event types are
* `cc` - Control Changes
-* `note` - Note On/Off messages
+* `note` - Note On/Off messages (also known as note velocity)
* `pressure` - Note pressure/aftertouch messages
* `aftertouch` - Channel-wide aftertouch messages
* `pitch` - Channel pitchbend messages