Console Commands: Difference between revisions

Jump to navigation Jump to search
Added a couple of images, and a tip about silence log spam
(Added a small note to humanize, and reverted a few grammar changes (all the other grammar changes were good, thanks Crum).)
(Added a couple of images, and a tip about silence log spam)
Line 1: Line 1:
'''Console Commands''' extend the functionality of the sequencer beyond what is possible with the UI. To access the console, press Ctrl + Shift + J for Chromium browsers, or Ctrl + Shift + K for Firefox.
[[File:Chrome console.png|alt=The Chrome developer console|thumb|The Chrome developer console]]
'''Console Commands''' extend the functionality of the sequencer beyond what is possible with the UI. To access the console, press Ctrl + Shift + J for Chromium browsers, or Ctrl + Shift + K for Firefox.  


To run a command using the console, just type it in and press enter. The console executes JS code, so if you want to go beyond copying/pasting the commands on this page, try [https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps learning some JS].
To run a command using the console, just type it in and press enter. The console executes JS code, so if you want to go beyond copying/pasting the commands on this page, try [https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps learning some JS].
Line 10: Line 11:
* 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.
[[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".]]


== Basic techniques ==
== Basic techniques ==

Navigation menu