Skip to content

Commit

Permalink
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions midi-script/Clip.py
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ def __init__(self, c_instance, socket):
def get_available_warp_modes(self, ns):
return list(ns.available_warp_modes)

def get_notes(self, ns):
return ns.get_notes()
def set_notes(self, ns, notes):
return ns.set_notes(tuple(notes))

def get_selected_notes(self, ns):
return ns.get_selected_notes()
def replace_selected_notes(self, ns, notes):
return ns.replace_selected_notes(tuple(notes))
8 changes: 5 additions & 3 deletions src/ns/clip.ts
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ export class Clip extends Namespace<
* Deselects all notes present in the clip.
*/
deselectAllNotes(): Promise<void> {
return this.sendCommand("deselectAllNotes");
return this.sendCommand("deselect_all_notes");
}

/**
@@ -258,7 +258,9 @@ export class Clip extends Namespace<
* Replaces selected notes with an array of new notes.
*/
replaceSelectedNotes(notes: Note[]) {
return this.sendCommand("replace_selected_notes", [notes.map(noteToTuple)]);
return this.sendCommand("replace_selected_notes", {
notes: notes.map(noteToTuple),
});
}

/**
@@ -308,7 +310,7 @@ export class Clip extends Namespace<
* Adds the given notes to the clip.
*/
setNotes(notes: Note[]): Promise<void> {
return this.sendCommand("set_notes", [notes.map(noteToTuple)]);
return this.sendCommand("set_notes", { notes: notes.map(noteToTuple) });
}

/**

0 comments on commit c25eb50

Please sign in to comment.