From ed58816e2badbc960c9912777c7af55099eb3864 Mon Sep 17 00:00:00 2001 From: chee Date: Mon, 24 Feb 2020 18:09:06 +0000 Subject: [PATCH] Fix discovery pair --- op1.control.ts | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/op1.control.ts b/op1.control.ts index 00b3219..549330c 100644 --- a/op1.control.ts +++ b/op1.control.ts @@ -326,6 +326,24 @@ class OperatorOne { } } } + + if (mode == Mode.Perform) { + let encouragement = [ + "beep boop", + "and now,", + "make music", + "operate", + "modulate me", + "beepboop", + "fantasy", + "limitations: bigfeature", + "pulse // wave", + "play" + ] + + this.print(encouragement.random()) + } + this._mode = mode } @@ -360,8 +378,8 @@ host.defineController( ) host.defineMidiPorts(1, 1) host.addDeviceNameBasedDiscoveryPair( - ["OP-1 Midi Device"], - ["OP-1 Midi Device"] + ["OP-1 Midi Device MIDI 1"], + ["OP-1 Midi Device MIDI 1"] ) let keyboard: NoteInput @@ -379,7 +397,7 @@ function init() { op1 = new OperatorOne() - op1.print("hello") + op1.print("<3\rhappy birthday") transport = host.createTransport() // TODO: idea, have a key in perform mode for keyboard.noteLatch @@ -411,7 +429,7 @@ function setupObservers(op1) { position.addValueObserver(function (_: number) { let time = position.getFormatted() if (op1.mode == Mode.Arrange) { - op1.print(`song position\r${time}`) + op1.print(`\r${time}`) } }) } @@ -652,7 +670,6 @@ let arpeggiatorModes = [ "pinky-down", ] - declare interface Array { random(): T } @@ -664,14 +681,6 @@ Array.prototype.random = function () { function bindPerform(op1: OperatorOne) { keyboard.arpeggiator().isEnabled().markInterested() - op1.bind(Encoder.Blue, withEncoder(on => { - on.left(withShift(on => { - cursorTrack.playNote(128, 128) - })) - on.right(withShift(on => { - })) - })) - op1.bind(Key.Sequence, withKey(on => { on.up(withShift(on => { let arpMode = arpeggiatorModes.random()