Classes
Members
-
<static> defaultReverb :Object
-
Description
IR file from the Voxengo Free Reverb Impulse Responses library by Aleksey Vaneev (The Musikvereinssaal, Vienna).
NB: The audio file is encoded in Base64 so that it can be auto-loaded under the local file:// protocol.Properties
Name Type Description namestring Filename
datastring The WAV audio file encoded in Base64
Examples
To make a Base64 file with OpenSSL
#openssl base64 -in /path/ir.wav -out /path/ir.base64Details
-
id :string
-
Description
The id of this Synth instance (same as the DHC id)
Details
-
dhc :HUM.DHC
-
Description
The DHC instance
Details
-
status :boolean
-
Description
The state of the Synth (Power ON/OFF); if
false, it is turned off.Details
-
voices :Object
-
Description
Namespace for FT and HT voices slots
Properties
Name Type Description ftHUM.Synth#SynthVoice FT slot for a SynthVoice object
htObject.<xtnum, HUM.Synth#SynthVoice> HT slot for a register of SynthVoice objects
Details
-
volume :Object
-
waveform :Object
-
Description
Namespace for FT and HT waveform
Properties
Name Type Description ft'sine' | 'square' | 'sawtooth' | 'triangle' FTs waveform
ht'sine' | 'square' | 'sawtooth' | 'triangle' HTs waveform
Details
-
envelope :Object
-
Description
Namespace for the ADSR envelope parameters
Properties
Name Type Description attacknumber Attack time (seconds)
decaynumber Decay time (time-constant)
sustainnumber Sustain gain value (amount from 0.0 to 1.0)
releasenumber Release time (seconds)
Details
-
portamento :Object
-
Description
Portamento/Glide parameters for monophonic FT and FT/HT osc frequency updates.
Properties
Name Type Description amountnumber Portamento time (time-constant)
lastFreqFTnumber Last FT frequency expressed in hertz (Hz); init value should be
nullDetails
-
reverb :Object
-
Description
Namespace for convolver Reverb and wet/dry mixer gains
Properties
Name Type Description convolverConvolverNode Slot for convolver reverb node
wetGainNode Reverberated gain bus/carrier node
dryGainNode Dry gain bus/carrier node
amountGainNode Reverb wey/dry mixing amount (for cross-fade)
defaultValuenumber Default value for the wet/dry mixer gain
Details
-
compressor :DynamicsCompressorNode
-
Description
The compressor node
Details
-
vumeter :ScriptProcessorNode
-
Description
The vumeter from "webAudioPeakMeter" lib
NB: theScriptProcessorNodeis deprecated but still working.Details
-
uiElements :Object
-
Description
UI HTML elements
Properties
Name Type Description fnObject.<string, HTMLElement> Functional UI elements
inObject.<string, HTMLElement> Input UI elements
outObject.<string, HTMLElement> Output UI elements
Details
Methods
-
_init()
-
Description
Initialize the new instance of Synth
Details
-
updatesFromDHC( msg )
-
Description
Manage and route an incoming message
Parameters
Name Type Description msgHUM.DHCmsg The incoming message
Details
-
voiceON( type, toneID, velocity )
-
voiceOFF( type, toneID, panic )
-
Description
Destroy a voice of the synth
Parameters
Name Type Default Description typetonetype If you need to destroy a FT or HT voice
toneIDxtnum The ID of the voice to be destroy; the FT/HT tone number
panicboolean false If
truetells that the message has been generated by a "hard" All-Notes-Off request.Details
-
allNotesOff()
-
Description
Turns off all the active voices
Details
-
updateFTfrequency()
-
Description
Update the frequency of the current playing FT oscillator
(on UI setting changes)Details
-
updateHTfrequency()
-
Description
Update the frequencies of the current playing HT oscillators
(when the FT is changing or on other UI setting changes)Details
-
updateWaveform( type )
-
Description
Update the current FT or HT waveform
Parameters
Name Type Description type'sine' | 'square' | 'sawtooth' | 'triangle' Waveform type
Details
-
updateReverb( value )
-
Description
Update the Reverb amount mixing the wet and dry lines with an equal-power cross-fade
Parameters
Name Type Description valuenumber Reverb (wet) amount (normalized to 0.0 > 1.0)
Details
-
updatePitchBend()
-
Description
Apply the current Pitch Bend amount (from the controller) to every already active synth voices
Details
-
tryCreateConvolver() → {ConvolverNode}
-
Description
Try to create a convolver node
Returns
Throws
Details
-
handleIrFile( changeEvent )
-
Description
Manage the event when the user is trying to load a IR Reverb file
Parameters
Name Type Description changeEventEvent DOM change event on 'input' element (reverb file uploader)
Details
-
readIrFile( file )
-
Description
Initialize the reading process of the IR Reverb file
Parameters
Name Type Description fileFile The file to be read
Details
-
loadIrFile( data, fileName )
-
Description
Load the IR Reverb wav file on the convolver
Parameters
Name Type Description dataArrayBuffer The raw binary data of the file
fileNamestring The filename
Details
-
<static> base64ToBlob( file ) → {Blob}
-
Description
Convert Base64 data held in a string into raw binary blob
Parameters
Name Type Description fileObject A File-like object
Name Type Description nameObject Filename
dataObject Data content in Base64
Returns
Details
-
synthState( clickEvent )
-
Description
Manage the event when the user clicks on the the status of the synth Power ON/OFF checkbox.
Can be used as a sort of PANIC button for stuck synth Voices by the user.Parameters
Name Type Description clickEventEvent Click HTML event on 'input' element (synth checkbox)
Details
-
_initUI()
-
Description
Initialize the Synth UI controllers
Details