Members
about_overlay
May be assigned the DOM object of a
- Source:
control_parameters_addon
May be assigned a JavaScript object consisting of Csound control parameters, with default values. The naming convention must be global Csound variable type, underscore{ , Csound instrument name}, underscore, Csound control channel name. For example:
control_parameters_addon = { "gk_Duration_factor": 0.8682696259761612, "gk_Iterations": 4, "gk_MasterOutput_level": -2.383888203863542, "gk_Shimmer_wetDry": 0.06843403205918619 };
The Csound orchestra should define matching control channels. Such parameters may also be used to control other processes. saveAs: function saveAs(presetName) { if (!this.load.remembered) { this.load.remembered = {}; this.load.remembered[DEFAULT_DEFAULT_PRESET_NAME] = getCurrentPreset(this, true); } this.load.remembered[presetName] = getCurrentPreset(this); this.preset = presetName; addPresetOption(this, presetName, true); this.saveToLocalStorageIfPossible(); },
- Source:
csound_code_addon
May be assigned the text of a Csound .csd patch. If so, the Csound patch will be compiled and run for every performance.
- Source:
csound_message_callback
Called by Csound during performance, and prints the message to the
scrolling text area of a
- Source:
html_controls_url_addon
May be assigned the URL of a Web page to implement HTML-based controls
for the performance. This is normally used only if there is a secondary
display to use for these controls, so that the primary display can become
fullscreen. The resulting Web page can obtain a reference to this piece
from its window.opener
, which is the window that opens the HTML
controls window, and the opener can be used to control all aspects of the
piece.
For this to work the HTML controls and the piece must have the same origin.
- Source:
html_controls_window
Stores a reference to the HTML controls window; this reference will be used to close the HTML controls window upon leaving fullscreen.
- Source:
metadata
Metadata to be written to output files. The user may assign values to any of these fields.
- Source:
piano_roll_overlay
May be assigned the DOM object of a
- Source:
score_generator_function_addon
May be assigned a score generating function. If so, the score generator will be called for each performance, and must generate and return a CsoundAC Score, which will be translated to a Csound score in text format, appended to the Csound patch, displayed in the piano roll overlay, and played or rendered by Csound.
- Source:
shader_overlay
May be assigned an instance of a cloud5-shader overlay. If so, the GLSL shader will run at all times, and will normally create the background for other overlays. The shader overlay may call addon functions either to visualize the audio of the performance, and/or to sample the video canvas to generate notes for performance by Csound.
- Source:
stop
Stops both Csound and Strudel from performing.
- Source:
Methods
copy_parameters(parameters)
Copies all current dat.gui parameters to the system clipboard in JSON format.
Parameters:
Name | Type | Description |
---|---|---|
parameters |
Object | A dictionary containing the current state of all controls; keys are control parameter names, values are control parameter values. This can be pasted from the clipboard into source code, as a convenient method of updating a piece with parameters that have been tweaked during performance. |
- Source:
gk_update(name, value)
Called by the browser when the user updates the value of a control in the Controls menu, and sends the update to the Csound control channel with the same name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The literal name of the Csound control channel. |
value |
number | The current value of that channel. |
- Source:
hide(overlay)
Helper function to hide custom element overlays.
Parameters:
Name | Type | Description |
---|---|---|
overlay |
Object |
- Source:
log(message)
A convenience function for printing the message in the
scrolling
Parameters:
Name | Type | Description |
---|---|---|
message |
string |
- Source:
menu_add_command(control_parameters_addon, gui_folder, name, onclick)
Adds a user-defined onclick handler function to the Controls menu of the piece.
Parameters:
Name | Type | Description |
---|---|---|
control_parameters_addon |
Object | Dictionary containing all control parameters. |
gui_folder |
Object | The folder to which the command will be added. |
name |
string | The name of the command. |
onclick |
function | User-defined function to execute the command. |
- Source:
menu_folder_addon(name) → {Object}
Adds a new folder to the Controls menu of the piece.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the folder. |
- Source:
Returns:
The new folder.
- Type
- Object
menu_slider_addon(gui_folder, token, minimum, maximum, step)
Adds a new slider to a folder of the Controls menu of the piece.
Parameters:
Name | Type | Description |
---|---|---|
gui_folder |
Object | The folder in which to place the slider. |
token |
string | The name of the slider, usually the name of a Csound message channel. |
minimum |
number | The minimum value of the slider (may be negative). |
maximum |
number | The maximum value of the slider. |
step |
number | An optional value for the granularity of values. |
- Source:
send_parameters(parameters)
Sends a dictionary of parameters to Csound at the start of performance. The keys are the literal Csound control channel names, and the values are the values of those channels.
Parameters:
Name | Type | Description |
---|---|---|
parameters |
Object |
- Source:
show(overlay)
Helper function to show custom element overlays.
Parameters:
Name | Type | Description |
---|---|---|
overlay |
Object |
- Source:
toggle(overlay)
Helper function to show the overlay if it is hidden, or to hide the overlay if it is visible
Parameters:
Name | Type | Description |
---|---|---|
overlay |
Object |
- Source:
(static) render(is_offline)
Invokes Csound and/or Strudel to perform music, by default to the audio output interface, but optionally to a local soundfile. Acts as an async member function because it is bound to this.
Parameters:
Name | Type | Description |
---|---|---|
is_offline |
Boolean | If true, renders to a local soundfile. |
- Source: