/*!
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//  Copyright (C) 2025 jeffy-g <hirotom1107@gmail.com>
//  Released under the MIT license
//  https://opensource.org/licenses/mit-license.php
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
/**
 * @file src/midi-clip.ts
 * @summary Common MIDI clip data type for Ableton Live and related tools.
 */
import type { NoteEvent, ControlChangeEvent } from "./midi-event.ts";
/**
 * MIDI clip data extracted from Ableton Live's MidiClip object.
 *
 * This type represents all essential information for a single MIDI clip,
 * including note events, control change events, and timing information.
 *
 * ```ts
 * import type { TMidiClipData } from "@jeffy-g/live-midi-types";
 * const data: TMidiClipData = ...;
 * ```
 */
export type TMidiClipData = {
  /**
   * Start position of the clip on the Live MidiTrack (in beats).
   */
  clipStartInBeats: number;
  /**
   * Length of the clip (in beats). Usually `CurrentEnd.Value - CurrentStart.Value`.
   */
  clipLength: number;
  /**
   * Time adjustment for tempo mapping (in beats).
   */
  adjustTimeOftempee: number;
  /**
   * List of known CC events in this clip.
   */
  knownCCEvents: number[];
  /**
   * Array of extracted note events.
   */
  notes: NoteEvent[];
  /**
   * Array of extracted control change events.
   */
  cc: ControlChangeEvent[];
};
