josephdadams / midi-relay

Listens for HTTP request with JSON payload and relays MIDI/MSC commands on local ports.
MIT License
58 stars 9 forks source link

problem adding triggers #19

Closed mark-epstein closed 2 years ago

mark-epstein commented 3 years ago

I'm certain this is something I've just done wrong... Running midi-relay on my PC, browsing to http://127.0.0.1:4000/midi_inputs I get: [{"name":"3- AudioBox USB 96 MIDI In","manufacturer":"Microsoft Corporation","version":"10.0","engine":"node"},{"name":"loopMIDI Port","manufacturer":"unknown","version":"1.0","engine":"node"}]

Using Postman and alternatively, some online tool to generate a POST request, I am sending this JSON:

{
midiport: '3- AudioBox USB 96 MIDI In',
midicommand: 'noteon',
note: 73,
channel: 1,
velocity: 100,
actiontype: 'http',
url: 'http://127.0.0.1/test',
description: 'description of the trigger'
}

I get back:

{
  "content-length": "30",
  "content-type": "application/json; charset=utf-8"
}
body:
{
  "result": "invalid-midi-port"
}

/refresh gives me:

MIDI Output Ports
Microsoft GS Wavetable Synth
3- AudioBox USB 96 MIDI Out
loopMIDI Port
MIDI Input Ports
3- AudioBox USB 96 MIDI In
loopMIDI Port
Loading stored Triggers from file...
Triggers loaded.
mark-epstein commented 3 years ago

I tried using loopMIDI Port as well, with similar results.

mark-epstein commented 3 years ago

update: I was unaware of the /settings page. I think a key issue here is that the web engine does not see the midi ports at all even when I click the refresh button. Capture4

mark-epstein commented 3 years ago

Maybe this is the issue? Capture5

mark-epstein commented 3 years ago

Adding the trigger manually to midi_triggers.json works, and that's actually sufficient for my needs for now. So although I think this is a real bug, (or colossal failure on my part) I don't need any kind of urgent fix. :-)

Also did I mention this was on Windows x64? I feel like I should have mentioned that.