Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function playNote(note: any, velocity?: number = VELOCITY): void {
console.log(note)
if (Array.isArray(note)) {
// play chord
app.currentChord = note
MIDI.chordOn(CHANNEL, note, velocity, DELAY)
if (AUTO_CLICK_BASE) {
MIDI.noteOn(CHANNEL, note[0] - 2 * 12, LEFT_HAND_VELOCITY, DELAY)
app.currentNote = note[0] - 2 * 12
}
} else {
app.currentNote = note
MIDI.noteOn(CHANNEL, note, velocity, DELAY)
}
}
function playNote(note: any, velocity?: number = VELOCITY): void {
console.log(note)
if (Array.isArray(note)) {
// play chord
app.currentChord = note
MIDI.chordOn(CHANNEL, note, velocity, DELAY)
if (AUTO_CLICK_BASE) {
MIDI.noteOn(CHANNEL, note[0] - 2 * 12, LEFT_HAND_VELOCITY, DELAY)
app.currentNote = note[0] - 2 * 12
}
} else {
app.currentNote = note
MIDI.noteOn(CHANNEL, note, velocity, DELAY)
}
}