By Mark Wherry
We delve into the Boolean operations in the Logical Editor, offer some tips for entering numeric values in the Transport Panel, and take a first look at Cubase running on dual-processor, dual-core systems.
In January's edition of Cubase Techniques we began an in-depth look at Cubase's Logical Editor, a powerful way of processing MIDI data using logical operations. Although we were able to carry out some fairly advanced functions when combining Logical Editor Presets with Key Commands and Macros, the actual conditions we were using to select certain MIDI Events in the Filter Condition List were fairly straightforward. However, in order to offer more complexity in how each line of the Filter Condition List is used to build an expression, you can use Boolean algebra to build sets of conditions and express how one set relates to another.
If the thought of reading about Boolean algebra in Sound On Sound is somewhat unappealing, don't worry: the amount you need to know to make use of the Logical Editor is minimal. However, should you want to learn more about this subject, an easy-to-read book I'd recommend that doesn't require a degree in discrete mathematics is Charles Petzold's Code (ISBN: 0735611319), which covers this and many other related topics.
Tell Me The Truth
At a basic level, Boolean algebra is all about truth: is a given condition true or not? In the case of the Logical Editor, consider the condition 'type is note': if you have a MIDI Part selected containing both MIDI note and controller Events, this condition will only be true for Events that are notes, so only the notes would be selected. Now consider adding a second condition, as we did previously: 'pitch is C3'. Because we want to select only the notes that equal C3, we need both conditions to be true, which requires the use of the AND operator from Boolean algebra. So the complete condition would be 'type is note AND pitch is C3'.
At this point, you might have noticed the Filter Condition List has a 'bool' column for Boolean operators, and by default Cubase has added an AND after the first condition. The Boolean operator used to join conditions can either be AND or OR, and you toggle between these by clicking on the operator you want to change in the Filter Condition List. When using the OR operator to associate two conditions, an expression is true if either one of the conditions is true, which we'll look at in more detail in just a moment.
The Filter Condition List also supports sets, so you can use open and close brackets to indicate a set within an overall expression via two columns, one on either side of the Filter Condition List, that enable you to specify the state of the open and closed brackets by clicking in the relevant space and choosing brackets from a pop-up menu. By default, one set of brackets encompasses the entire expression, and you'll notice an open bracket (the left column) in the first condition and a closed bracket (the right column) in the second condition. This is actually explained more clearly in the status line below the Filter Condition List, which for the 'find notes that are C3' example will read: '(Type = Note AND Value1 = C3)', clearly showing the use of Boolean algebra.
To explain this a little more practically, let's say we want to build a condition that selects notes that are either C3 or D3. Since this condition has three expressions ('type is note', 'pitch equals C3' and 'pitch equals D3'), we need three Lines in the Filter Condition List, and the crucial thing here is how these expressions are grouped with Boolean operators. There are two possible input expressions: a note that's C3 and a note that D3, so you could express this in the Filter Condition List in four rows with two sets of brackets: (Type Is Equal Note AND Pitch Is Equal C3) OR (Type Is Equal Note AND Pitch Is Equal D3). If either expression is true for an Event, that Event will be processed.
However, I mentioned we can do this in three lines, and since in both of the two expressions described above there is the Line 'Type Is Equal Note', we can factor this out so we end up with just three lines: Type Is Equal Note AND (Pitch Is Equal C3 OR Pitch Is Equal D3). Pretty neat. And another nice thing is that if you make a mistake when setting up the grouping of a condition with brackets, the status line below the Filter Condition List will read 'Syntax Error', instead of displaying the full condition.
Easy Accents
Let's look at another example where the Boolean operators can come in handy, and the idea for this one came from the same composer who needed to readjust velocity layers in one of the previous column's examples. Say you have a repeated semiquaver sequence in a 4/4 bar and you want to accent the first semiquaver beat of every crotchet (beats 1/16, 5/16, 9/16 and 13/16); normally you'd select the notes falling on these beats and increase the velocity for these selected notes. But it can be really tedious to select these notes manually — especially if the basic rhythm of the sequence continues for many bars — and while you could investigate the groove quantise options to make this process easier, building a Logical Editor preset to select the appropriate notes is much more flexible because you can do more to the selected notes once they're selected than just change the velocity.
Start with the 'Init' preset in the Logical Editor window again, giving you a Filter Condition List Line with 'Type Is Equal Note', and set the Function to Select. Remove the brackets from the first Line in the Filter Condition List by clicking the open and close bracket columns and selecting 'All Off' and add four lines (for each beat/area of the bar we want to specify), setting the Filter Target to Position and the Condition to 'Inside Bar Range'. Next, put a single open bracket before the second Line and a closed bracket at the end of the fifth Line, and set the bool column to the second, third and fourth Lines to OR by selecting the appropriate Line and clicking on AND in the bool column to toggle it to OR. The 'Inside Bar Range' Condition allows the bar positions you specify to apply to every bar, as opposed to specifying absolute positions, such as bar one to bar two.
Notice how the Bar Range column becomes active, giving you a visual overview of a bar, and you can either specify the range in ticks numerically using Parameters 1 and 2, or visually by dragging the Bar Range graph — personally, I prefer the former as it can be hard to be accurate when doing the latter. The tick resolution is 480 PPQN (Parts Per Quarter Note), so a semiquaver is worth a quarter of this value meaning that the length of semiquaver in ticks is 120 at this resolution.
What we're doing is saying all notes within a given range should become selected, so in order to select the first, fifth, ninth and thirteenth semiquaver beats, set Parameter 1 and 2 as follows for the Lines in the Filter Condition List: 0 and 119, 480 and 599, 960 and 1079, and 1440 and 1559. Now when you press Do It, the appropriate beats in the bar will become selected, making it easy to adjust the velocity of these selected Events in the Event Infoline.
This preset is designed to select the appropriate notes, and the Select function works on all Events available in the selected MIDI Part (or Parts) if nothing is selected already, or looks at only the selected Events, if you've made a selection to start with. In this latter case, Events that don't apply to the condition in the Filter Condition List become unselected. So the next step for example of accenting certain beats in a bar is to come up with a Logical Editor preset that increases the velocity of selected notes.
Make sure you have saved the current operation in the Logical Editor as a preset and then select the 'init' preset again to start afresh. Make sure the Function Menu is set to Transform, and that the first line of the Filter Condition List states 'Type Is Equal Note'. Now, in the Action List, set the Action Target to Value 2, the Operation to Add, and Parameter 1 to the amount you want to accents the notes by; say, 10. Now, you can either use the selection and the velocity presets separately, or you could create a Macro, as described in January's Cubase Technique article, to execute both commands with one keystroke.
From here, you might want to create the corresponding -10 velocity preset as well, and you could take the whole method further by building other presets to select different beats of the bar, or perform other manipulations, such as length adjustments. In fact, that's the great thing with the Logical Editor: once you know how data is selected and processed, it's pretty easy to come up with interesting manipulations, or faster way to solve common tasks. Although we've reached the end of our exploration for the time being, a good next step would be to start exploring the presets supplied with Cubase, figure out how they work, and see if you can modify them (or combine them via Macros) to do other appealing, and perhaps out-of-the-ordinary effects.
Published March 2006
No comments:
Post a Comment