WebAudio Csound

Csound()

Csound frontend class, wrapping CsoundObj

Constructor

new Csound()

Source:

Methods

(inner) Aftertouch(channel, amount)

Sends in a MIDI MONOAFT message to Csound's MIDI input.
Parameters:
Name Type Description
channel number MIDI channel (1-16)
amount number aftertouch amount (0-127)
Source:

(inner) CompileCsdText(s)

Compiles a CSD passed as a string of text.
Parameters:
Name Type Description
s string A string containing the complete text of the CSD.
Source:

(inner) CompileOrc(s)

Sends orchestra code to be compiled by csound.Csound.
Parameters:
Name Type Description
s string A string containing the code.
Source:

(inner) ControlChange(channel, control, amount)

Sends in a MIDI CONTROLCHANGE message to Csound's MIDI input.
Parameters:
Name Type Description
channel number MIDI channel (1-16)
control number MIDI cc number (0-127)
amount number cc amount change (0-127)
Source:

(inner) CopyToLocal(src, dest)

Copies a server file to local/. (not persistent).
Parameters:
Name Type Description
src string The src name
dest string The dest name
Source:

(inner) CopyUrlToLocal(url, name, callback)

Copies a URL file to local/. (not persistent). NB: works with the origin URL and CORS-ready URLs
Parameters:
Name Type Default Description
url string The url name
name string The file name
callback function null completion callback
Source:

(inner) Event(s)

Sends line events to csound.Csound.
Parameters:
Name Type Description
s string A string containing the line events.
Source:

(inner) GetScoreTime()

Get Score time in seconds
Source:

(inner) MIDIin(byte1, byte2, byte3)

Sends a MIDI channel message to Csound's MIDI input.
Parameters:
Name Type Description
byte1 number first midi byte (128-255)
byte2 number second midi byte (0-127)
byte3 number third midi byte (0-127)
Source:

(inner) NoteOff(channel, number, velocity)

Sends a MIDI NOTEOFF message to Csound's MIDI input.
Parameters:
Name Type Description
channel number MIDI channel (1-16)
number number MIDI note (0-127)
velocity number MIDI velocity (0-127)
Source:

(inner) NoteOn(channel, number, velocity)

Sends in a MIDI NOTEON message to Csound's MIDI input.
Parameters:
Name Type Description
channel number MIDI channel (1-16)
number number MIDI note (0-127)
velocity number MIDI velocity (0-127)
Source:

(inner) Pause()

Pauses audio playback.
Source:

(inner) PitchBend(channel, fine, coarse)

Sends in a MIDI PITCHBEND message to Csound's MIDI input.
Parameters:
Name Type Description
channel number MIDI channel (1-16)
fine number fine PB amount (LSB) (0-127)
coarse number coarse PB amount (MSB) (0-127)
Source:

(inner) Play()

Starts audio playback.
Source:

(inner) PlayCsd(s)

Starts real-time audio playback with a CSD. The variable can contain a filepath or the literal text of a CSD.
Parameters:
Name Type Description
s string A string containing the pathname to the CSD.
Source:

(inner) PolyAftertouch(channel, number, aftertouch)

Sends in a MIDI POLYAFT message to Csound's MIDI input.
Parameters:
Name Type Description
channel number MIDI channel (1-16)
number number MIDI note (0-127)
aftertouch number MIDI aftertouch (0-127)
Source:

(inner) ProgramChange(channel, number)

Sends in a MIDI PROGRAMCHANGE message to Csound's MIDI input.
Parameters:
Name Type Description
channel number MIDI channel (1-16)
number number MIDI pgm number (0-127)
Source:

(inner) ReadScore(s)

Sends a score to be read by csound.Csound.
Parameters:
Name Type Description
s string A string containing the score.
Source:

(inner) RenderCsd(s, callback)

Starts file rendering with a CSD (no real-time audio). The variable can contain a filepath or the literal text of a CSD.
Parameters:
Name Type Default Description
s string A string containing the pathname to the CSD.
callback function null completion callback
Source:

(inner) RequestChannel(name)

Requests the value of a control channel in csound.Csound.
Parameters:
Name Type Description
name string The channel requested
Source:

(inner) Reset()

Reset the Csound engine
Source:

(inner) SetChannel(name, value)

Sets the value of a control channel in csound.Csound.
Parameters:
Name Type Description
name string The channel to be set.
value number The value to set the channel.
Source:

(inner) SetStringChannel(name, string)

Sets the value of a string channel in csound.Csound.
Parameters:
Name Type Description
name string The channel to be set.
string string The string to set the channel.
Source:

(inner) SetTable(num, pos, value)

Sets the value of a table element.
Parameters:
Name Type Description
num string The table to be set.
pos string The pos to set.
value string The value to set.
Source:

(inner) StartInputAudio()

Start default audio input.
Source:

(inner) Stop()

Stops rendering and resets csound.Csound.
Source:

(inner) UpdateStatus(opt_message)

Prints current status to the console.
Parameters:
Name Type Description
opt_message string The status message.
Source: