Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added MultiOutput Plugin Tutorial #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion scripting/scripting-api/routingmatrix/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,71 @@ The `RoutingMatrix` object with which you can manipulate the channels and connec
const var MasterChain = Synth.getRoutingMatrix("Master Chain");
MasterChain.setNumChannels(8);

```
```

# **Multi Output Plugin Tutorial**

## **1. Building HISE Multi Output**

In order to do it, you'll have to build a multi-output version of HISE.

### A. In the projucer file, add these two preprocessor definitions:

```NUM_MAX_CHANNELS = XX```
```HISE_NUM_PLUGIN_CHANNELS = XX```

'XX' being the number of outputs you need in your plugin, and it must be a multiple of 2, obviously.

![3ca5b3b8-b263-41ce-96b8-7205ab5b93ce-image.png](/assets/uploads/files/1736237953796-3ca5b3b8-b263-41ce-96b8-7205ab5b93ce-image.png)

> I'm using the latest develop build of HISE, but noticed that the ```NUM_MAX_CHANNELS = XX``` preprocessor didn't work properly. I don't know if it's a bug or a problem on my end - or I was really tired at that moment...
I changed the value directly in HISE's source code.
This can be changed in the file: ```{HISE_FOLDER}hi_tools\Marcos.h``` line (49):
```
/** Change this value if you need more than 8 stereo channels in HISE routing. Default: 16*/
#ifndef NUM_MAX_CHANNELS
#define NUM_MAX_CHANNELS XX
#endif
```

### B. Build HISE

Build HISE as usual.

## **2. Setting the outputs in HISE**

1. In HISE, click on the Main channel meter to open the routing popup:

![0a41c2ca-8e4e-4c5c-8993-93ddc6a16d5d-image.png](/assets/uploads/files/1736238706068-0a41c2ca-8e4e-4c5c-8993-93ddc6a16d5d-image.png)

![becdbc83-be2d-46bc-9a0d-0780a557e2fb-image.png](/assets/uploads/files/1736238745099-becdbc83-be2d-46bc-9a0d-0780a557e2fb-image.png)

> My build has 48 channels, that's why there're so many output here. Your setup will be different depending on how many outputs you've configured for your build)

Right-click somewhere in the popup, and change the channel amount (let's say we want 8 outputs) :

![5b812dd2-6a5b-4617-a2a8-3b5a3d64ec1a-image.png](/assets/uploads/files/1736238916802-5b812dd2-6a5b-4617-a2a8-3b5a3d64ec1a-image.png)

Now the routing appears like this:

![464f87a6-a230-40e4-8595-a9821772305c-image.png](/assets/uploads/files/1736238972422-464f87a6-a230-40e4-8595-a9821772305c-image.png)

> Again, it will look a bit different on your version, but all the output of your plugin should be routed to each of HISE's output channels.

2. Edit the project setting

Lastly, you'll have to add those extra definitions in your project's settings:
```
HISE_NUM_PLUGIN_CHANNELS=8
NUM_MAX_CHANNELS=8
```
![562b7413-4f5e-45b0-a8e5-5cf3fdef7d8e-image.png](/assets/uploads/files/1736252864305-562b7413-4f5e-45b0-a8e5-5cf3fdef7d8e-image.png)

You're all set now to do what you want with your outputs.

Here's a snippet:
```
HiseSnippet 2136.3oc6as0TajbEdDvrAoMYK6s1Zq7XWToJjVKj0Mt3PbYrEfCULFUHXcRQQ4pYlVnNdT2S5oG.U65Gxur7WH+T1WySImSOijFIKqEDdcXoF8.ntO849oO8W2EzTIcXAARkUlbG0ymYk42Z2pmP2oQGJWXs21VYJXePn1OTS5xDgADovqGosTQzcXDWoSHLslp4Rg0K54SCBXtVYxL+KQ1yjcAKyme5Yuf5QENrgSYY88RtC6U7tb8vYat0eg64sK0kcDuahUWeq8bjhFROYHXpyaW1xm57N54rWSwkMms0elFzwJy2YSqUys8ZqswSbcpuZkmzlttqyY0dxpL2p0qwdBy0c8Ztm0tsUluXGWtVpZAVOKvJyBuP51qUG4khHE787.9YdLbPEqVflildWomK5h3rVM5v8ba1OFFXYkYwlCinyGEQ+F684t7AyOLx9.CAxPNRF.yL2nl27iXdURZdkSXdSvjxjvjVHx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wh2J+HlX0ju0X0wHVK4aMVaLh0SBes9XDWMI70UGi3ZIiHqMFw0SFQVePDoK0QIeqSze5xl+49Ly.UBBy+0gYs2GGS9f+rqsr5BHtdqiynh5CXr5rxXsYkw5yJiqNqLt1rx35yJia7yyHBH94gZY2ntEVV62bGyec4Yxri.+uOyz3v5+wGeMh2
```

Original post on the forum: [Multi Output Tutorial](https://forum.hise.audio/topic/11553/multi-output-tutorial)