Skip to content

Commit 9629361

Browse files
committed
v1.1.6 Fix for RealTime messages
1 parent 91eaf1c commit 9629361

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# companion-module-generic-midi
22

33
A MIDI Module to allow standard MIDI messages to be sent to and received from Companion v3
4-
v1.1.5
4+
v1.1.6
55

66
Please visit http://discourse.checkcheckonetwo.com for help, discussions, suggestions, etc.
77

@@ -23,6 +23,8 @@ Supported MIDI Commands:
2323

2424
**REVISION HISTORY**
2525

26+
1.1.6 Ignore unsupported commands, bug fix for MTC
27+
2628
1.1.5 Add "Last Message Received" Variable
2729

2830
1.1.4 Ignore Real-Time Messages

companion/HELP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Generic MIDI module for Companion - v1.1.5
1+
## Generic MIDI module for Companion - v1.1.6
22

33
Please visit https://discourse.checkcheckonetwo.com for help, discussions, suggestions, etc.
44

companion/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "generic-midi",
44
"shortname": "generic-midi",
55
"description": "A generic MIDI module for companion",
6-
"version": "1.1.5",
6+
"version": "1.1.6",
77
"license": "MIT",
88
"repository": "git+https://github.com/MeestorX/companion-module-generic-midi.git",
99
"bugs": "https://github.com/MeestorX/companion-module-generic-midi/issues",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generic-midi",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"main": "dist/main.js",
55
"type": "module",
66
"scripts": {

src/midi/midi.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class Input extends EventEmitter {
1313
constructor(name: string, virtual?: boolean) {
1414
super()
1515
this._input = new node_midi.Input()
16-
this._input.ignoreTypes(false, true, true) // Allow Sysex but ignore Timing & Active Sense
16+
this._input.ignoreTypes(false, false, false) // Allow all message types
1717
this._pendingSysex = false
1818
this._sysex = []
1919
this._smpte = []
@@ -32,11 +32,12 @@ export class Input extends EventEmitter {
3232
}
3333

3434
this._input.on('message', (deltaTime: number, bytes: number[]): void => {
35-
// a long sysex can be sent in multiple chunks, depending on the RtMidi buffer size
35+
// not dealing with sysex chunks longer than the buffer ATM
3636

3737
const msg = MidiMessage.parseMessage(bytes)
38+
if (msg === undefined) return
3839
this.emit('message', deltaTime, msg)
39-
if (msg!.id == 'mtc') {
40+
if (msg.id == 'mtc') {
4041
this.parseMtc(msg as Mtc)
4142
}
4243
})

src/midi/msgtypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class MidiMessage {
136136
incoming = new Mtc(msg.type!, msg.value!)
137137
break
138138
default:
139-
console.log(`Unrecognized MIDI message. Status = ${status}`)
139+
console.log(`Unsupported MIDI message. Status = ${hex(status)}`)
140140
return
141141
}
142142

0 commit comments

Comments
 (0)