@audiotool/nexus - v0.0.17
    Preparing search index...

    Type Alias SampleUploadOptions

    Options for uploading a sample.

    type SampleUploadOptions = {
        bpm?: number;
        description?: string;
        displayName: string;
        file: File | Blob | ArrayBuffer;
        kind?: SampleKind;
        preventTabClose?: boolean;
        tags?: string[];
        visibility?: SampleVisibility;
    }
    Index

    Properties

    bpm?: number

    Beats per minute. Set to 0 or omit for samples without a tempo.

    0
    
    description?: string

    Optional description of the sample.

    ""
    
    displayName: string

    Human-readable name displayed in the UI. This is the only required field.

    The audio file to upload. Accepts:

    • File - from file input or drag-and-drop
    • Blob - raw binary data with MIME type
    • ArrayBuffer - raw bytes (will be sent as application/octet-stream)

    Supported formats: MP3, WAV, FLAC, OGG

    kind?: SampleKind

    Whether this is a one-shot sound or a looping pattern.

    "one-shot"
    
    preventTabClose?: boolean

    If true, prompts the user with a confirmation dialog when they try to close the tab while the upload is in progress. Only works in browsers.

    false
    
    tags?: string[]

    Tags for categorization and search. Must have at least one tag.

    ["sample"]
    
    visibility?: SampleVisibility

    Visibility setting for the sample.

    "unlisted"