Sound
(NOTE) Generates audio using additive synthesis.
Methods | Properties | Base Classes | Derived Classes |
---|---|---|---|
AddHarmonic | soundnode | ||
NoteOff | |||
NoteOn | |||
RemoveAllHarmonics | |||
StopAllNotes |
Properties
Methods
AddHarmonic : Void
Adds a new harmonic to the additive synth notes. The first value is the multiplier that will be applied to the base frequency, the second is the volume of this harmonic, and the third (the AdsrEnvelope object) contains the envelope-related values. |Name|Type|Description| |---|---|---| |frequencyMultiplier|real| | |volume|real| | |envelope|adsrenvelope| | |type|SynthWaveType| |
function AddHarmonic(frequencyMultiplier : Real, volume : Real, envelope : AdsrEnvelope, type : SynthWaveType)
NoteOff : Void
Stops playing all current notes at the specified MIDI value. |Name|Type|Description| |---|---|---| |midiNote|real| |
function NoteOff(midiNote : Real)
NoteOn : Void
Starts playing a new note. The first parameter is the MIDI note value (range is 0 to 127), and the second is the volume modification that should be applied to this note (a value of 1.0 does not change the volume, while 0.0 would be silence). |Name|Type|Description| |---|---|---| |midiNote|real| | |volume|real| |
function NoteOn(midiNote : Real, volume : Real)
RemoveAllHarmonics : Void
Removes all current harmonics. You must add at least one harmonic before playing a note. |Name|Type|Description| |---|---|---|
function RemoveAllHarmonics()
StopAllNotes : Void
Stops playing all current notes. |Name|Type|Description| |---|---|---|
function StopAllNotes()