Console Commands: Difference between revisions

no edit summary
No edit summary
(One intermediate revision by the same user not shown)
Line 8: Line 8:
* Not all of the commands below have undo/redo support. So if you make a change it might not be possible to undo it.
* Not all of the commands below have undo/redo support. So if you make a change it might not be possible to undo it.
* It's possible to corrupt your sequence using the console. So if you're new to this it's highly recommended that you save your sequence before messing with the console.
* It's possible to corrupt your sequence using the console. So if you're new to this it's highly recommended that you save your sequence before messing with the console.
* The fundamental time units used by the sequencer are quarter notes, starting at 0. So t=10 would mean the half-beat after the second beat. If you set the grid to 1/4 (the default) the grid lines match this time unit. Markers can only be placed at whole number time steps: t=0, 1, 2, etc.
* The fundamental time units used by the sequencer are quarter notes, starting at 0. So t=10 would mean the half-beat after the second beat. If you set the grid to 1/4 (the default) the grid lines match this time unit. Markers can only be placed at whole number time steps: t=0, 1, 2, etc.
* Instruments are identified using a number, also known as the ID. The current instrument is stored in the global variable "instrument". So to figure out the number for an instrument, just choose that instrument in the UI, type "instrument", and press enter. You can also just pass "instrument" directly to use the current instrument, eg "setDetune(instrument, 1200)".
* Instruments are identified using a number, also known as the ID. The current instrument is stored in the global variable "instrument". So to figure out the number for an instrument, just choose that instrument in the UI, type "instrument", and press enter. You can also just pass "instrument" directly to use the current instrument, eg "setDetune(instrument, 1200)".
* The console can be very noisy, but all the log spam comes from the ads. You can restrict the console to only show logs from the sequencer itself by enabling "Selected context only" in the console settings (see image). This works in Chrome, but there will be similar filters in any browser.
* The console can be very noisy, but all the log spam comes from the ads. You can restrict the console to only show logs from the sequencer itself by enabling "Selected context only" in the console settings (see image). This works in Chrome, but there will be similar filters in any browser.
* Since 2023, if the browser questions pasting, you must:
** For one-time browser use, use the command "allow pasting."
** For permanent browser uses, go to settings, experiments, and "Show warning about self-XSS when pasting code."
[[File:Silencing log spam.png|alt=Silencing log spam|thumb|241x241px|To silence log spam, click the console settings button, then enable "Selected context only".]]
[[File:Silencing log spam.png|alt=Silencing log spam|thumb|241x241px|To silence log spam, click the console settings button, then enable "Selected context only".]]


533

edits