Mage: { analyser: AnalyserNode; audioContext: AudioContext; beatCount: number; beatLength: number; beatsPerCycle: number; cast: ((name,
props) => void); createSampler: ((sourceUrls) => Promise<Source>); createSequence: ((scale) => ((pattern,
duration?,
volume?,
ignoreMarks?) => Steps)); createSynth: ((oscillators?) => Source); getRandomInt: ((min,
max) => number); getTiming: (() => Pick<Timing, "cycles" | "beats">); spells: Map<string, Spell>; start: (() => void); stop: (() => void); suppress: ((name) => void); tempo: number; useMetronome: ((enabled) => void); }
Type declaration
-
analyser: AnalyserNode
-
audioContext: AudioContext
-
beatCount: number
-
beatLength: number
-
beatsPerCycle: number
-
cast: ((name, props) => void)
-
- (name, props): void
-
Parameters
-
name: string
-
props: {
duration: number;
sequence: Sequence;
sound: Sound;
} | null
Returns void
-
createSampler: ((sourceUrls) => Promise<Source>)
-
createSequence: ((scale) => ((pattern, duration?, volume?, ignoreMarks?) => Steps))
-
- (scale): ((pattern, duration?, volume?, ignoreMarks?) => Steps)
-
Returns ((pattern, duration?, volume?, ignoreMarks?) => Steps)
-
- (pattern, duration?, volume?, ignoreMarks?): Steps
-
Parameters
-
pattern: string
-
Optional
duration: number
-
Optional
volume: number
-
Optional
ignoreMarks: boolean
-
createSynth: ((oscillators?) => Source)
-
- (oscillators?): Source
-
Parameters
-
Optional
oscillators: {
detune: number;
semitone: number;
type: OscillatorType;
}[]
-
getRandomInt: ((min, max) => number)
-
- (min, max): number
-
Returns number
-
getTiming: (() => Pick<Timing, "cycles" | "beats">)
-
- (): Pick<Timing, "cycles" | "beats">
-
Returns Pick<Timing, "cycles" | "beats">
-
spells: Map<string, Spell>
-
start: (() => void)
-
stop: (() => void)
-
suppress: ((name) => void)
-
- (name): void
-
Returns void
-
tempo: number
-
useMetronome: ((enabled) => void)
-
- (enabled): void
-
Returns void