Grid Pro Manual - Shortcuts
From VidvoxWiki
| Grid Pro Manual |
|---|
| Getting Started |
| The Basics |
| Advanced Features |
| Optimizing Grid Pro |
Contents |
Overview
Shortcuts let you control virtually any action in GRID Pro using a standard Macintosh keyboard or MIDI device. These actions include such things as switching loop-modes, turning audio analysis on and off, advancing to the next track of an audio playlist, changing the active transition mode, and even adding new FX.
Using shortcuts
A full list of shortcuts can be found in the GRID Pro preferences under the SHORTCUTS tab. This list is broken down into several sub-categories to make managing your shortcuts easier. The contents of any sub-category can be shown or hidden at any time by clicking the disclosure triangle to the left of it's name.
For each shortcut displayed in the Shortcuts Viewer there will be a "detect" button for assigning keystrokes and MIDI sources and an on/off button used to enable and disable shortcuts.
Keyboard and MIDI assignment
Keyboard
When using a standard keyboard, pressing the caps-lock key will switch GRID Pro into custom keyboard mode which will override all other keyboard actions (with the exception of cmd key presses) such as triggering and adjusting playback speed. By using the control and option (alt) modifier keys, you can have up to four actions per key.Pressing caps-lock on a second keyboard connected to your computer will let you access all your shortcuts while leaving your main keyboard for using the standard GRID Pro keyboard layout.
To assign a keystroke to a particular shortcut, simply click the detect button in the interface for the shortcut, then press the keystroke you wish to assign to the shortcut. Don't forget to have caps-lock on and to hold down any other desired modifiers when detecting.
Once detected, the keystroke will be displayed to the left of the "detect" button and the shortcut will automatically become active.
MIDI assignment
Before you can use a MIDI device with shortcuts, you must select the appropriate device from the Port Settings Menu in the SHORTCUTS tab of the GRID Pro preferences. Because MIDI can also be used for note triggering and controlling Gesture Sliders, the shortcuts system allows for the use of a separate MIDI device for shortcuts.
Assigning a MIDI note, controller, or pitch-bend to a shortcut is exactly the same as with keystrokes - click the detect button in the interface for the desired shortcut, then press the note or move the slider/knob you wish to use with the chosen shortcut.
Once detected, the name of the assigned MIDI source will be displayed to the left of the "detect" button and the shortcut will automatically become active.
Saving and loading Keyboard/MIDI layouts
After you have finished assigning keyboard and MIDI events to shortcuts, you'll want to save your setup to use later on. This is very useful if you plan on using different MIDI instruments with GRID Pro.
Important note - Setups are not automatically saved when you quit GRID Pro.
To save your current setup, type the name you wish to use to recall the setup in the space under the text "Save Current State as:" and press the return key. If you wish to have your setup recalled whenever GRID Pro is launched, use the name "default" when saving your setup.
To load a previously saved setup, select the name of the setup from the menu under the text "Load Preset Named:"
Two kinds of shortcuts
There are two kinds of shortcuts - standard interface (uses a text file) and custom interface (written in Max/MSP). For more information on the differences between standard and custom interface shortcuts, visit the next chapter of this manual.
Standard Shortcuts
The bulk of operations you'll want to execute using shortcuts are known as Standard Shortcuts and only require a few settings. Most standard shortcuts come pre-configured so all you have to do is pick what keystroke or MIDI source you wish to use to drive it.
Standard shortcuts can function in one of two modes - trigger or pass.
In trigger mode, incoming key presses and MIDI data are used to trigger a specific action such as going to the next page in the Media Grid, setting the mixer fade time to 1 second, and restarting the clock.
Shortcuts that use trigger mode are a great way to use a regular keyboard or MIDI notes to change parameters that you would normally use a mouse or MIDI slider to adjust.
In pass mode, the incoming key presses and MIDI data are passed along with the specified action. For example, in trigger mode you could "set mixer fade time to 1 second", with pass mode you could "set mixer fade time to the incoming MIDI value".
Both trigger and pass modes can be applied on rising edge (note/key on) or falling edges (note/key off), or both rising and falling edge. The threshold setting in each standard shortcut specifies the position of the edge. The trigger and pass modes for each standard shortcut can be turned on and off using the check-boxes in the standard shortcut interface. You can easily swap the behavior of rising and falling edges by clicking the toggle box above the middle of the threshold slider.
Custom Shortcuts
When viewing the contents of a sub-category, the custom shortcuts will always appear at the top of the list and will be represented by a single line of text indicating the name of the shortcut, the current keyboard or MIDI assignment, a "detect" button for setting the keyboard or MIDI assignment, and an on/off button for the shortcut. Many of these custom shortcuts allow for additional settings beyond those available to standard shortcuts, which you can edit using the Custom Event Shortcut Editor window located below the list of shortcuts. To access these additional settings, click on the name of the shortcut you wish to edit. An example of a custom shortcut is Modify_BPM_val which can be used to increase or decrease the clock BPM by an amount specified in the Custom Event Shortcut Editor.
Making your own shortcuts
Before you create your own shortcuts, it is important to have a basic understanding of the organizational structure of the shortcut system.
For each sub-category in the Shortcut Viewer in the preferences panel, is a folder in the EventsShortcuts folder in the Grid Pro folder on your hard drive, making it possible to organize your shortcuts simply by moving files and folders in the Finder.
Each shortcuts.txt file may contain descriptions for any number of shortcuts:
- More folders or sub-directories
- XML Preset files saved by Grid Pro
- A text file named "shortcuts.txt" which contain XML-like descriptions of the standard shortcuts for that particular sub-directory
- Custom shortcuts in the form of Max/MSP patches
To get the best possible performance out of GRID Pro, any shortcuts you do not plan on using should be removed from the EventShortcuts folder. Rather than deleting them from your computer, you can simply move them to the EventShortcuts(disabled) folder, also in the GRID Pro directory.
Standard Shortcuts
The standard shortcuts for any sub-directory can be modified using any text editor (we recommend TextEdit or BBEdit). Each directory in the shortcuts folder can contain descriptions of any number of shortcuts. When saving shortcut descriptions, be sure to save your documents as plain-text without any additionally formatting.
For starters, let's look at an example shortcut from "audio analysis/smoothing":
<EVENT_STRUCTURE>
<NAME>hi smooth is incoming</NAME>
<THRESH>300</THRESH>
<INVERT>0</INVERT>
<TRIGGER>0</TRIGGER>
<TRIGGER_POS>0</TRIGGER_POS>
<TRIGGER_NEG>0</TRIGGER_NEG>
<PASS_POS>1</PASS_POS>
<PASS_NEG>1</PASS_NEG>
<RECEIVER>audioanalysis.hismooth</RECEIVER>
<FMTSTRNG>
<STRING>%ld</STRING>
<EVAL>(passedval/16383)</EVAL>
</FMTSTRNG>
</EVENT_STRUCTURE>
All of the information needed to set the amount of smoothing on the hi-band of the audio analysis is contained between the opening tag and the closing tag. Each of the additional information needed for the shortcut are surrounded by opening and closing tags to let Grid Pro know how to use each piece of data.
Each standard shortcut needs the following tags:
- <NAME> - The name that will show up in the Shortcut Viewer (string)
- <THRESH> - The default threshold setting for the shortcut (0 to 16383)
- <INVERT> - The default invert setting for the shortcut (0 or 1)
- <TRIGGER> - Currently unused
- <TRIGGER_POS> - Trigger when value changes from below threshold to above threshold, aka positive edge (0 or 1)
- <TRIGGER_NEG> - Trigger when value changes from above threshold to below threshold, aka negative edge (0 or 1)
- <PASS_POS> - Pass incoming data if above threshold (0 or 1)
- <PASS_NEG> - Pass incoming data if below threshold (0 or 1)
- <RECEIVER> - The name of the receiver or "hook" in the GridPro back end where messages are sent (string)
- <FMTSTRNG> - Inside the FMTSTRNG tag are two additional tags that are used to format the message to be sent to the receiver.
- <EVAL> - Allows you to use mathematical operations and javascript code to scale or otherwise modify the incoming data from the assigned keystroke or MIDI source before being formatted into a message. The incoming value is represented by the variable "passedval" which ranges from 0 to 16383. If the message you're going to send to the receiver has no bearing on the value of the controller (one-time events like 'next page' are a good example), then you can just put a '0' in this tag- but don't leave it blank.
- <STRING> - The message to send to the receiver in order to execute the desired shortcut. Any instance of "%ld" will be replaced by the output from any operations specified within the <EVAL> tags.
An individual shortcut can trigger multiple actions by adding additional hooks and tags messages inside the #<RECEIVER> and <FMTSTRG> tags - just be sure to place a comma (,) between each receiver in the <RECEIVER> tags and likewise for the <EVAL> and <STRING> tags.
Custom Shortcuts
More advanced shortcuts that require more parameters than available in the standard shortcut markup can be written using an object oriented programming language called Max/MSP. This tutorial assumes that you have a basic understanding of the concepts of Max/MSP - for more information visit cycling74.com
Custom shortcuts work on the same principle as the standard shortcuts - incoming data is scaled, formatted, and otherwise modified, and then sent to the appropriate receive within the back-end of GRID Pro. Like with standard shortcuts, custom shortcuts can be used to send messages to multiple receivers, allowing for powerful compound shortcuts capable of performing several tasks with a single keystroke. The list of available receives and messages are identical to those for the standard shortcuts.
If you are already familiar with Max/MSP, the best way to become acquainted with custom shortcuts is to open up one of the provided example patches.
Here are some important things to keep in mind: Each custom shortcut is script created on load. Instead of using loadbang objects inside of your patches to set the default state of your objects, use a trigger objects connected to "receive #1_load". A bang will be sent to this receive when the patch is script created.
EXTREMELY Important - After loading, a custom shortcut MUST bang a "send make-next-event" once in order to continue the script creating of other custom shortcuts. Typically this should be the left-most outlet of the trigger connected to "receive #1_load"
There is no need to place any MIDI or key objects inside of your shortcuts. All of the incoming control data is centrally processed and then passed off to the shortcuts. All incoming data is ranged 0 to 16383, with 0 representing a note/key up.
Messages to the shortcut can be received using a "receive #1". Standard messages to shortcuts include:
- 0 - turn shortcut off
- 1 - turn shortcut off
- set <name of receive from MIDI detect> - connect to an empty receive object to receive MIDI data
Many of the example patches contain additional interface controls for setting a threshold and inverting triggering behavior just like with the standard shortcuts. When designing your own patches you may want to include these very useful controls.
You can use the pattr object to have settings for your custom shortcuts saved and recalled with shortcut presets. We recommend naming your UI objects and using the bindto message.

