# Widgets should not share channels names

**URL:** <https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509>\
**Category:** Announcements\
**Created:** [3 May 2021 19:04 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509 "2021-05-03T19:04:09Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [3 May 2021 19:04 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/1 "2021-05-03T19:04:09Z")

</div>

For as long as Cabbage has been around it has been possible (although never recommended), to use the same channel names with multiple widgets. We all did it right 🤷‍♂️ It starts off with a little duplicate here, then another one, next you know 20 different widgets are connected to each other by a single channel and a team of Cabbage coloured unicorns start singing Palestrina motets in your ears.

Well I’m pulling the plug on it! 🤣 No more unicorns, and no more duplicate channels!

Why? A channel name becomes a parameter name in the DAW. And many DAWs will simply refuse to create a second parameter if there is already one created with that name. To be honest, I’m surprised they worked this long without problems 🤣

I’ve added a check on compilation for duplicate channels. You can ignore the warning, but do so at your own risk 🦄

---

<div class="post-metadata">

**Author:** ![iainmccurdy](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/i/8baadc/32.png) [@iainmccurdy](https://forum.cabbageaudio.com/u/iainmccurdy)\
**Post date:** [5 May 2021 12:17 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/2 "2021-05-05T12:17:24Z")

</div>

Spoilsport. Seriously though, you might want to watch that Cabbage doesn’t become a nag, bombarding the user with popups saying “don’t do this”, "don’t do that, when opening an older csd. 😬

---

<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:** [5 May 2021 13:04 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/3 "2021-05-05T13:04:48Z")

</div>

I know. I was thinking of this. Maybe it would be better to just print this information to the Csound output console, or add a “Cabbage Warnings” console? That would certainly make things easier to ignore. I’m open to ideas. I just want to help people avoid some common mistakes that might lead to some potential problems down the line.

---

<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:** [5 May 2021 15:53 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/4 "2021-05-05T15:53:27Z")

</div>

@iainmccurdy How about this, complete with numbers of offending lines 🤔

![2021-05-05 16.49.43](https://forum.cabbageaudio.com/uploads/default/original/2X/5/53472a060728411ef13e56e00f45a1b36e5aa384.gif)

I just have to add a few more warnings like _“Don’t use purple, that’s a horrible colour”_ and _“Your .csd file use tabs instead of space. Please try again”_. 🤣

---

<div class="post-metadata">

**Author:** ![iainmccurdy](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/i/8baadc/32.png) [@iainmccurdy](https://forum.cabbageaudio.com/u/iainmccurdy)\
**Post date:** [5 May 2021 16:14 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/5 "2021-05-05T16:14:41Z")

</div>

That’s much more polite looking!

---

<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:** [18 May 2021 08:17 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/6 "2021-05-18T08:17:43Z")

</div>

As some of you have noticed, whenever you add a widget to an instrument using the GUI editor, it will create a unique channel name for that widgets in the form of `slider00001`. You can obviously rename the channels to anything you like, but remember each and every widget should have a unique channel name, otherwise you will get the dreading yellow warnings 🤣

---

<div class="post-metadata">

**Author:** ![JonNelson](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/jonnelson/32/2706_2.png) [@JonNelson](https://forum.cabbageaudio.com/u/JonNelson)\
**Post date:** [20 May 2021 18:48 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/7 "2021-05-20T18:48:33Z")

</div>

OK I am getting the following error messages:  
The following channel names are used across multiple widgets: “image-9” (Line:1),“label-9” (Line:1),“filebutton-9” (Line:1),“filebutton-9” (Line:1)

Must all image and filebutton widgets have a channel name? For that matter, must every widget have a channel name (even if we are not using the channels within the Csound code)?

Thanks for your feedback when you have the chance,  
Jon

---

<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:** [20 May 2021 18:54 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/8 "2021-05-20T18:54:14Z")

</div>

They are just warnings. But yes, all widgets should have unique channel identifiers. Especially those that can be controlled by the host. The line numbering is a little off but as a long time Csound user I’m used to that 🤣 If you don’t set unique channel names you will see these warnings, but they can be ignored.

---

<div class="post-metadata">

**Author:** ![JonNelson](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/jonnelson/32/2706_2.png) [@JonNelson](https://forum.cabbageaudio.com/u/JonNelson)\
**Post date:** [20 May 2021 19:08 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/9 "2021-05-20T19:08:46Z")

</div>

👍

---

<div class="post-metadata">

**Author:** ![Retornz](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/retornz/32/2714_2.png) [@Retornz](https://forum.cabbageaudio.com/u/Retornz)\
**Post date:** [27 May 2021 14:55 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/10 "2021-05-27T14:55:16Z")

</div>

I am wondering the same, when I search in the code these “image-9” nothing pops us… So I don’t see how to fix it…  
Thanks in advance for the help @rorywalsh !

---

<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:** [27 May 2021 15:47 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/11 "2021-05-27T15:47:24Z")

</div>

Every widgets must1 have a unique channel assigned to it now. To get rid of those warning, just give the identifier a valid channel.

1 They don’t really have to, but if you don’t give each one a unique name you will get these warning.

---

<div class="post-metadata">

**Author:** ![Samo](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Samo](https://forum.cabbageaudio.com/u/Samo)\
**Post date:** [6 June 2021 15:23 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/12 "2021-06-06T15:23:36Z")

</div>

The warning messages apparently consider comments as code. If possible, I’d like to exclude comments from the warning inspection. Perhaps there is a flag that I could include or it might be more convenient to simply ignore all comments by default?

---

<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:** [7 June 2021 09:41 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/13 "2021-06-07T09:41:05Z")

</div>

Yeah, good point. I’ll sort that.

[edit] I’ve added this now, although it’s pretty crude. If it finds a ‘;’ it will treat the line as a comment. regardless of where the comment appears.

---

<div class="post-metadata">

**Author:** ![Samo](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Samo](https://forum.cabbageaudio.com/u/Samo)\
**Post date:** [7 June 2021 17:15 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/14 "2021-06-07T17:15:20Z")

</div>

Thanks!!!  
It is still complaining about the `identChannels() with guiMode("queue")` though.

---

<div class="post-metadata">

**Author:** ![Samo](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Samo](https://forum.cabbageaudio.com/u/Samo)\
**Post date:** [26 June 2021 17:36 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/15 "2021-06-26T17:36:53Z")

</div>

There are channels “forced” on labels - labels seem to automatically get channels associated to them. Is this necessary? Isn’t this a waste of resources? There are possibly unnecessary (and annoying) warning messages associated to missing channels for labels. If they are not needed, it would be good to have an option to not force the channels on labels and display the warnings.

---

<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:** [26 June 2021 18:37 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/16 "2021-06-26T18:37:23Z")

</div>

> [@Samo](#):
>
> It is still complaining about the `identChannels() with guiMode("queue")` though.

That’s the idea. identChannels should not be used in `guiMode("queue")`

> [@Samo](#):
>
> Is this necessary? Isn’t this a waste of resources?

It’s not a waste of resources at all, considering all widgets are assigned channels regardless of whether or not you actually assign one in your code. If you like I can add an `ignoreChannel()` identifier, but that’s probably more typing than actually declaring a unique channel name 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Samo](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Samo](https://forum.cabbageaudio.com/u/Samo)\
**Post date:** [27 June 2021 06:45 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/17 "2021-06-27T06:45:51Z")

</div>

OK, I see, thanks!  
If I’m not changing a label, I think it would still be convenient to have its channel name assigned automatically _just_ in the background as it used to be - if possible?  
I got in a (perhaps bad?) habit of adding labels because of position flexibility compared to slider text. Is it cheaper to have slides with text instead of separate labels?

---

<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:** [27 June 2021 11:49 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/18 "2021-06-27T11:49:29Z")

</div>

> [@Samo](#):
>
> Is it cheaper to have slides with text instead of separate labels?

I don’t think it makes any difference. They won’t be constantly drawn so it shouldn’t incur any overhead.

> [@Samo](#):
>
> If I’m not changing a label, I think it would still be convenient to have its channel name assigned automatically _just_ in the background as it used to be - if possible?

Channels name are automatically assigned if you drop them in via the GUI editor. The real issue of course is when parameters share channel names. So what I can do is ignore any widget that has `automatable()` set to 0, which are most of the layout type widgets. That would immediately remove all warnings for labels, groupboxes, images, etc.

---

<div class="post-metadata">

**Author:** ![Samo](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/s/71c47a/32.png) [@Samo](https://forum.cabbageaudio.com/u/Samo)\
**Post date:** [27 June 2021 15:11 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/19 "2021-06-27T15:11:33Z")

</div>

Yes I noticed that as soon as I “touch” a widget all sorts of funky things may happen, also annoying things like changing `mode` of `filebutton` or populating `text`(""), `bound` hight from 8 to 10… I don’t remember now but I had several surprises that way… And I am often “touching” widgets just to find the associate text to modify.

Channels could still be used and interfere within Csound even when `automatable(0)`, right? And labels cannot be `automatable`, right?

I don’t want to complicate with this, but most of the time I find it annoying when things change automatically. Maybe having some options in Cabbage to toggle (different types of) warnings and “auto correct” could be useful.

---

<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:** [28 June 2021 10:51 UTC](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509/20 "2021-06-28T10:51:40Z")

</div>

> [@Samo](#):
>
> I “touch” a widget all sorts of funky things may happen, also annoying things like changing `mode` of `filebutton`

Can you provide me with an example of this. I just tested here and I can’t recreate this issue.

> [@Samo](#):
>
> `bound` hight from 8 to 10…

This is the first time I’ve ever come across this. I’ll take a look.

> [@Samo](#):
>
> Yes I noticed that as soon as I “touch” a widget all sorts of funky things may happen

Please don’t be afraid to report the issues when they occur. Otherwise I’ll never be aware of them 😉

> [@Samo](#):
>
> Channels could still be used and interfere within Csound even when `automatable(0)` , right? And labels cannot be `automatable` , right?

Correct. You can still interact with any widgets via Csound, as long as they have a channel assigned. Sliders, comboboxes, buttons and checkboxes can be automated via a host. The rest cannot.

> [@Samo](#):
>
> I don’t want to complicate with this, but most of the time I find it annoying when things change automatically.

I would to, and it’s certainly not by design. Does this happen a lot? Thanks to your report from above I now know that clicking on a widget with a height of 8 causes it to be changed to a height of 10. But I have no other reports of this happening.

[Next page](https://forum.cabbageaudio.com/t/widgets-should-not-share-channels-names/2509.md?page=2)
