From 67a61d109efb1255485945d347ffe810897d52d9 Mon Sep 17 00:00:00 2001 From: StefanSchmelz Date: Thu, 17 Sep 2020 13:09:24 +0200 Subject: [PATCH 1/3] Documented midi-io sample --- docs/samples/midi-io.md | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 docs/samples/midi-io.md diff --git a/docs/samples/midi-io.md b/docs/samples/midi-io.md new file mode 100644 index 00000000..9d5ad0c5 --- /dev/null +++ b/docs/samples/midi-io.md @@ -0,0 +1,59 @@ +## Using the midi-io sample bundle + +The midi-output example bundle in `samples/midi-io` demonstrates the the ability to send/recieve data to/from a midi device. + +### Prerequisites + +- Working NodeCG & nodecg-io installation +- A midi device that can be connected to your computer + +### Configure the midi-io sample bundle + +1. Start nodecg with nodecg-io installed. The midi-io bundle is currently part of it so it should also be loaded. + +2. Go to the `nodecg-io` tab in the nodecg dashboard. + +3. Login using your password. If this is your first run, then enter the password with which you want to encrypt your configurations and credentials. + +4. Create a new midi-input service instance using the left upper menu. + +5. Enter your device information + + The created instance should be automatically selected, if not select it in the upper left menu. Enter the name of your device in monaco (the texteditor on the right) in this format: + + ```json + { + "device": "name" + } + ``` + + After entering it, click save. + __Note:__ A script is provided to list all inputs and outputs. It can be run from the sample directory `samples/midi-io` using the command `npm run list`. The devices should be listed with their device names and some other stuff. + under linux this looks for example like this: + + ``` + nanoKONTROL2:nanoKONTROL2 MIDI 1 28:0 + ``` + + _Note:_ If you don't see monaco on the right, try reloading the page. + +6. Create a new midi-output service instance using the left upper menu. + +7. Repeat step 5 for your midi-output service. In most cases you want to use the same device fro input and output. + +8. Set the created midi-output service instance to the service dependency of the midi-io sample bundle. + + Select the midi-io bundle and the midi-output service in the left bottom menu and then select the service instance that should be used by the midi- bundle (in this case the name of the previously created midi-output instance). + +9. Set the created midi-input service instance to the service dependency of the midi-io sample bundle. + + Select the midi-io bundle and the midi-input service in the left bottom menu and then select the service instance that should be used by the midi-io bundle (in this case the name of the previously created midi-input instance). + +10. Check the nodecg logs + + You should see an error or a success message and midi messages that are recieved and echoed back to the device that is configured. The messages are only modified, if the recieved Message is a noteon with a velocity of greater than zero or a controll change message with a value of at least 64. Noteoff messages are always echoed unmodified. + +### Note + +A noteon message with a velocity of 0 should be handled like a noteoff message, so they are echoed unmodified. Otherwise this would get annoying very fast. +If a control change is assigned to a pushbutten values of 64 and up are interpreted as on and values lower than that are interpreted as off. Most somewhat modern Midi devices send 127 as on and 0 as off, but 63 and 64 should also be sufficient. \ No newline at end of file From d1f59dce0003a37fbf2290dd581dd820cc110d29 Mon Sep 17 00:00:00 2001 From: StefanSchmelz Date: Thu, 17 Sep 2020 13:10:54 +0200 Subject: [PATCH 2/3] Added midi-io sample to mkdocs.yml --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index c0582c85..9857305e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -53,6 +53,7 @@ nav: - Midi: - Midi-Input sample: samples/midi-input.md - Midi-Output sample: samples/midi-output.md + - Midi-io sample: samples/midi-io.md - Rcon sample: samples/rcon.md - sACN: - sACN Receiver sample: samples/sacn-receiver.md From 3da99dc3dc9148904e435a31a3a4f85c63222352 Mon Sep 17 00:00:00 2001 From: Daniel <30466471+daniel0611@users.noreply.github.com> Date: Thu, 17 Sep 2020 19:18:52 +0200 Subject: [PATCH 3/3] Fix a couple typos --- docs/samples/midi-io.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/samples/midi-io.md b/docs/samples/midi-io.md index 9d5ad0c5..179a6fb9 100644 --- a/docs/samples/midi-io.md +++ b/docs/samples/midi-io.md @@ -1,6 +1,6 @@ ## Using the midi-io sample bundle -The midi-output example bundle in `samples/midi-io` demonstrates the the ability to send/recieve data to/from a midi device. +The midi-io example bundle in `samples/midi-io` demonstrates the the ability to send/recieve data to/from a midi device. ### Prerequisites @@ -39,11 +39,11 @@ The midi-output example bundle in `samples/midi-io` demonstrates the the ability 6. Create a new midi-output service instance using the left upper menu. -7. Repeat step 5 for your midi-output service. In most cases you want to use the same device fro input and output. +7. Repeat step 5 for your midi-output service. In most cases you want to use the same device for input and output. 8. Set the created midi-output service instance to the service dependency of the midi-io sample bundle. - Select the midi-io bundle and the midi-output service in the left bottom menu and then select the service instance that should be used by the midi- bundle (in this case the name of the previously created midi-output instance). + Select the midi-io bundle and the midi-output service in the left bottom menu and then select the service instance that should be used by the midi-io bundle (in this case the name of the previously created midi-output instance). 9. Set the created midi-input service instance to the service dependency of the midi-io sample bundle. @@ -51,7 +51,7 @@ The midi-output example bundle in `samples/midi-io` demonstrates the the ability 10. Check the nodecg logs - You should see an error or a success message and midi messages that are recieved and echoed back to the device that is configured. The messages are only modified, if the recieved Message is a noteon with a velocity of greater than zero or a controll change message with a value of at least 64. Noteoff messages are always echoed unmodified. + You should see an error or a success message and midi messages that are recieved and echoed back to the device that is configured. The messages are only modified, if the recieved Message is a noteon with a velocity of greater than zero or a control change message with a value of at least 64. Noteoff messages are always echoed unmodified. ### Note