ableton-mcp-server-rag
Version:
Ableton Live MCP depend on Ableton JS
143 lines (142 loc) • 5.9 kB
TypeScript
import { RawTrack, Track } from 'ableton-js/ns/track.js';
import { ClipGettableProp, ClipSettableProp, DeviceGettableProperties, SongSettableProp, SongViewGettableProps, SongViewSettableProp, TrackGettableProps, TrackSettableProp } from '../types/zod-types.js';
import { z } from 'zod';
import { Clip, RawClip } from 'ableton-js/ns/clip.js';
import { Song } from 'ableton-js/ns/song.js';
import { Namespace } from 'ableton-js/ns/index.js';
import { DeviceParameter, RawDeviceParameter } from 'ableton-js/ns/device-parameter.js';
import { Device, RawDevice } from 'ableton-js/ns/device.js';
import { MixerDevice } from 'ableton-js/ns/mixer-device.js';
import { Scene } from 'ableton-js/ns/scene.js';
import { ClipSlot } from 'ableton-js/ns/clip-slot.js';
import { RawBrowserItem, BrowserItem } from 'ableton-js/ns/browser-item.js';
import { Note, NoteExtended } from 'ableton-js/util/note.js';
import { Application } from 'ableton-js/ns/application.js';
export declare function modifyObjProps<T extends Namespace<any, any, SP, any>, SP>(obj: T, property: Partial<SP>, zodSchema: z.ZodObject<z.ZodRawShape, 'strip', z.ZodTypeAny, any, any>): Promise<PromiseSettledResult<any>[]>;
export declare function getObjProps<T extends Namespace<any, any, any, any>, S extends z.ZodObject<z.ZodRawShape, 'strip', z.ZodTypeAny, any, any>>(obj: T, scheme: S | Record<string, boolean>): Promise<z.infer<S>>;
/**
* modify track property
*/
export declare function modifyTrackProp(track: Track, property: z.infer<typeof TrackSettableProp>): Promise<PromiseSettledResult<any>[]>;
export declare function batchModifyTrackProp(tracks: {
track_id: string;
property: z.infer<typeof TrackSettableProp>;
}[]): Promise<void>;
export declare function getTrackProps(track: Track, scheme: z.infer<typeof TrackGettableProps>): Promise<any>;
/**
* modify clip property
*/
export declare function modifyClipProp(clip: Clip, property: z.infer<typeof ClipSettableProp>): Promise<PromiseSettledResult<any>[]>;
export declare function batchModifyClipProp(clips: {
clip_id: string;
property: z.infer<typeof ClipSettableProp>;
}[]): Promise<void>;
export declare function getClipProps(clip: Clip, scheme: z.infer<typeof ClipGettableProp>): Promise<any>;
/**
* get song property
*/
export declare function getSongProperties(song: Song, scheme: Record<string, boolean> | z.ZodObject<z.ZodRawShape, 'strip', z.ZodTypeAny, any, any>): Promise<any>;
export declare function getSongViewProps(song: Song, scheme: z.infer<typeof SongViewGettableProps>): Promise<any>;
export declare function getDeviceParamterProps(parameter: DeviceParameter): Promise<{
id: string;
}>;
/**
* get device propertys
*/
export declare function getDeviceProps(device: Device, schema: z.infer<typeof DeviceGettableProperties>): Promise<any>;
/**
* modify song propertys
*/
export declare function modifySongProp(song: Song, property: z.infer<typeof SongSettableProp>): Promise<PromiseSettledResult<any>[]>;
/**
* modify song view propertys
*/
export declare function modifySongViewProp(song: Song, property: z.infer<typeof SongViewSettableProp>): Promise<PromiseSettledResult<any>[]>;
export declare function modifyDeviceParameterVal(parameter: DeviceParameter, value: any): Promise<void>;
export declare function getMixerDeviceProps(device: MixerDevice): Promise<{
[x: string]: any;
}>;
export declare function getSceneProps(scene: Scene): Promise<{
[x: string]: any;
}>;
export declare function getClipSlotProps(clipSlot: ClipSlot): Promise<{
[x: string]: any;
}>;
/**
* Get raw Track object
* @param trackId Track ID
* @returns Raw Track object
*/
export declare function getRawTrackById(trackId: string): RawTrack;
/**
* Get Track object
* @param trackId Track ID
* @returns Track object
*/
export declare function getTrackById(trackId: string): Track;
/**
* Get raw Clip object
* @param clipId Clip ID
* @returns Raw Clip object
*/
export declare function getRawClipById(clipId: string): RawClip;
/**
* Get Clip object
* @param clipId Clip ID
* @returns Clip object
*/
export declare function getClipById(clipId: string): Clip;
/**
* Get raw browser item object
* @param id Item ID
* @returns Raw browser item object
*/
export declare function getRawBrowserItemById(id: string): RawBrowserItem;
/**
* Get browser item object
* @param id Item ID
* @returns Browser item object
*/
export declare function getBrowserItemById(id: string): BrowserItem;
/**
* Get raw device object
* @param id Device ID
* @returns Raw device object
*/
export declare function getRawDeviceById(id: string): RawDevice;
/**
* Get raw device parameter object
* @param id Parameter ID
* @returns Raw device parameter object
*/
export declare function getRawDeviceParameterById(id: string): RawDeviceParameter;
/**
* Get device parameter object
* @param id Parameter ID
* @returns Device parameter object
*/
export declare function getDeviceParameterById(id: string): DeviceParameter;
/**
* Get device object
* @param id Device ID
* @returns Device object
*/
export declare function getDeviceById(id: string): Device;
/**
* Check if a note is an extended note
* @param note Note object
* @returns Returns true if it's an extended note, false otherwise
*/
export declare function isNoteExtended(note: Note | NoteExtended): boolean;
/**
* Convert a NoteExtended object to a Note object
* @param note NoteExtended object
* @returns Note object
*/
export declare function NoteExtendedToNote(note: NoteExtended): Note;
export declare function NoteToNoteExtended(note: Note): NoteExtended;
export declare function isNoteExtendedArray(notes: (Note | NoteExtended)[]): notes is NoteExtended[];
/**
* get application properties
*/
export declare function getAppProperties(application: Application, scheme: Record<string, boolean> | z.ZodObject<z.ZodRawShape, 'strip', z.ZodTypeAny, any, any>): Promise<any>;