MIDI#

namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace MIDI#

MIDI file playback and external device I/O.

MIDI::file plays back standard MIDI files; midiOut (Windows / Linux only) sends messages to a MIDI port. The MIDI::midiMessage / midiNote types wrap raw byte sequences.

class file#

Standard MIDI file playback.

Load a .mid file with create, then control playback with play / pause / stop.

Public Functions

file()#
~file()#
bool create(const std::string &fileName)#

Load a standard MIDI file.

Returns:

true on success.

void play()#

Start or resume playback.

void pause()#

Pause playback.

Resume with play.

void stop()#

Stop playback and rewind to the start.

Private Members

fileImpl *pimpl#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace MIDI

MIDI file playback and external device I/O.

MIDI::file plays back standard MIDI files; midiOut (Windows / Linux only) sends messages to a MIDI port. The MIDI::midiMessage / midiNote types wrap raw byte sequences.

class midiMessage#

Base class for MIDI messages.

Stores the raw MIDI byte sequence. Subclassed by midiNote and other message types; the raw bytes can be inspected through getRaw.

Subclassed by YSE::MIDI::midiNote

Public Functions

inline const std::vector<unsigned char> *getRaw() const#

Pointer to the raw MIDI byte sequence backing this message.

Protected Attributes

std::vector<unsigned char> raw#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace MIDI

MIDI file playback and external device I/O.

MIDI::file plays back standard MIDI files; midiOut (Windows / Linux only) sends messages to a MIDI port. The MIDI::midiMessage / midiNote types wrap raw byte sequences.

class midiNote : public YSE::MIDI::midiMessage#

A MIDI note-on/note-off message.

Convenience wrapper around the raw byte sequence — exposes the note number and velocity as named fields.

Public Functions

midiNote(unsigned char note, unsigned velocity)#

Construct a note message.

Parameters:
  • note – MIDI note number (0-127).

  • velocity – Velocity (0-127).

void note(unsigned char note)#

Set the MIDI note number.

unsigned char note() const#

Current MIDI note number.

void velocity(unsigned char velocity)#

Set the velocity.

unsigned char velocity() const#

Current velocity.