Type alias Mage

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>)
      • (sourceUrls): Promise<Source>
      • Parameters

        • sourceUrls: string[]

        Returns Promise<Source>

  • createSequence: ((scale) => ((pattern, duration?, volume?, ignoreMarks?) => Steps))
      • (scale): ((pattern, duration?, volume?, ignoreMarks?) => Steps)
      • Parameters

        • scale: number[]

        Returns ((pattern, duration?, volume?, ignoreMarks?) => Steps)

          • (pattern, duration?, volume?, ignoreMarks?): Steps
          • Parameters

            • pattern: string
            • Optional duration: number
            • Optional volume: number
            • Optional ignoreMarks: boolean

            Returns Steps

  • createSynth: ((oscillators?) => Source)
      • (oscillators?): Source
      • Parameters

        • Optional oscillators: {
              detune: number;
              semitone: number;
              type: OscillatorType;
          }[]

        Returns Source

  • getRandomInt: ((min, max) => number)
      • (min, max): number
      • Parameters

        • min: number
        • max: number

        Returns number

  • getTiming: (() => Pick<Timing, "cycles" | "beats">)
      • (): Pick<Timing, "cycles" | "beats">
      • Returns Pick<Timing, "cycles" | "beats">

  • spells: Map<string, Spell>
  • start: (() => void)
      • (): void
      • Returns void

  • stop: (() => void)
      • (): void
      • Returns void

  • suppress: ((name) => void)
      • (name): void
      • Parameters

        • name: string

        Returns void

  • tempo: number
  • useMetronome: ((enabled) => void)
      • (enabled): void
      • Parameters

        • enabled: boolean

        Returns void

Generated using TypeDoc