Crate mseq_core

Crate mseq_core 

Source
Expand description

§mseq_core

Core framework for building custom MIDI sequencers.

mseq_core provides the foundational traits and utilities needed to implement your own MIDI sequencer, with a focus on portability and modularity.

This crate is built with #![no_std], making it suitable for embedded platforms as well as standard operating systems.

§Getting Started

To create a custom sequencer, you typically:

  • Implement the Conductor trait to define your sequencer’s control logic.
  • Define one or more tracks by either:
    • Implementing the Track trait for custom behavior.
    • Instantiating DeteTrack for deterministic, looping patterns.

§Platform Support

  • For OS-based systems, use the mseq crate — a reference implementation of mseq_core for standard platforms.
  • For embedded development (e.g., STM32F4), see the mseq_embedded repository, which provides an STM32-specific integration of mseq_core.

§Crate Features

  • No std dependency (#![no_std] compatible).
  • Modular and extensible design.
  • Reusable across multiple platforms.

Structs§

Context
An object of type Context is passed to the user’s Conductor at each clock tick via the Conductor::update method. It provides a high-level interface to send system MIDI messages and modify system parameters.
DeteTrack
A deterministic track implementation.
MidiController
Provides a reusable MIDI interface and core logic across different platforms.
MidiNote
Note that can be sent through a MIDI message.

Enums§

Instruction
Represents instructions that can be interpreted and processed by the MidiController.
MidiMessage
Represents a parsed MIDI instruction.
Note
Represents 1 note of the chromatic scale.

Traits§

Conductor
Entry point for user-defined sequencer behavior.
MidiOut
This trait is not intended to be implemented by user code.
Track
Abstraction for a sequencer track.

Functions§

param_value
Performs a linear conversion from [0.0, 1.0] to [0, 127]. If v is smaller than 0.0 return 0. If v is greater than 1.0 return 127. The main purpose of this function is to be used with MIDI control changes (CC).

Type Aliases§

InputQueue
Inputs queue to process.