Giter Site home page Giter Site logo

Comments (1)

newlandsvalley avatar newlandsvalley commented on June 11, 2024

Hi, @f-f . I'd not come across node-midi before and nor had I heard of RtMidi on which it's based. My parser is based on General MIDI 1.0. I find this spec rather verbose and awkward to work with, but the main point is that it is biased towards entire MIDI recordings. Specifically, the whole melody is captured in the eventual file structure and individual MIDI messages such as NoteOn are timestamped, which allows a player to emit them at the appropriate time.

From a brief reading of the rtMidi Tutorial it seems that the real-time nature means that messages are issued immediately with no need for a timestamp. Also, General MIDI allows up to 10 channels to be in use concurrently, whereas I'm guessing, with rtMidi you choose a default channel (is this an rtMidi Port?). Anyway, where it defines a NoteOn as [144, 89, 127] (i.e. [MessageType, Note, Velocity] I use NoteOn Channel Note Velocity. I presume the other messages which I enumerate in the Event type do something similar.

Whether all this might be ergonomic for you to reuse is difficult to say. Many of the data types would not be useful to you but Event might help. The parser itself I imagine would be useful if you had a need to parse a MIDI recording or a Web-Midi event stream and then generate rtMidi output.

Another consideration may be that purescript-midi was written before the advent of MIDI 2.0.

It may be possible to use parseMidiEvent to parse individual messages if you don't mind building the Event type as it stands. It would be an interesting experiment to see if this works,

from purescript-midi.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.