Block Controller A

Q-SYS Control 101 Training : Block Controller

1 ) Introduction

8m 37s

3 ) Simple Communication

12m 49s

4 ) Feature License Activation

4m 12s

5 ) Block Controller

19m 7s

7 ) Flow Control

34m 20s

8 ) Control 101 Conclusion

1m 42s

Lesson Description

Block Controller A 9m 49s

Dive into the revolutionary Block Controller programming tool in this navigational overview, and start manipulating simple buttons using control blocks.

Video Transcript

Block Controller A 9m 49s
0:08
The Block Controller component is a very unique feature in the Q-SYS Designer software,
0:13
designed to let you start programming without any knowledge of specific coding languages.
0:18
You will need to understand some basic concepts about programming, which we’ll get into
0:23
in some later videos, but for now let’s just do a basic navigation overview of the Block Controller
0:28
component. It has a different type of interface than anything else in Designer, so let’s familiarize
0:34
ourselves with how its blocks connect to each other by walking through an
0:38
example of a very simple project.
0:41
As always, I’d recommend opening up the software and following along with me.
0:44
You’ll find the Block Controller in the Schematic Elements library under the “Scripting
0:48
Components” branch. Let’s drag one into our Schematic. The first thing to notice is
0:54
that it has no Properties to adjust here, aside from basic position and fill color. Let’s
0:59
double-click the component to get access to its control panel.
1:02
Right now this control panel looks pretty empty. If you’re doing programming, then
1:07
you’ll very likely need to interact with some custom Q-SYS controls or connections to
1:11
third-party devices, and we can add those controls and connections using these
1:15
“Plus” buttons. Let’s click on the “Plus” button for “Controls”, which will add one new
1:21
“Toggle” button. We have the ability to customize what type of control this is and
1:26
we’ll discuss all these options in a later video as well, but for now let’s simply rename
1:30
the control. I’m not saying that “Control_1” is a terrible name, but it’s kind of like
1:35
naming your dog “Dog.” Instead, let’s name it something more unique so it’ll be easier
1:40
to follow. I’ll name mine “AMAZING”, you can name yours whatever you’d like.
1:46
I’m not going to add any Connections, because – like I said, I want to keep this
1:50
walkthrough really simple. So let’s jump straight into the actual Block Controller interface,
1:55
which you can access by clicking on the “Edit” button in the top bar.
2:01
This is the Block Controller interface. In some ways it’s similar to the Q-SYS Designer
2:06
interface – you have a big empty white space where you can add objects and connect
2:10
them to each other, and there’s a library in the side panel of all the possible objects available
2:16
for your use. But rather than route audio like Designer does, the Block Controller components
2:21
are all pieces of a logic puzzle. On their own, each piece is incomplete, but when you start
2:27
connecting them together, you’re writing code! You can see that these blocks are separated
2:32
into various categories: Values, Strings, Arrays, Operators, etc. We’ll talk about what all
2:38
of these mean later on, so don’t be intimidated if they don’t make sense yet. There’s also
2:43
a branch of blocks that are associated with the specific Control we made – see, there’s
2:48
“AMAZING” right there.
2:49
So what are all these blocks? Well, think of it this way – hypothetically, if there was a
2:55
Block controller to write a regular sentence, it might have categories such as Nouns,
3:01
Verbs, Adjectives, Prepositions, etc.
3:04
If you dragged in a verb, for instance, it would prompt you to fill in a subject and an
3:09
object for that verb. If you dragged in a noun, it would provide you the option of
3:13
adding an adjective.
3:14
You could drag these into the workspace and connect them to each other, and eventually
3:18
you’d have a coherent sentence! What makes the Block controller so powerful is that it helps
3:23
you construct that sentence properly along the way. It also will prevent you from making
3:27
mistakes like using the wrong type of word. Rather than an empty white space where you can
3:33
type anything and get it completely wrong, you would craft your sentence using these
3:37
blocks as a way to guarantee that the end result makes sense.
3:41
So here in our Block controller, it’s the same idea except we’re writing a sentence
3:46
that makes sense to a computer. Our categories are all parts of a programming language.
3:51
So you still need to understand the basic concepts of what programming is to use this,
3:56
but you don’t need to memorize the syntax rules of one specific coding language,
4:00
which is the cause of most scripting errors.
4:03
Visual coding tools like this are often used to teach beginning programmers, colloquially
4:08
known as “children”, how to get started.
4:11
In fact, that’s kind of the point of all of this! The Block Controller makes programming
4:15
so easy that even a child can do it. So I’m actually going to go ahead and swap
4:19
out with this random child I have underneath my desk, and he can teach the rest of the video.
4:25
Alright, so let’s look at how these blocks connect to each other. Again, don’t worry if
4:29
you don’t understand what these blocks do yet. I certainly don’t understand, because
4:33
I’m two years old. Instead, let’s just play with shapes.
4:37
First, we’ll look at our block options for the “AMAZING” control branch. If you select
4:42
a block, it will be added to your workspace. This first block, which says “on control
4:47
change” let’s you define what action should occur when that control changes states.
4:52
Basically, if someone presses the button, it should “do” something.
4:56
But the “do” section here is blank, and you can see these little tabs that show you what type of block
5:03
you could potentially connect here. Generally speaking, any sort of command is going
5:08
to have the matching slot for this tab, which allows those blocks to snap together.
5:12
So let’s look for a command in our “AMAZING” branch again, and we can see
5:17
that a lot of these have the matching triangular slot on the top. Let’s grab this one
5:22
near the bottom that says “set control” and “Legend” in it. We’ll talk about what it
5:26
does in just a minute. For now, we can drag this back into our diagram, and you’ll notice
5:32
that as they get close, a little indicator highlights the tab and slot where this new
5:37
block can be mounted. When you release your mouse button, these two blocks snap together.
5:42
If I grab the higher block now and move it, both blocks move as one. If I want to
5:47
break these blocks apart, I can grab the lower block, to break it apart. You’ll notice
5:52
that you even get this little wiggle animation when you separate the two to show
5:56
that it’s breaking free. It kind of reminds me of jello and again, since I’m two years
6:00
old, jello’s kind of a big deal for me. But I’m going to keep these blocks connected for now.
6:05
Now let’s talk about this “set control Legend” block. The “Legend” of a control is
6:10
simply its visual name, or its label. Yes, our control is identified as “AMAZING”, but
6:17
you can still apply any label or Legend that you want on the button. Right now, our
6:21
button doesn’t have any text on it. This block script that we’ve written currently
6:26
states that when the button is pressed, or when there is a change to “AMAZING”,
6:31
then we will set the Legend of that control to … something else.
6:37
Certain blocks have sections that may be completed using drop-down menus. For
6:41
instance, if we had more controls than just “AMAZING”, I could select a different one
6:46
here. We could also choose to change a different aspect of the control, such as its
6:50
color. Again there are a few possible options here, which is why a drop-down menu
6:55
is perfect. In fact, these five options – Color, Legend, IsInvisible, etc. – are the same
7:00
five options you’ll see here in the available blocks – Color, Legend, IsInvisible, etc.
7:06
These five blocks are actually all the exact same block, just with a different option
7:11
preselected in the drop down menu. So don’t worry if this seems like a lot of options,
7:16
it’s actually trying to save you time.
7:18
Sometimes a drop-down menu doesn’t exist, because there are too many possible
7:22
options. In a case like this, we’ll need to provide our own value. The end of this block
7:27
has another slot, where we can attach another block that has a matching tab. In this
7:33
case, it’s already providing us with a suggested block – this lightly colored block with
7:38
quotes in it. This is a string block – and a string is just a piece of text. Since this block
7:44
is changing the button’s label, it’s suggesting that we probably want a text string
7:48
here. But we can see that there’s an entire library of String options, which provide
7:53
different ways of composing text. We could select any of these blocks that have the
7:57
matching slot, and replace the string block on our command. If we were to change
8:02
the button’s color, it would suggest we use a color value instead. You’ll note that we
8:07
have an entire library of different types of values, including the same textual string
8:12
block, a numerical block, a true/false block, and several methods of selecting a color.
8:17
But let’s keep ours simple, we’ll return ours to the Legend option, where we can type
8:22
in a string for the button’s label.
8:25
We can enter whatever label we like. I’ll type in “ON”. And let’s check to see if this
8:30
works. Just like all the other controls in Q-SYS Designer, we can enter Emulation
8:35
mode to test out our design. Back in the Schematic, you’ll notice that we no longer
8:40
have the option to add or change the controls in our Block Controller, as that can
8:44
only be done in design mode. If we press our button – tada! It now has the label of ON.
8:52
But right now it always gives itself the label of ON no matter what, even when we
8:57
turn it off, because that’s what our really short script says to do. It says that any
9:02
change should set the label to ON. So technically we haven’t done anything yet that
9:07
you couldn’t have done just as easily by typing a name on your control. We’ll need to
9:12
add some new conditional blocks that will allow us to change the label to “OFF”
9:17
based on the state of the control.
9:19
But let’s take a quick break before we do that – I for one could use both a nap and a
9:24
diaper change. We’ve learned how to navigate the Block Controller and how to snap
9:29
blocks together, and in the next video we’ll learn about some other types of blocks
9:34
that can create more complicated functions. So move on to the next video whenever
9:38
you’re ready.