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.
A tip that we previously covered in Cubase Technique was that to enter the position of the locators on the Project Cursor numerically, you can press either Shift+L, Shift+R, or Shift+P to trigger the Input Left Locator, Input Right Locator or Input Position Key Commands respectively, enter the time (using the left and right cursor keys to navigate between the different parts of the location value) and press Return. However, once you have triggered one of the Input transport commands, you can press '+' on the numeric keypad to open the 'Add' text input window, enabling you to enter a time value that will be added to the current time.
For example, if the Project Cursor is at 188.8.131.52 and you press Shift+P (Input Position), followed by '+', type in 5 and press return, the Project Cursor will be set to 10.1.1.0. Although you can't press the '-' key on the number keypad in the same way to enter a negative value, you can enter a negative value in the Add window that appears when you press the '+' key instead. This method works for the Left and Right Locators as well, and while the Secondary Time Display doesn't have an 'Input' Key Command, if you are editing this Time Display you can still use the addition function we've been describing.
The only caveat to the Add feature is that it doesn't work correctly when the Project is playing back and you use the Input Position command to modify the Primary Time Display. You can carry out the instructions as described, but there will be no effect on the position of the Project Cursor, although you can make additions to the Left and Right Locators — and the Secondary Time Display — and this will work as expected. Interestingly, the addition command will work for the Primary Time Display if you drag the values in the Add window with the mouse instead of entering them with the keyboard, but this is far less convenient. Hopefully this will be fixed in a future version.
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.
In November's Cubase Techniques I mentioned that Cubase SX 3.1 now supports more than two processor cores, enabling it to take full advantage of machines with four cores, such as the new dual-processor, dual-core systems now becoming available. This month I had chance to briefly try out a few experiments on a Boxx 7400-series workstation (www.boxxtech.com/products/7400.asp) featuring dual AMD dual-core Opteron 280 processors (with each core running at 2.4 GHz), 4GB memory, the 32-bit version of Windows XP Professional with Service Pack 2, and an RME Hammerfall DSP 9652 audio card.
For general use, the system felt pretty fast, of course, but no more so than any other fairly powerful system (dual-core or not) that I've used recently, and this is to be expected since tasks like managing the user interface won't really benefit from multiple cores. Where I did see an obvious gain, though, was in DSP performance, since Cubase effectively has two more cores to run instances of plug-ins when compared to dual-processor, single-core configurations.
While the details of how an application such as Cubase makes use of multiple processors is the subject of another article I'm working on, the basic principle is that each channel (and any processing associated with that channel, such as VST Instrument or effects plug-ins) is presented to the mix engine as a task, and the tasks are distributed amongst processor cores that have time to deal with them. This means that a four-core system can process four channels' worth of processing simultaneously; but it also means that a single channel on the mixer can't exceed what can be calculated on one processor core — in other words, the processing for a single channel cannot be (or, rather, is not) split across multiple cores. So if you consider that you can now carry out four channels' worth of processing simultaneously, this roughly explains why four cores gives you practically double the processing power, even if you take out the other overheads of running the operating system and the application itself.
To give an idea of actual performance, just for old time's sake I decided to see how many Reverb A plug-ins I could run, and, as it turned out, the system was capable of 176 Reverb A plug-ins split across 22 Channels with a buffer size of 12ms. Not bad. Turning to a more intensive plug-ins, I was able to run six instances of Waves' IR1 per core (adding seventh instance to a channel overloaded the system, although was actually possible with a buffer size of 24ms) giving 24 in total. Finally, and again just for fun, I went back to Pro 53 to see how many voices were now possible on a modern system, and this number was a staggering 765 voices, again with a 12ms buffer size.
While the clock speeds of current multi-core processors are slower than single-core equivalents, this is only marginal, and the benefits reaped by having two extra cores have huge implications for DSP-intensive applications. In the IR1 test, for example, a similarly clocked single-core, dual processor system would manage just 12-14 instances — literally half of what's possible on the dual-core, dual-processor system. So, if you're a power-hungry Cubase user, even on first impressions, it's hard not to recommend a dual-core system.
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.