Constructor
new Metronome(optionsopt)
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{} | Default options Properties
|
- Source:
Example
import * as audio from 'waves-audio';
const scheduler = audio.getScheduler();
const metronome = new audio.Metronome({period: 0.333});
scheduler.add(metronome);
Extends
Members
clickAttack :Number
Metronome click attack time
Type:
- Number
- Source:
clickFreq :Number
Metronome click frequency
Type:
- Number
- Source:
clickRelease :Number
Metronome click release time
Type:
- Number
- Source:
gain :Number
linear gain factor
Type:
- Number
- Source:
period :Number
metronome period
Type:
- Number
- Source:
phase :Number
Set phase parameter (available only when 'transported'), should be between [0, 1[
Type:
- Number
- Source:
Methods
connect(target)
Connect to an audio node (e.g. audioContext.destination)
Parameters:
Name | Type | Description |
---|---|---|
target |
AudioNode | Target audio node |
- Inherited From:
- Source:
disconnect(target)
Disconnect from an audio node (e.g. audioContext.destination). If undefined disconnect from all target nodes.
Parameters:
Name | Type | Description |
---|---|---|
target |
AudioNode | Target audio node. |
- Inherited From:
- Source:
trigger(time)
Trigger metronome click
Parameters:
Name | Type | Description |
---|---|---|
time |
Number | metronome click synthesis audio time |
- Source: