Window Reference JavaScript window |

Echoes your actions in JavaScript source code - for cut-and-pasting into Web page code - as a convenience for Web page authors. Note: Musicians and sound designers not involved in Web page coding details probably won't need to use the JavaScript window.
Every time you take any action in the Beatnik Editor that can also be done in a Web page JavaScript program with Beatnik's Music Object programming interface, the equivalent JavaScript source code is added to the JavaScript window. You can copy this source code from the JavaScript window, and then paste it into your Web page source code using a text editor. The JavaScript window will accumulate all your actions up to a maximum of 32,768 characters of code, at which point the oldest entries will begin to `scroll off the top' and disappear.
Note: When a Percussion Bank instrument is selected in a Session document window, clicking notes on the Player window keyboard produces `playNote()` commands in the JavaScript window with program numbers over 127. While program numbers over 127 would not be valid in a MIDI sequence, and could not be sent over a MIDI wire, in Beatnik's Music Object programming interface for the Beatnk Player (for Web browsers) or for the Beatnik Xtra (for Director and Shockwave) they select Percussion Bank instruments. For example, program 128 selects Percussion Instrument 0, program 129 selects Percussion Instrument 1, and so on, up to program 255 which selects Percussion Instrument 127.
Item
Use
1 Source Code Area
JavaScript source code appears here as text that you can copy or cut to the clipboard. To copy or cut, use the Edit menu commands, the Copy button (2), or the context menu commands.
To access the context menu: for Windows, right-click; for Mac OS, control-click.
2 Copy button
Click to copy the selected JavaScript source code text to the clipboard. If nothing's selected, copies all source code text in the JavaScript window.
3 Clear button
Click to clear all source code text in the JavaScript window.

Window Reference / JavaScript window top |