# Manage multiple audio channels

**URL:** <https://discourse.nodered.org/t/manage-multiple-audio-channels/49622>\
**Category:** Hardware\
**Created:** [11 August 2021 16:00 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622 "2021-08-11T16:00:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![salamandreitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salamandreitor/32/46389_2.png) [@salamandreitor](https://discourse.nodered.org/u/salamandreitor)\
**Post date:** [11 August 2021 16:00 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/1 "2021-08-11T16:00:34Z")

</div>

Hi all! We have just started in Node-Red and are currently creating a project play sound samples through the browser dashboard. Our equipment has an external sound interface installed (Gigaport HD +) that allows us to have 8 independent audio outputs. We would like to be able to send the sounds to each of these channels independently, since by default the sounds are mixed on channels 1 and 2, as if it were a stereo signal. Does anyone have any idea if it can be configured and worked with the other audio outputs? Thank you!

---

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [11 August 2021 16:04 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/2 "2021-08-11T16:04:48Z")

</div>

Can I ask why you selected Node-RED for this project?

---

<div class="post-metadata">

**Author:** ![salamandreitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salamandreitor/32/46389_2.png) [@salamandreitor](https://discourse.nodered.org/u/salamandreitor)\
**Post date:** [11 August 2021 16:13 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/3 "2021-08-11T16:13:53Z")

</div>

It's part of a bigger project and Node-Red works very well for almost all we need. In the beginning the plan was different. The audio part was managed in a DAW (Reaper) apart, but we have seen that it would be interesting to be able to synchronize the audios with some of the Node-Red events, so we began to investigate this option. There would be another possibility: to be able to send commands to the DAW to play the audios, but it seems more complicated.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 August 2021 16:36 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/4 "2021-08-11T16:36:59Z")

</div>

> [@salamandreitor](#):
>
> There would be another possibility: to be able to send commands to the DAW to play the audios, but it seems more complicated.

I think that will be the route you need to take.

Maybe this node will be of some use? "node-red-contrib-midi (node) - Node-RED" [node-red-contrib-midi (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-midi)

---

<div class="post-metadata">

**Author:** ![salamandreitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salamandreitor/32/46389_2.png) [@salamandreitor](https://discourse.nodered.org/u/salamandreitor)\
**Post date:** [11 August 2021 16:42 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/5 "2021-08-11T16:42:25Z")

</div>

Thank you, I will investigate it.

---

<div class="post-metadata">

**Author:** ![salamandreitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salamandreitor/32/46389_2.png) [@salamandreitor](https://discourse.nodered.org/u/salamandreitor)\
**Post date:** [21 August 2021 01:24 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/6 "2021-08-21T01:24:03Z")

</div>

Hello, again! It seems that node-red-contrib-midi is discontinued and even is impossible or very difficult to install it.  
I was reading about the OSC (Open sound control) and maybe it could works to comunicate Node-Red with Reaper too. But the problem is that I found very little useful info about how to use it and what can I do with this. Anybody could give me more info? Thank you!

---

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [21 August 2021 04:27 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/7 "2021-08-21T04:27:32Z")

</div>

Have you experimented with [this node](https://flows.nodered.org/node/node-red-contrib-play-audio)? ("A node-red node for playing audio in the browser" which seems to be what your project entails, according to your initial post).

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 August 2021 06:44 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/8 "2021-08-21T06:44:56Z")

</div>

There is a post in the repo issues where a user explains how he got it working...

> <https://github.com/urbiworx/node-red-contrib-midi/issues/4#issuecomment-756897676>
>
> Trying to install it on raspberry pi with node red
> \`22 May 13:22:01 - \[warn\] --…----------------------------------------
> 22 May 13:22:01 - \[warn\] Error: Command failed: npm install --save --save-prefix="~" --production node-red-contrib-midi@1.0.1
> In file included from ../src/node-midi.cpp:6:0:
> ../src/lib/RtMidi/RtMidi.cpp:1095:28: fatal error: alsa/asoundlib.h: No such file or directory
> #include \<alsa/asoundlib.h\>
> ^
> compilation terminated.
> make: \*\*\* \[Release/obj.target/midi/src/node-midi.o\] Error 1
> gyp ERR! build error
> gyp ERR! stack Error: \`make\` failed with exit code: 2
> gyp ERR! stack at ChildProcess.onExit (/usr/lib/node\_modules/npm/node\_modules/node-gyp/lib/build.js:276:23)
> gyp ERR! stack at emitTwo (events.js:106:13)
> gyp ERR! stack at ChildProcess.emit (events.js:191:7)
> gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:219:12)
> gyp ERR! System Linux 4.9.41-v7+
> gyp ERR! command "/usr/bin/node" "/usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js" "rebuild"
> gyp ERR! cwd /home/pi/.node-red/node\_modules/midi
> gyp ERR! node -v v6.11.4
> gyp ERR! node-gyp -v v3.4.0
> gyp ERR! not ok
> npm WARN grunt-coffeelint@0.0.16 requires a peer of grunt@\>=0.4.0 but none was installed.
> npm WARN grunt-contrib-coffee@1.0.0 requires a peer of grunt@\>= 0.4.5 but none was installed.
> npm WARN node-red-project@0.0.1 No repository field.
> npm WARN node-red-project@0.0.1 No license field.
> npm ERR! Linux 4.9.41-v7+
> npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--save" "--save-prefix=\\"~\\"" "--production" "node-red-contrib-midi@1.0.1"
> npm ERR! node v6.11.4
> npm ERR! npm v3.10.10
> npm ERR! code ELIFECYCLE
> npm ERR! midi@0.9.5 install: \`node-gyp rebuild\`
> npm ERR! Exit status 1
> npm ERR!
> npm ERR! Failed at the midi@0.9.5 install script 'node-gyp rebuild'.
> npm ERR! Make sure you have the latest version of node.js and npm installed.
> npm ERR! If you do, this is most likely a problem with the midi package,
> npm ERR! not with npm itself.
> npm ERR! Tell the author that this fails on your system:
> npm ERR! node-gyp rebuild
> npm ERR! You can get information on how to open an issue for this project with:
> npm ERR! npm bugs midi
> npm ERR! Or if that isn't available, you can get their info via:
> npm ERR! npm owner ls midi
> npm ERR! There is likely additional logging output above.
> npm ERR! Please include the following file with any support request:
> npm ERR! /home/pi/.node-red/npm-debug.log
> 22 May 13:22:01 - \[warn\] ------------------------------------------
> \`

---

<div class="post-metadata">

**Author:** ![salamandreitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salamandreitor/32/46389_2.png) [@salamandreitor](https://discourse.nodered.org/u/salamandreitor)\
**Post date:** [22 August 2021 10:59 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/9 "2021-08-22T10:59:37Z")

</div>

Thanks, Steve but I had read this and I'm not using raspberry-pi

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [22 August 2021 11:31 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/10 "2021-08-22T11:31:04Z")

</div>

So what errors are you getting when trying to install? Might be something simple.

---

<div class="post-metadata">

**Author:** ![salamandreitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salamandreitor/32/46389_2.png) [@salamandreitor](https://discourse.nodered.org/u/salamandreitor)\
**Post date:** [22 August 2021 12:35 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/11 "2021-08-22T12:35:16Z")

</div>

Node-red give me an error when I try to install node-red-contrib-midi. If I open the Log there's no info.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [22 August 2021 20:16 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/12 "2021-08-22T20:16:55Z")

</div>

What device do you have node-red installed on?  
What version of NR and node.js are you using (see nodered start up log)?  
How are you installing the node? via CLI?

---

<div class="post-metadata">

**Author:** ![salamandreitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salamandreitor/32/46389_2.png) [@salamandreitor](https://discourse.nodered.org/u/salamandreitor)\
**Post date:** [22 August 2021 21:36 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/13 "2021-08-22T21:36:28Z")

</div>

I'm installing it on a PC.

---

<div class="post-metadata">

**Author:** ![salamandreitor](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/salamandreitor/32/46389_2.png) [@salamandreitor](https://discourse.nodered.org/u/salamandreitor)\
**Post date:** [22 August 2021 21:40 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/14 "2021-08-22T21:40:53Z")

</div>

Ok, finally I got to make manage Reaper with node-red-contrib-osc via udp connection. I think it could be even more flexible than midi.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 October 2021 21:41 UTC](https://discourse.nodered.org/t/manage-multiple-audio-channels/49622/15 "2021-10-21T21:41:49Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
