diff options
author | Devine Lu Linvega <[email protected]> | 2019-04-18 08:56:27 +0900 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2019-04-18 08:56:27 +0900 |
commit | 64d347109a5ff5da83c6fc5fa16d7b4bf5c34a50 (patch) | |
tree | 6d7c6f87b303ad78525d426d69119450f3f212aa | |
parent | dff99f5bc187a09c5181be4e09ba9790977589cd (diff) | |
download | Orca-64d347109a5ff5da83c6fc5fa16d7b4bf5c34a50.tar.gz Orca-64d347109a5ff5da83c6fc5fa16d7b4bf5c34a50.zip |
Documented Project Mode.
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | desktop/sources/scripts/patterns.js | 8 |
2 files changed, 11 insertions, 1 deletions
@@ -106,6 +106,10 @@ All commands have a shorthand equivalent to their first character, for example, - `apm:160` Animates bpm speed to `160`. - `write:H12;34` Write glyph `H`, at `12,34`. +### Project Mode + +You can **quickly inject orca files** into the currently active file, by using the command-line prompt — Allowing you to navigate across multiple files like you would a project. Type `CmdOrCtrl+K` and the name of another `.orca` file, **located in the same folder** as the opened file, to paste it into the current patch. + ## Base36 Table Orca operates on a base of **36 increments**. Operators using numeric values will typically also operate on letters and convert them into values as per the following table. For instance `Dp` will bang every *24th frame*. diff --git a/desktop/sources/scripts/patterns.js b/desktop/sources/scripts/patterns.js index 819f4bd..610ed77 100644 --- a/desktop/sources/scripts/patterns.js +++ b/desktop/sources/scripts/patterns.js @@ -29,11 +29,17 @@ const Patterns = function (terminal) { if (terminal.source.path) { const path = terminal.source.folder() + '/' + name + '.orca' if (fs.existsSync(path)) { - return fs.readFileSync(path, 'utf8') + return this.add(name,fs.readFileSync(path, 'utf8')) } } return null } + + this.add = function(name,data){ + console.log('Patterns', `Added "${name}".`) + this.collection[name] = data + return data + } } module.exports = Patterns |