Skip to content

Version 2 Design

Raphaël Doursenaud edited this page Jan 17, 2024 · 20 revisions

WORK IN PROGRESS

Please comment in the dedicated discussion.

Feel free to ping me (@rdoursenaud) if you want access to the source xmind files showcased below.

Goals

  • MIDI 2.0 ready

    Not necessarily a full implementation. At the very least objects & interfaces designed to be compatible with both MIDI versions.

  • Specifications compliant:

    • Structure
    • Concepts
    • Names
  • Cleaner API

    • Immutable objects (Message…) when received from port(s) or read from file.
    • PEP 484 type hints
    • PEP 544 Protocol interfaces to make creating your own objects a breeze.
  • New objects:

    • Direct instanciation
    mido.NoteOn(60)

    instead of

    mido.Message('note_on', note=60)
    • Convenience objects with human readable status

      # Initialization
      note = mido.Note("C4")  # <=> note = 60
      velocity = mido.Velocity("fff")  # <=> velocity = 127
      # assume port is initialized elsewhere
      # Send
      msg1 = mido.NoteOn(note, velocity)
      port.send(msg1)
      sleep(1)
      msg2 = mido.NoteOff(note)
      port.send(msg2)
  • Object oriented interactions:

    using the same initialization as above

    mido.NoteOn(note, velocity).send(port)
    sleep(1)
    mido.NoteOff(note).send(port)
  • Sensible and customizable defaults

    • Port(s) configuration (filters like SysEx, active sensing…)
    • Velocity
  • More decoders

  • Better Standard MIDI file (SMF) support including all extensions (Lyric, Device & Program, Language & Display…)

  • Maybe:

    • Native modern ports:
      • ALSA rawmidi
      • Microsoft WinRT MIDI 1.0
      • Apple CoreMidi
      • TCP/IP (Socket & RTP MIDI)
      • UART (Serial)
    • New protocols (MIDI 2.0):
      • Unified MIDI Packets (UMP)
      • MIDI Capability Inquiry (MIDI-CI)
    • New file formats:
      • Downloadable Sounds (DLS)
      • eXtended Music Format (XMF)
      • MIDI 2.0:
        • MIDI Clip File
        • MIDI Container File
  • Your suggestion here!

Architecture

Study

Version 1.x design study including preliminary work on version 2 under the future tag: MIDO architecture & the MIDI stack For a better view: Right-click > Open in a new tab (Updated: 2023-08-25)

API

TODO

  • 1.x compatibility layer

Preliminary design

MIDI For a better view: Right-click > Open in a new tab (Updated: 2023-08-25)

Other Upcoming Changes

See https://github.com/mido/mido/milestone/3

Clone this wiki locally