GlobalChannelPreseter

GlobalChannelPreseter.zip (63.3 KB)

10 years ago I started making a preseter for patches and as I was making new ones for every project, I started to use kontrolleur to expose ioboxes for a no patch preset utility.
The main thing was that you should be able to set a variable via the gui, or in the patch and everything loom the same.
Global channels seems to do the same job and as I have to remake an installation patch from 10 years ago in gamma, I thought I’d start again with a simple preseter.
Let me know if I’m doing anything stupid, I feel like there should be a better way to save values than serialise the whole object, it makes it hard to human read save files.
And really I feel like this shoud be in the global channels hde. Every job I’ve ever done whether vjing, art or commercial always needs a way to save looks even if they are just as a reference. Hopefully this will help someone else, and if not, its here so I can find it again :D

It uses tag/name as a naming convention, so that you can tag patches to reduce the slider counts, and they save into separate banks of presets. I use them for different scene presets. Left click to recall a preset, right click to save into one.

( I left the patch quite open so you can see whats going on where, It will get bagged and tagged I guess in the future and become more esoteric)

Also it mostly came from this thread How to get Channel (Ungeneric) attributes - question - Forum so thanks to @lasal and @elias for that. I still don’t know where the interface lives :D

4 Likes

Ah, now I come to try and make a dropdown list, I have a question, as enums aren’t a type, it seems I would need to add a custom type for ever type of enum, is that correct, or is there a workaround?

Turns out a try region is all it needed

GlobalChannelPresets0.1.zip (72.8 KB)

Hey Chris,

great to see you dive into global channels! And yes, I’d say you are on the right track there - implying that we’re on the right track ;) Well, we are on the same track at least ;)

After some detours into more prominent areas of the vvvv UX, we plan to get back to those guys and make them as nicely integrated as possible with lots of high-level UX support. There are already quite some modules and there will be more. Not all of them are already supported by the channel browser, but the list is growing…
We’ll come back to all of those topics right after releasing 6.0.

Let me give you an outlook on how they are meant to glue low-level with high-level reasoning, internal with outside perspectives. Global channels are meant to be the middle man, the solid interface between those worlds.

  • vvvv gamma started with being strong on the implementation / low-level side and we’re on our way up. Implementation details are done with custom data types. Let’s start there. You’ll be able to expose properties and attach some metadata to those properties via the inspector. A module called SubChannels will then help you organize nested global channels for your objects and their properties. The intuition with the nesting is that often you want to focus on properties (colors and other primitive data types). Basically what you were stumbling over already.

  • global channels can be thought of as an interface to your app. An in-process database. They are decoupled just enough from the low-level patches to allow stable names / pathes, even when the low-level details change. The browser currently supports dot-separated paths and displays them hierarchically.

  • If you want to generate global channels dynamically yourself - without the support of SubChannels - you can do so by reflecting over your data types yourself. Upcoming previews will outline how meta-data can be read. An example will show you how you can use tags to instruct bindings to be created for you.

  • We’re now getting into the realm of modules that allow you to make your app remote-controllable via OSC, RCP, MIDI, and more.

And, yes, indeed presets are on our list as well. While those could make sense on different levels of the language, they are also a perfect fit for an app-level preset system. Again, the meta data efforts point into this direction already.

Sorry to not already be able to hand you over the ready-to-use solution, but the fact that you look into all of this tells me that we’re talking. Pretty excited about the weeks and months ahead.
Will keep you posted for more.

4 Likes

Thanks for the update. Given this was a super quick patch, and can do pretty much all I need for now, I’ll keep adding bits for this project. Obviously osc/rcp etc are useful addons, and with my intial gui in vvvv, part of the reason for making it was for when you have your server and screen at the back of the room/in another room, but you want to tweak values from stage/where you can see the screen, etc. So very glad you are on it too :)
Next on the list is rebuilding my sequencer for the presets…

1 Like

This patch no longer works as serialize /Deserialize Xml has some how changed since 5.3 Any suggestions how to fix that? I would guess that all I need is the channel name and the value as string? Do I need to that in a similar way to the custom editor for the imgui?


So how can I get a value and cast it to a string from a channel?
If I can get the value I dont need to serialise an object, and presumably I could cast it back to a global channel from the name of the channel. I’m somewhat bewildered by how encapsulated channels are. Or how can I write these objects to a file for recall?

Hi, I’ve looked at the original patch but it’s quite complicated to understand. Maybe this patch can help illustrate some ideas that I think might help. In fact, a lot of ideas from this patch can be seen in my “add-on” work.

SpreadOfObjectChannel.vl (18.0 KB)

If that’s not what you need, I can try to look into it - I’ve experimented with channels quite a bit.

By the way, something has actually changed with the new stable version. I would do more testing. For example, there is a frame length exception that wasn’t expected:

uhm sorry for the late reply. had another look at your patch.

I found two approaches to work in a non-generic way with channels.

  • either you make use of a channel feature: each Channel<WhatEver> is also always a Channel<Object>
  • or you make use of a more standard way of dealing with situations of unkown type at design time: make use of the fact that each Channel has a non-generic access to it.

GlobalChannelPresets for gamma6.vl (311.7 KB)

still. I will have another look together with @Elias to figure out what exactly changed in terms of serialization and how it broke the patch.

Had another look and found the bug. Fixed for preview 6.4-4.

4 Likes

I’ll have another look when I’m free again, thanks!

I’ve just come back to have a look at this patch, and where global channels are at. Patch works fine, but I’m now thing about trying to recreate my vvvv timeliner, and so I want to be able to add dampers to recall presets
( I know kairos etc, but I haven’t worked out it works internally, and really I’m trying to have the ease that I had with kontroleur, where I had a zero patch interface and timeline, expose a iobox, and it appears. RCP was a bit more effort, and didn’t quite do all I wanted either)
I think really for my stupid brain, I need to understand how to get a channel and get the value out, mess with it, then put it back into a channel. In the patch the custom editors is doing that, but when I try and do something similar, it doesnt cast. There are so many types and nodes in the lists of channels and objects that is bewildering to even know if any of them do what I want them to do. Am I fundamentally trying to do it wrong? I picture instantiating a channel like a particle, for the transition time and lerping between the current value and the new value with a tweening function. I can see that maybe layerx/alchemyx can help, but they work with values, and channels and objects seem to be hard nuts to crack open.
Or do I just serialize everything then work with values from the xml before putting them back in the obejcts
(Presets1 and 2 are float only presets)
Preseter.7z (72.2 KB)

DocumentChannels.vl is missing in the zip

If you want to have a readymade zero-patch interface you might want to have a another look at the Preset system that comes with vvvv these days. It can be triggered via the Global Channel Browser or programmatically.
For examples see Example Particle Life and Example Locations in Global Channel Setup

Doc channels isn’t necessary, it was just seeing if channels were visible in from another referenced document.
I have had a look at it, but I’m trying to replicate my vvvv patch, which was very usable live, and while it had a timeline(s), you could easily create cues with fade times and play them on top or without the timeline. Its not that I dont want a timeline and curves, its more that there is lighting vs music way of working, and I’d like both (and also to be able to understand it when it doesn’t work, or do what it is that I want).
In my vvvv, I would have hundreds of cues, and hundreds parameter, but could find and tweak them very quickly, yours and kairos, are a bit more verbose maybe than I need. Basically the gui you see in that patch, was all the screen estate it took to use, the timeline was a strip at the bottom, and was an extra and could be hidden when not being edited
For example … Click a patch name and see only those parameters, for me it was close to perfect, its just that it took 3 instances assigned to 3 cores running flat out to run in vvvv! But did leave the last core for the patch to max out too…

1 Like

Maybe I need to try and incorporate your presets in my gui. But could I still do live fades from my gui or only from inside yours?

You don’t need to use our UI. You can record and transition to presets programmatically.
Regarding recording presets: there is a help patch “Work with Global Channel Presets”.
Doing live fades is shown in the help patches I mentioned above. TriggerPreset allows specifying the duration and the characteristics of the fade.

Hope that makes sense.

1 Like

Can I set fade times per channel rather than per preset? I can see a time line How to Work with, but not anyway to manipulate it, is that still to do? Example locations doesn’t have one and its not clear how to make one.
(Just found the side bar for filtering! That makes it much less daunting) And it seems like there is no undo, reverting to saved didn’t seem to restore a cleared preset (I had previous saved it with the floppy disk icon)
I’ll investigate further tomorrow, and try and save my own programitically.

1 Like

Yes please stick to building your UI. You know what you want.
Regarding the node set: No currently there is no node to specify duration per channel. I could imagine adding this functionality if you need that. Internally the transition runtime works on a channel basis anyways.
Regarding our UI: The “timeline” is for monitoring only. You can try the middle and right mouse buttons to recall values, but that is experimental. But as I said. Just focus on your UI and pretend ours wouldn’t exist.

1 Like

_PresetsGui_24.zip (95.9 KB)

Updated to save and recall your kind of presets, I like it, you can view in the HDE as well as mine. At first I though you had to make a column per preset in the HDE which would take up a lot of real estate, but now I’ve played a while, I can see that you can just drop down list to a new one and trigger with the play button. You might like to try out my gui, right click record, left trigger, is very quick and compact for presets, vdmx uses similar, with tiny buttons that fit in most of their windows, and is very useful quick prototyping, and live performing.

While playing in the HDE, I seemed to somehow create some spurious empty presets xmls, with friendly names like __1ba59da5-09c7-4c90-b772-23e1204ab121.xml, not sure how they came about.

I’ll try and dig into your Example Locations patch this afternoon, I might need some explanations, but I’ll try and work it out first… Also, where would I find the HDE patch so I can have a look inside?

_PresetsGui_24.zip (123.8 KB)

So I had most things working, and now preset don’t last past a reload (f9 or from scratch) You can save them, and see the xml is changing, but they don’t persist/get pushed into the channel. Enough for today. Fade are partially built, but i need to make the triggerPreset node spreadable, I tried, but I think it needs to done inside the library as they are many dependences and some internal nodes. I tried recreating them but they still had some red bits I couldn’t find. Looks like its straight forward to do, just make the time and tween spreads into the for loop

The boxes example worked off the bat, but isn’t quite right, I think some of the channels are doubled somehow.

In the CustomEditors patch, you connected a
grafik
to the wrong input. Connect the HardCast to the Channel input. You got rid of the helping clue via the Try region.


I can see that this patch is a bit hard to read though… Makes me wonder if this factory approach is right, as suddenly everything has to be done manually. @Elias

Edit: But still, 5 windows are popping up and I am a bit confused. Clicking the preset buttons leads to exceptions. DocumentChannels.vl I copied over from the earlier upload.
The friendly named files can be removed. They are for the case where you have a preset column and use it right away without giving a name.
vvvv 6.7 preview 257 comes with a TriggerPreset (ConfigureChannels) node.