Hiyve Components - v1.0.0
    Preparing search index...

    Options for useTakeRecorder.

    interface UseTakeRecorderOptions {
        alignTake?: boolean;
        audioDeviceId?: string;
        captureMidi?: boolean;
        maxDurationMs?: number;
        midiInputId?: string;
        notes?: string;
        onAudioChunk?: (chunk: AudioChunk) => void;
        onError?: (error: Error) => void;
        onMidiEvent?: (event: MidiEvent) => void;
        onRecordingStarted?: (take: TakeClockHandle) => void;
        onTakeCompleted?: (bundle: TakeBundle) => void;
        profile?: AudioProfile;
        score?: TakeScoreReference;
    }
    Index

    Properties

    alignTake?: boolean

    Measure the MIDI-to-audio offset from the take's own notes and store it as take.alignment (default: true). Skipped when no MIDI was recorded.

    audioDeviceId?: string

    Microphone to use; omit for the browser's default

    captureMidi?: boolean

    Record MIDI as well as audio when the browser supports it (default: true)

    maxDurationMs?: number

    Stop the take on its own once it has run this long, as though stop() had been called (default: no limit). A take holds every sample it has captured until it ends — about 11 MB a minute for one channel at 48 kHz, and as much again to build the take — so one left running fills memory until the browser refuses it.

    midiInputId?: string

    Record from this MIDI input only; omit to record from every connected input

    notes?: string

    Free-text notes stored with the take, e.g. which mistakes were intentional

    onAudioChunk?: (chunk: AudioChunk) => void

    Called with every captured audio chunk as it arrives, for live analysis (see useLivePerformance)

    onError?: (error: Error) => void

    Called for microphone, MIDI, and audio-context failures

    onMidiEvent?: (event: MidiEvent) => void

    Called with every MIDI event as it arrives, for live analysis

    onRecordingStarted?: (take: TakeClockHandle) => void

    Called once capture is running, with the take's clock

    onTakeCompleted?: (bundle: TakeBundle) => void

    Called with the finished take after stop()

    profile?: AudioProfile

    How the microphone is opened (default: 'instrument' — unprocessed audio)

    The score the take is performed against, stored with the take