Hello all,
Since all my jobs have been canceled due to the COVID-19 outbreak and I'm supposed to stay at home because of a lockdown, I am trying to keep myself busy by playing around in XPression a bit.
While doing so, I'm running into a few annoyances again that can be quite frustrating so I thought I would share them with you and more importantly, offer a few suggestions on how to resolve those annoyances.
For me, the most important thing when building Visual Logic, after making sure the logic works ofcourse, is to build the logic in a neat and organised way.
The reason for this is that I'm always trying to think ahead to the day that I will have to modify this logic for whatever reason. Chances are that I will have to go and try to figure out how I've built the logic and why I built it the way I did.
So for me, structure and comments in my Visual Logic are very important.
But let me explain my issues using a practical example.
A few months ago, I have built an XPression-project for a 24h musicchannel.
The idea was (and is) that everything runs automated, so there's as little as possible human intervention or interaction is needed.
All of the information that I need, to control the graphics, is coming from the playout-system, which doesn't have an XPression-plugin or anything. The only thing coming out of the playout-system is a JSON-feed that holds a realtime playlist.
So I could either use the XPression API and write some software to control all of the graphics, or, I could use the Datalinq to read the JSON-file and interpret it using Visual Logic.
Since this is a 24h-station, I didn't really want to introduce an additional tool, because it would also introduce another possible point of failure. So I decided to use Visual Logic and Datalinq.
The main piece of information which is in the JSON-file is the start time of the next video.
The entire Visual Logic is built around that piece of information. Because if I know when the video will start, I will know when I have to show the title and artist of the song, I will know when I have to take in the bug or take it out when commercials are coming etc...
I can achieve this by constantly comparing the current time and the starttime of the song.
Luckily we have the "Clock"-block in Visual Logic where I can check the current time. However, to be able to use the starttime of the song, I need to convert it from text (string) into a Date Time-object to be able to compare it.
Not a problem for Visual Logic, I can convert the text into Hours, Minutes and Seconds and from there into a Date Time object.
So using both my Date Time-objects and some additional information, I can easily trigger some Scene Directors that show the title and artist of a song whenever I want it to appear.
However, when I want to trigger a logo (or bug if you will) when there is a commercial block coming up, I have to create some additional Logic. But I don't want to do that in the same tab because it's already a lot to look at.
So I would create another tab for everything which is related to the logo to keep it all organised. The only problem is that I need to reuse the same starttime and compare it to the current time.
So I would have to recreate the same logic as I already did for the first tab, which is annoying.
Another option which I have also used already (if the content is just text or numbers) is to store them in hidden textfields in the scene which I can then recover in another tab. But I don't really want to create additional textobjects just to be able to use their value in Visual Logic.
Another challenging fact is when you have extensive Visual Logic in a tab, you sometimes want to separate the different logic blocks that belong to other objects in the same scene, or between two different functions.
So I usually try to space it out a bit and I add a lot of comments in the Description fields of the different Visual Logic-blocks. The only issue is that the width of the Description field is limited and text starts stacking up on top of the block which might get into other blocks and becomes unreadable.
I also try to add a general description to a specific group of logic.
For example there will be a zone where I am modifying the Pivot of an object and then there might be another zone where I am changing the width and height.
So for each "zone" I like to add a general comment to explain what I'm doing.
So for those cases I usually use the Normalize-block in the Vector Math-category and I will add the general comment in the Description of that block which I never use anyway. Actually, I don't even know what any of those Vector Math-blocks do, but because of their yellow color, they stand out so I use them as general comments.
So I would like to make two suggestions:
• SUGGESTION 1: Variable block
I would like to suggest to add a "Variable"-block to Visual Logic. A block which can be placed in the Visual Logic Editor and which can be named by the user. You can then connect a value from your visual logic which will be stored in this Variable.
By copying this Variable block you can then paste it anywhere in the same Visual Logic Tab (eliminating the need to have "connections" running accross the entire tab) or even in another tab (which allows you to re-utilize the value of a previous Visual Logic-structure in another tab but still within the same Scene).
Actually, it's quite similar to the Datalinq Keys that you can create in the Scene which also allow you to reuse the same value into different Datalinq blocks. But this would be inside the Visual Logic.
• SUGGESTION 2: Comment block
A specific block or label which could be used to enter General Comments in the Visual Logic Editor to better clarify what a VL structure is being used for.
The block could be resized automatically to match the text length or might be adjusted manually by the user to size the comment block to the size of the VL structure.
This might even be expanded with the possibility to create a (colored) "groupbox" which will hold all the VL blocks that belong to a specific action.
Both suggestions would help to create a better organised and maybe even a better performing Visual Logic.
And now that I'm mentioning the performance; I have noticed that when I use a lot of VL blocks in a tab, the user interface becomes really slow. Scrolling through the tab takes forever.
It seems like the application is having difficulties trying to to render the tab fluently.
So I hope you guys can have a look at this and maybe convince the developers to put this on the roadmap ;-)
Best regards,
Kenneth