Description
This is the component provided by the Sound card.
Component name: sound
.
This is the component provided by the Sound card.
Component name: sound
.
clear()
Clears the instruction queue.
open(channel:number)
Opens the specified channel, allowing sound to be generated.
process()
Starts processing the queue; Returns true is processing began, false if there is still a queue being processed.
close(channel:number)
Closes the specified channel, stopping sound from being generated.
delay(duration:number)
Adds a delay of the specified duration in milliseconds, allowing sound to generate.
setTotalVolume(volume:number)
Sets the general volume of the entire sound card to a value between 0 and 1. Not an instruction, this affects all channels directly.
setADSR(channel:number, attack:number, decay:number, attenuation:number, release:number)
Assigns ADSR to the specified channel with the specified phase durations in milliseconds and attenuation between 0 and 1.
resetEnvelope(channel:number)
Removes ADSR from the specified channel.
setLFSR(channel:number, initial:number, mask:number)
Makes the specified channel generate LFSR noise. Functions like a wave type.
resetAM(channel:number)
Removes the specified channel's amplitude modulator.
setFrequency(channel:number, frequency:number)
Sets the frequency on the specified channel.
resetFM(channel:number)
Removes the specified channel's frequency modulator.
setWave(channel:number, type:number)
Sets the wave type on the specified channel.
setAM(channel:number, modIndex:number)
Assigns an amplitude modulator channel to the specified channel.
setVolume(channel:number, volume:number)
Sets the volume of the channel between 0 and 1.
setFM(channel:number, modIndex:number, intensity:number)
Assigns a frequency modulator channel to the specified channel with the specified intensity.
channel_count:table
modes:table