import type { NobjcObject } from "objc-js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _AVAudioUnit } from "./AVAudioUnit.js";
import type { _AVMusicEvent } from "./AVMusicEvent.js";
import type { AVBeatRange } from "../structs/AVBeatRange.js";
export declare class _AVMusicTrack extends _NSObject {
    static alloc(): _AVMusicTrack;
    static new(): _AVMusicTrack;
    init(): _AVMusicTrack;
    /**
     * Adds an AVMusicEvent's contents to a track at the specified AVMusicTimeStamp. the event to be added the AVMusicTimeStamp Because event contents are copied into the track, the same event may be added multiple times at different timestamps. There are restrictions on which AVMusicEvent subclasses may be added to different tracks: - Only AVExtendedTempoEvents and AVMIDIMetaEvents with certain AVMIDIMetaEventTypes can be added to an AVMusicSequence's tempo track (see AVMIDIMetaEvent). - AVParameterEvents can only be added to automation tracks (see AVParameterEvent). - All other event subclasses cannot be added to tempo or automation tracks.
     */
    addEvent$atBeat$(event: _AVMusicEvent, beat: number): void;
    /**
     * Shift the beat location of all events in the given beat range by the amount specified. the range of beats. Must be a valid AVBeatRange. the amount in beats to shift each event. The amount may be positive or negative.
     */
    moveEventsInRange$byAmount$(range: AVBeatRange, beatAmount: number): void;
    /**
     * Removes all events in the given beat range, erasing that portion of the AVMusicTrack. the range of beats. Must be a valid AVBeatRange. All events outside of the specified range left unmodified.
     */
    clearEventsInRange$(range: AVBeatRange): void;
    /**
     * Removes all events in the given beat range, splicing out that portion of the AVMusicTrack. the range of beats. Must be a valid AVBeatRange. All events past the end of the specified range will be shifted backward by the duration of the range.
     */
    cutEventsInRange$(range: AVBeatRange): void;
    /**
     * Copies all events in the given beat range from the specified AVMusicTrack, splicing them into the current AVMusicTrack. the range of beats. Must be a valid AVBeatRange. the AVMusicTrack to copy the events from. the start beat at which the copied events should be spliced in. All events originally at or past insertStartBeat will be shifted forward by the duration of the copied-in range.
     */
    copyEventsInRange$fromTrack$insertAtBeat$(range: AVBeatRange, sourceTrack: _AVMusicTrack, insertStartBeat: number): void;
    /**
     * Copies all events in the given beat range from the specified AVMusicTrack, merging them into the current AVMusicTrack. the range of beats. Must be a valid AVBeatRange. the AVMusicTrack to copy the events from. the start beat at which the copied events should be merged. All events originally at or past mergeStartBeat will be left unmodified. Copying events from track to track follows the same type-exclusion rules as adding events: The operation will generate an exception.
     */
    copyAndMergeEventsInRange$fromTrack$mergeAtBeat$(range: AVBeatRange, sourceTrack: _AVMusicTrack, mergeStartBeat: number): void;
    /**
     * Iterates through the AVMusicEvents within the AVMusicTrack whose timestamps fit within the range, calling the block for each. the AVMusicEventEnumerationBlock to call for each event. Each event returned via the block should be examined using `NSObject(isKindOfClass:)` to determine its subclass and then cast and accessed/edited accordingly. The iteration may continue after removing an event. The event objects returned via the block will not be the same instances which were added to the AVMusicTrack, though their contents will be identical.
     */
    enumerateEventsInRange$usingBlock$(range: AVBeatRange, block: (arg0: _AVMusicEvent, arg1: NobjcObject, arg2: NobjcObject) => void): void;
    /**
     * The AVAudioUnit which will receive the track's events This is mutually exclusive with setting a destination MIDIEndpoint. The AU must already be attached to an audio engine, and the track must be part of the AVAudioSequencer associated with that engine. When playing, the track will send its events to that AVAudioUnit. The destination AU cannot be changed while the track's sequence is playing.
     */
    destinationAudioUnit(): _AVAudioUnit | null;
    setDestinationAudioUnit$(value: _AVAudioUnit | null): void;
    /**
     * @property destinationMIDIEndpoint @abstract Set the track's target to the specified MIDI endpoint @discussion This is mutually exclusive with setting a destination audio unit. Setting this will remove the track's reference to an AVAudioUnit destination. When played, the track will send its events to the MIDI Endpoint. See also MIDIDestinationCreate. The endpoint cannot be changed while the track's sequence is playing.
     */
    destinationMIDIEndpoint(): number;
    setDestinationMIDIEndpoint$(value: number): void;
    /**
     * The timestamp range in beats for the loop The loop is set by specifying its beat range.
     */
    loopRange(): AVBeatRange;
    setLoopRange$(value: AVBeatRange): void;
    /**
     * Determines whether or not the track is looped. If loopRange has not been set, the full track will be looped.
     */
    loopingEnabled(): boolean;
    setLoopingEnabled$(value: boolean): void;
    /**
     * The number of times that the track's loop will repeat If set to AVMusicTrackLoopCountForever, the track will loop forever. Otherwise, legal values start with 1.
     */
    numberOfLoops(): number;
    setNumberOfLoops$(value: number): void;
    /**
     * Offset the track's start time to the specified time in beats By default this value is zero.
     */
    offsetTime(): number;
    setOffsetTime$(value: number): void;
    /** Whether the track is muted */
    muted(): boolean;
    setMuted$(value: boolean): void;
    /** Whether the track is soloed */
    soloed(): boolean;
    setSoloed$(value: boolean): void;
    /**
     * The total duration of the track in beats This will return the beat of the last event in the track plus any additional time that may be needed for fading out of ending notes or round a loop point to musical bar, etc. If this has not been set by the user, the track length will always be adjusted to the end of the last active event in a track and is adjusted dynamically as events are added or removed. The property will return the maximum of the user-set track length, or the calculated length.
     */
    lengthInBeats(): number;
    setLengthInBeats$(value: number): void;
    /**
     * The total duration of the track in seconds This will return time of the last event in the track plus any additional time that may be needed for fading out of ending notes or round a loop point to musical bar, etc. If this has not been set by the user, the track length will always be adjusted to the end of the last active event in a track and is adjusted dynamically as events are added or removed. The property will return the maximum of the user-set track length, or the calculated length.
     */
    lengthInSeconds(): number;
    setLengthInSeconds$(value: number): void;
    /**
     * The time resolution value for the sequence, in ticks (pulses) per quarter note (PPQN) If a MIDI file was used to construct the containing sequence, the resolution will be what was in the file. If you want to keep a time resolution when writing a new file, you can retrieve this value and then specify it when calling -[AVAudioSequencer writeToFile:flags:withResolution]. It has no direct bearing on the rendering or notion of time of the sequence itself, just its representation in MIDI files. By default this is set to either 480 if the sequence was created manually, or a value based on what was in a MIDI file if the sequence was created from a MIDI file. This can only be retrieved from the tempo track.
     */
    timeResolution(): number;
    /**
     * Indicates whether the track is an automation track. If set to YES, this can be used to contain, parameter automation events, exclusively. Adding any other event types will generate exceptions. If a track already contains non-parameter events, setting this to YES will generate an exception.
     */
    usesAutomatedParameters(): boolean;
    setUsesAutomatedParameters$(value: boolean): void;
}
