How to configure SubChannelModule?

Just starting to play around with GlobalChannels in gamma 6.6. Great stuff!!

I want to use GlobalChannels with my own records, but I am getting stuck at how to configure the SubChannelModule.

In the help patch you can see that there is some configuration in the create pin of SubChannelModule.

I guess that is needed for it to work. In my own project I am doing something very similar. I have a simple record and want to create a GlobalChannel with Subchannels from it:

If I add the SubChannel bindings in the GlobalChannels window or add a SubChannelsModule node in my patch, nothing happens. I save in the GlobalChannels window, but I am not getting nodes for the SubChannels.

Also I want to access the SubChannels as Channels and not their values, like in the help patch. How can I do that?

The idea is to have 1 record, then create several GlobalChannel “instances” of it to be used in the patch.

Thanks for any hints.

Please use the SubChannels node as shown in the Particle Life Example.

This way the binding is not added via the UI of the Global Channel Browser, but rather programmatically.
The node hands you the channels.

In current previews only: Pegs in Global Channel Setup is another example for this workflow.

3 Likes

You mean this one:

I cannot see anything with subchannels in that example. This is in 6.6 stable.

Okay, I could only find it in the latest 6.7 preview in the Pegs example. There was also Particle Life.HDE, but that also doesn’t contain anything about Subchannels as far as I can tell.

Anyways, here is the important info from the pegs example:

SubChannels:
When you use them in a global channel setup you have to feed your own channel to the Peg and the property on create. The global SubChannels that get created per property will then get glued to the Channels you provided.
For that to work you need to provide the channels on create.

You are the boss about the structure of your global channel structure:

This demo shows how you can group the properties as you want.

  • The boxes expose position, rotation and scaling.
  • Spots expose positions, they don’t expose rotaton and scaling. They also expose other properties. For that I made my own Spot datatype.
  • the Target for both Spots is exposed as only one position. I wanted to think of them as one thing.

These are only examples showing that you are free how to reason about the structure of properties and channels.

So in the end it is super easy, just plug the GlobalChannel in the SubChannel node. Doh. It was confusing as I guess the input was internalised in that help patch and not connected anymore, leading to the confusion.

GlobalChannels and channels in general make so much sense, because they offer a solution to the most annoying part of any large project - managing variables, data types and most importantly saving and loading of states. Also binding to Midi, OSC and for us RCP will be amazing.

Looks like we might have to wait for gamma 7 for it to be fully ironed out, but its tantalizingly close now.

But there is no SubChannels node in 6.6 stable. If I copy it from 6.7 preview I get:

So is SubChannels a thing in 6.6? How is it supposed to work in 6.6 that I can have a global channel of my datatype?

Global Channels and how they interact with custom data types are under development and if you want to give them a spin, you need to try the preview builds. But of course, making a project depend on preview builds is not recommended.
If wasting time with previews is not an option for you I’d recommend waiting for a stable build that claims official support for them.

In the previews the example should look like this:
grafik
That’s how it is made available in the help browser:
grafik

That said, if you do have some spare time and are willing to try the previews just to test drive how they could be used in the future by your project: then your feedback would of course be welcome.

1 Like

But that was my question all along: There is a help patch in 6.6 that uses the SubChannelsModule and shows Subchannels in the Channel Window. So it obviously already works in 6.6.

My question is how was that SubChannelsModule node set up the way it is in 6.6? In 6.7 there is a SubChannels node and I can see how it is setup, but it’s not clear in 6.6.

Or are you saying that because it has already changed how it works from 6.6 to 6.7 it is not recommended to build anything with it in 6.6 and instead wait for a later version?

Then I would ask: how long do you think before it will be in a state where it makes sense to actually use it? A few weeks? A few months? A year?

I believe that being able to turn any nested datatype into global channels that can be updated from everywhere, saved, loaded and bound to different sources, would be the most significant feature in years.

Actually the same goes for the Binding to Midi.

There is a help patch in 6.6 called “HowTo Bind a Midi Controller to a Global Channel”. If I open the Global Channel browser I can see the 3 controls and their midi mappings:

Once again, it works in the example, but when I do the same in my patch, it doesn’t. I add the MidiControllerModule to where I have all my channels. I turned one into a Global Channel and can see it in the UI. I add a binding to Midi, but nothing happens in the UI. If I go over the Create pin on the MidiControllerModule, I can see it has the binding in there like 6 times now, but still nothing in the UI.

global-channels

And once again I would ask: why is it in 6.6 when it doesn’t work? Surely you only add a help patch when at least the simplest implementation of it works.

What am I doing wrong? Or is it a bug in 6.6 stable?

EDIT:

Found the culprit. I had placed the MidiControllerModule in the Class next to the Channel definitions.

I now placed it in the root and it works.