Container for dictionaries of shortcuts for the event framework, which can be defined by the user. Shortcuts might be for event keywords or any other (e.g. synth args). At every time one shortcut dictionary is current, but it's only active if EventShortcuts is turned on. Dictionaries are encapsulated and can only be accessed via copies and posting to prevent unintended changes. For event keywords see James Harkins' Practical Guide to Patterns (especially Pattern Guide 07: Value Conversions and Pattern Guide 08: Event Types and Parameters).
Therfore shortcuts won't work automatically after new definitions of event types. You'd have to turn EventShortcuts on again or apply the method EventShortcuts: *prefixEventTypes. Quite obviously, switching between different shortcut dictionaries might cause a mess while playing (or pausing and resuming) patterns with these shortcuts. But these are exceptional cases, a typical usage would be defining your personal shortcut dictionary (e.g. in the startup file), turning EventShortcuts on and playing therewith, then maybe turning it off and on again on occasion.
Some pattern classes (e.g. Ppar) don't work correctly with EventShortcuts, but this can be circumvented by applying shortcuts to source event patterns before, see method Pattern: -eventShortcuts. See also PLx_and_live_coding_with_Strings
Adds a new named IdentityDictionary of shortcuts.
name |
Symbol or String. |
dict |
IdentityDictionary of abbreviations (keys given as Symbols) and original names (values given as Symbols). |
overwrite |
Boolean. Determines if a shortcut dictionary of that name – if existing at all – is overwritten. Defaults to false. |
Adds a new named IdentityDictionary of shortcuts based on the copy of an existing one.
baseName |
Symbol or String. Name of the shortcut dictionary to build upon. |
newName |
Symbol or String. Name of the new shortcut set. |
dict |
IdentityDictionary of new or/and additional abbreviations (keys given as Symbols) and original names (values given as Symbols). |
overwrite |
Boolean. Determines if a shortcut dictionary of that name – if existing at all – is overwritten. Defaults to false. NOTE: overwrite only determines overwriting of an old dictionary of the same name. It doesn't influence the overwriting in the copy of the base dictionary itself, as exactly this is a main aim of the method. (you might want to replace the association 's'-> 'strum' by 's' -> 'server') |
Removes a named IdentityDictionary of that name.
name |
Symbol or String. |
Removes all IdentityDictionaries except \default.
Returns a copy of a shortcut dictionary of that name (if stored).
name |
Symbol or String. |
Returns a copy of the current shortcut dictionary of that name.
name |
Symbol or String. |
Returns an IdentityDictionary of copies of all stored shortcut dictionaries.
Posts the shortcut dictionary of that name (if stored).
name |
Symbol or String. |
Posts the current shortcut dictionary.
Posts all shortcut dictionaries.
Makes the shortcut dictionary of that name current (if stored).
name |
Symbol or String. |
Turns on the shortcut mechanism, making it ready for events / patterns to be played. Also invokes EventShortcuts: *prefixEventTypes.
Turns the shortcut mechanism off.
Puts the remapping function before all event type functions. Therefore a newly defined event type won't work with shortcuts before this has been called ( directly or via EventShortcuts: *on ).
Returns the Symbol of the current shortcut dictionary.
Returns the Symbols of all shortcut dictionaries.
Returns the current state (\on or \off).