Rewrite part of evaluation logic, run prettier
This commit is contained in:
@ -18,44 +18,44 @@ The Topos interface is designed on a simple concept: _scripts_ and _universes_.
|
||||
Every Topos session is composed of **local**, **global** and **init** scripts. These scripts form a structure called a "_universe_". The scripts can describe whatever you want: songs, sketches, small tools, or whatever. All the scripts are written using the JavaScript programming language. They describe a musical or algorithmic process. You can call them anytime.
|
||||
|
||||
- **the global script** (${key_shortcut(
|
||||
"Ctrl + G"
|
||||
"Ctrl + G",
|
||||
)}): _Evaluated for every clock pulse_. The central piece, acting as the conductor for all the other scripts. You can also jam directly from the global script to test your ideas before pushing them to a separate script. You can also access that script using the ${key_shortcut(
|
||||
"F10"
|
||||
"F10",
|
||||
)} key.
|
||||
- **the local scripts** (${key_shortcut(
|
||||
"Ctrl + L"
|
||||
"Ctrl + L",
|
||||
)}): _Evaluated on demand_. Local scripts are used to store anything too complex to sit in the global script. It can be a musical process, a whole section of your composition, a complex controller that you've built for your hardware, etc... You can also switch to one of the local scripts by using the function keys (${key_shortcut(
|
||||
"F1"
|
||||
"F1",
|
||||
)} to ${key_shortcut("F9")}).
|
||||
- **the init script** (${key_shortcut(
|
||||
"Ctrl + I"
|
||||
"Ctrl + I",
|
||||
)}): _Evaluated on program load_. Used to set up the software the session to the desired state before playing, for example changing bpm or to initialize global variables (See Functions). You can also access that script using the ${key_shortcut(
|
||||
"F11"
|
||||
"F11",
|
||||
)} key.
|
||||
- **the note file** (${key_shortcut(
|
||||
"Ctrl + N"
|
||||
"Ctrl + N",
|
||||
)}): _Not evaluated_. Used to store your thoughts or commentaries about the session you are currently playing. It is nothing more than a scratchpad really!
|
||||
|
||||
|
||||
${makeExample(
|
||||
"Calling scripts to form a musical piece",
|
||||
`
|
||||
"Calling scripts to form a musical piece",
|
||||
`
|
||||
beat(1) :: script(1) // Calling local script n°1
|
||||
flip(4) :: beat(.5) :: script(2) // Calling script n°2
|
||||
`,
|
||||
true
|
||||
)}
|
||||
true,
|
||||
)}
|
||||
|
||||
${makeExample(
|
||||
"Script execution can become musical too!",
|
||||
`
|
||||
"Script execution can become musical too!",
|
||||
`
|
||||
// Use algorithms to pick a script.
|
||||
beat(1) :: script([1, 3, 5].pick())
|
||||
flip(4) :: beat([.5, .25].beat(16)) :: script(
|
||||
[5, 6, 7, 8].beat())
|
||||
`,
|
||||
false
|
||||
)}
|
||||
false,
|
||||
)}
|
||||
|
||||
### Navigating the interface
|
||||
|
||||
@ -81,7 +81,7 @@ There are some useful functions to help you manage your scripts:
|
||||
|
||||
|
||||
A set of files is called a _universe_. You can switch between universes immediately immediately by pressing ${key_shortcut(
|
||||
"Ctrl + B"
|
||||
"Ctrl + B",
|
||||
)}. You can also create a new universe by entering a name. Load a universe by typing its name. Once a universe is loaded, it is not possible to call any data/code from any other universe. Switching between universes does not stop the transport nor reset the clock. The context switches but time keeps flowing. This can be useful for transitioning between songs / parts.
|
||||
|
||||
There are some useful functions to help you manage your universes:
|
||||
|
||||
Reference in New Issue
Block a user