diff options
author | Devine Lu Linvega <[email protected]> | 2018-11-16 19:41:26 +1200 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2018-11-16 19:41:26 +1200 |
commit | ac96842164dd13fb90c5775de46bd318e0af23f7 (patch) | |
tree | a60439cb22a82c0675aaa61067aed31c9e3a4d33 | |
parent | d85536e72331ef064dffc71a078b674323cb14a5 (diff) | |
download | Orca-ac96842164dd13fb90c5775de46bd318e0af23f7.tar.gz Orca-ac96842164dd13fb90c5775de46bd318e0af23f7.zip |
Removed last traces of QQQ
-rw-r--r-- | desktop/core/lib/_midi.js | 2 | ||||
-rw-r--r-- | desktop/sources/scripts/midi.js (renamed from desktop/sources/scripts/qqq.js) | 17 | ||||
-rw-r--r-- | desktop/sources/scripts/terminal.js | 12 |
3 files changed, 15 insertions, 16 deletions
diff --git a/desktop/core/lib/_midi.js b/desktop/core/lib/_midi.js index 1c5e1ce..17f23f9 100644 --- a/desktop/core/lib/_midi.js +++ b/desktop/core/lib/_midi.js @@ -34,7 +34,7 @@ function FnMidi (pico, x, y, passive) { const octave = clamp(octaveValue, 3, 8) const note = this.convert(noteValue) - terminal.qqq.send(channel, octave, note, 127) + terminal.midi.send(channel, octave, note, 127) } this.convert = function (ch) { diff --git a/desktop/sources/scripts/qqq.js b/desktop/sources/scripts/midi.js index 8298712..d846613 100644 --- a/desktop/sources/scripts/qqq.js +++ b/desktop/sources/scripts/midi.js @@ -1,8 +1,7 @@ 'use strict' -function QQQ (terminal) { +function Midi (terminal) { this.terminal = terminal - this.midi = false this.outputs = [] this.stack = [] @@ -34,9 +33,9 @@ function QQQ (terminal) { this.midiActive = function (midiAccess) { const iter = midiAccess.outputs.values() for (let i = iter.next(); i && !i.done; i = iter.next()) { - terminal.qqq.outputs.push(i.value) + terminal.midi.outputs.push(i.value) } - terminal.log(`Midi is active, devices: ${terminal.qqq.outputs.length}`) + terminal.log(`Midi is active, devices: ${terminal.midi.outputs.length}`) } this.midiInactive = function (err) { @@ -53,13 +52,13 @@ function QQQ (terminal) { } this.ch1 = function () { - terminal.qqq.outputs[0].send([0x90, 60, 127]) - terminal.qqq.outputs[0].send([0x80, 60, 127], window.performance.now() + 250.0) + terminal.midi.outputs[0].send([0x90, 60, 127]) + terminal.midi.outputs[0].send([0x80, 60, 127], window.performance.now() + 250.0) } this.ch3 = function () { - terminal.qqq.outputs[0].send([0x92, 60, 127]) - terminal.qqq.outputs[0].send([0x82, 60, 127], window.performance.now() + 250.0) + terminal.midi.outputs[0].send([0x92, 60, 127]) + terminal.midi.outputs[0].send([0x82, 60, 127], window.performance.now() + 250.0) } this.vu = function () { @@ -73,4 +72,4 @@ function QQQ (terminal) { } } -module.exports = QQQ +module.exports = Midi diff --git a/desktop/sources/scripts/terminal.js b/desktop/sources/scripts/terminal.js index 00cfbdb..4bd226a 100644 --- a/desktop/sources/scripts/terminal.js +++ b/desktop/sources/scripts/terminal.js @@ -3,9 +3,9 @@ function Terminal (pico) { const Cursor = require('./cursor') const Source = require('./source') - const QQQ = require('./qqq') + const Midi = require('./midi') - this.qqq = new QQQ(this) + this.midi = new Midi(this) this.cursor = new Cursor(this) this.source = new Source(pico, this) @@ -32,7 +32,7 @@ function Terminal (pico) { this.pico.terminal = this this.pico.start() this.theme.start() - this.qqq.start() + this.midi.start() this.update() this.setSpeed(120) @@ -41,11 +41,11 @@ function Terminal (pico) { this.run = function () { if (this.isPaused) { return } - this.qqq.clear() + this.midi.clear() this.clear() this.pico.run() - this.qqq.run() + this.midi.run() this.update() } @@ -160,7 +160,7 @@ function Terminal (pico) { this.write(`${this.cursor.inspect()}`.substr(0, col), col * 0, 0) this.write(`${this.cursor._mode()}`, col * 1, 0) this.write(`${this.bpm}`, col * 2, 0) - this.write(this.qqq.vu(), col * 3, 0) + this.write(this.midi.vu(), col * 3, 0) } this.write = function (text, offsetX, offsetY) { |