// import * as Juce from "juce-framework-frontend";
// import reportWebVitals from "../reportWebVitals";

const MidNoteDataReceiver_eventId = "midNoteData";
export default class MidNoteDataReceiver {
  constructor() {
    this.notes = [];
    this.input_pitch = 0;
    this.output_pitch = 0;
    let self = this;
    this.midNoteDataRegistrationId = window.__JUCE__.backend.addEventListener(
      MidNoteDataReceiver_eventId,
      (event) => {
        self.notes = event.notes;
      }
    );
  }

  getNotes() {
    return this.notes;
  }

  unregister() {
    window.__JUCE__.backend.removeEventListener(this.midNoteDataRegistrationId);
  }
}
