Extends
Methods
group(group)
Assign effect to a library group.
Parameters:
Name | Type | Description |
---|---|---|
group |
string |
description(description)
Give the effect a description.
Parameters:
Name | Type | Description |
---|---|---|
description |
string |
author(author)
Denote the author of the effect, if applicable.
Parameters:
Name | Type | Description |
---|---|---|
author |
string |
url(url)
Set website of the effect, if applicable.
Parameters:
Name | Type | Description |
---|---|---|
url |
string |
documentationUrl(documentationUrl)
Set documentation URL.
Parameters:
Name | Type | Description |
---|---|---|
documentationUrl |
string |
options(options)
Options that should be passed to the builder function at runtime.
Parameters:
Name | Type | Description |
---|---|---|
options |
object |
defaultOptions(defaultOptions)
Default options passed to builder function at runtime; overridden by #options
.
Parameters:
Name | Type | Description |
---|---|---|
defaultOptions |
object |
fn(defaultOptions)
Set runtime builder function that returns an Web Audio Node.
Parameters:
Name | Type | Description |
---|---|---|
defaultOptions |
object |
at(measure, beat, subdivision) → {Proxy}
Select a position on the timeline by measure, beat and subdivision.
Positions begin from 0, meaning that "measure 1, beat 1" in spoken word implies "measure 0, beat 0" in Harmonicon.
Examples
Set tempo to 120 at the beginning of song:
session('my-song', ({ session }) => {
session.at(0).tempo(120);
})
Play a C# on beat 2 of measure 1:
track('my-song', ({ session }) => {
track.at(1, 2).play(quarter.note('C#'));
})
Trigger multiple actions at the same position:
track('my-song', ({ session }) => {
session.at(0)
.meter([ 4, 4 ])
.tempo(120)
.key('C')
})
Parameters:
Name | Type | Description |
---|---|---|
measure |
Number |
Measure number starting from zero |
beat |
Number |
Beat number starting from zero |
subdivision |
Number |
Subdivision (between 0 and 1) |
- Inherited From:
- Source: