# Cababage Reserved channel / VST

**URL:** <https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527>\
**Category:** Csound Noobs\
**Created:** [11 May 2017 14:04 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527 "2017-05-11T14:04:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karamel1](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/karamel1/32/1680_2.png) [@Karamel1](https://forum.cabbageaudio.com/u/Karamel1)\
**Post date:** [11 May 2017 14:04 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/1 "2017-05-11T14:04:29Z")

</div>

Hello,

I am trying to understand how the reserved channels work when a patch is exported as a VST in Reaper.  
Here is a simple instrument which aims at displaying the BPM off the host… but I don’t get anything.  
Could someone explain me why , please?  
Thank you for your help.

> form caption(“Untitled”) size(400, 300), colour(58, 110, 182), pluginID(“def1”)  
> numberbox bounds(10, 80, 80, 60), channel(“Numbox”), text(“name”), textbox(120), range(0, 340, 120),identchannel(“NumR”)  
> ; Initialize the global variables.  
> sr = 44100  
> ksmps = 32  
> nchnls = 2  
> 0dbfs = 1  
> gkTempo init 120  
> instr 1  
> gkTempo chnget “HOST\_BPM”  
> if changed(gkTempo)==1 then  
> SMessage sprintfk “text("%d")”,gkTempo  
> chnset SMessage,“NumR”  
> endif  
> endin  
>   
>   
> ;causes Csound to run for about 7000 years…  
> ;f0 z  
> i 1 0 3600

---

<div class="post-metadata">

**Author:** ![Thrifleganger](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/thrifleganger/32/431_2.png) [@Thrifleganger](https://forum.cabbageaudio.com/u/Thrifleganger)\
**Post date:** [11 May 2017 14:30 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/2 "2017-05-11T14:30:12Z")

</div>

That’s quite strange, @rorywalsh - we’re not able to change the text of a numberbox dynamically.

However this code should work fine if you change the value of the numberbox.

You can either do:  
`SMessage sprintfk "value(%d)",gkTempo chnset SMessage,"NumR"`

or more simply, for values, target the channel instead of the identchannel:  
`chnset gkTempo, "Numbox"`

Also, a good practice would be explicitly define the rate of argument you are dealing with in IF blocks to avoid headaches later:  
`if changed:k(gkTempo)==1 then`

Cheers

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [11 May 2017 14:36 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/3 "2017-05-11T14:36:52Z")

</div>

It’s working here?

```
<Cabbage>
form caption("Numberbox") size(400, 300), colour(20, 20, 20), pluginID("def1")
numberbox bounds(10, 10, 100, 80), channel("numberBox"), range(0, 10, 0)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL 
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
chnset abs(randi:k(10, 1, 2)), "numberBox"
endin

</CsInstruments>
<CsScore>
i1 0 10000
</CsScore>
</CsoundSynthesizer>

```

Btw, @Karamel1, there is an example of the use of reserved channels in the example folder, under 'Instructional. It’s called Host Info. That should give you a god idea of how they are used.

---

<div class="post-metadata">

**Author:** ![Karamel1](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/karamel1/32/1680_2.png) [@Karamel1](https://forum.cabbageaudio.com/u/Karamel1)\
**Post date:** [11 May 2017 14:42 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/4 "2017-05-11T14:42:41Z")

</div>

Oh thank you … I just exported the hostinfo example as a VST synth and tried it into REAPER … It is silent, it shows 0 everywhere…  
Somehow cabbage and reaper don’t want to communicate 😁

---

<div class="post-metadata">

**Author:** ![Thrifleganger](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/thrifleganger/32/431_2.png) [@Thrifleganger](https://forum.cabbageaudio.com/u/Thrifleganger)\
**Post date:** [11 May 2017 14:42 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/5 "2017-05-11T14:42:53Z")

</div>

I meant the “text” attribute of the numberbox.

Also Rory, the host bpm macro isn’t working when exported through Cabbage 2. It just displays zero. When the same sketch is exported as a plugin through Cabbage 1, it seems to work fine.

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [11 May 2017 14:51 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/6 "2017-05-11T14:51:18Z")

</div>

Thanks for the report. I’m looking into it now.

---

<div class="post-metadata">

**Author:** ![Karamel1](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/karamel1/32/1680_2.png) [@Karamel1](https://forum.cabbageaudio.com/u/Karamel1)\
**Post date:** [11 May 2017 14:59 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/7 "2017-05-11T14:59:28Z")

</div>

@rorywalsh : yes your patch works fine.  
However, the macros do not work (I tried both reaper and VSThost with the example Hostinfo)

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [11 May 2017 15:20 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/8 "2017-05-11T15:20:12Z")

</div>

Ok, `text()` for numberbox is fixed. Now I need to look into the host channel stuff.

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [11 May 2017 16:38 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/9 "2017-05-11T16:38:21Z")

</div>

I’ve fixed this issue and re-uploaded the OSX binaries. I’ll add a Windows package later tonight.

---

<div class="post-metadata">

**Author:** ![Karamel1](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/karamel1/32/1680_2.png) [@Karamel1](https://forum.cabbageaudio.com/u/Karamel1)\
**Post date:** [11 May 2017 16:44 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/10 "2017-05-11T16:44:51Z")

</div>

Thank you !

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [11 May 2017 23:34 UTC](https://forum.cabbageaudio.com/t/cababage-reserved-channel-vst/527/11 "2017-05-11T23:34:07Z")

</div>

New Windows binaries uploaded.

> [@Pre-release Cabbage 2 for testing - part 5](http://forum.cabbageaudio.com/t/pre-release-cabbage-2-for-testing-part-5/507):
>
> I’ve uploaded new binaries for Windows, along with support for plugins. Please test them out and see if they work Ok.The best thing to do is create a new folder within your Cabbage64 dir and place them in there. This release should address the issues last brought up by users, and also adds the image crop identifier() so users can avail of filmstrip pngs. See the new example in Examples-\>Instructional. I’ll upload Mac binaries tomorrow. [Win64 (updated 17th May)](https://www.dropbox.com/s/9g2pomjtndlcpin/Cabbage.zip?dl=0) [OSX (Updated 18nd May)] ([https:/…](https://www.dropbox.com/s/ivtxpafhh502rrg/CabbageOSX.zip?dl=0)
