Guides for developers
GitHub repositoryHomepage
  • Getting started
  • Core
    • Glossary
    • The structure of the LMMS core
      • Initializations and cleanups
        • For core
      • Accessing to core classes
    • The structure of an LMMS project
    • Tracks and track containers
      • Tracks and clips
      • Track containers
    • The pattern system
    • Play handles
      • NotePlayHandle
      • InstrumentPlayHandle
      • SamplePlayHandle
    • Instruments
      • The type of instruments
      • Processing in instruments
        • Per-note processing
    • Audio effects
    • Automation and controllers
      • Automation
        • Processing automation
      • Controllers
    • Controlling playback
    • The audio rendering engine of LMMS
      • Stage 1: collect play handles and process automation
      • Stage 2: render notes and instruments
      • Step 3: mix and master
    • Threading and synchronization
    • Data serialization
      • Overview
      • Relevant classes
      • Upgrading data files
    • Internal routing of events and signals
      • Audio signals
      • MIDI events
    • Audio and MIDI I/O
      • Supported backends and features
  • GUI
    • The initialization process of LMMS GUI
    • UI components of LMMS
  • Build system
    • CMake and LMMS
    • Source directory structure
    • Useful variables/macros
  • Plugin system
    • Plugin types
    • Plugin API
      • Sub-plugin API
    • Loading plugins from LMMS
  • Unit tests
    • Writing unit tests
Powered by GitBook
On this page

Was this helpful?

  1. Core
  2. Instruments

The type of instruments

Instrument::Flag defines some properties of instruments.

	enum Flag
	{
		NoFlags = 0x00,
		IsSingleStreamed = 0x01,	/*! Instrument provides a single audio stream for all notes */
		IsMidiBased = 0x02,			/*! Instrument is controlled by MIDI events rather than NotePlayHandles */
		IsNotBendable = 0x04,		/*! Instrument can't react to pitch bend changes */
	};

Here are some explanations:

Single-streamed vs. Multiple-streamed

An instrument in LMMS is called single-streamed if it renders and returns audio from all notes at once, not for each note. Conversely, a multiple-streamed instrument renders audio for each note and returns the output from every notes separately.

In other words, an instrument is multiple-streamed if and only if LMMS(not the instrument plugin) can control and access the rendered result of individual notes.

Some per-note features such as built-in polyphonic envelopes, LFOs, and filters are only available in multiple-streamed instruments.

MIDI-based vs. Non-MIDI-based

MIDI-based instruments process notes only using MIDI events, while others use NotePlayHandles for it. For example, VST instruments(and LV2 in the future) are MIDI-based.

All MIDI-based instruments must be single-streamed in the current implementation

PreviousInstrumentsNextProcessing in instruments

Last updated 5 years ago

Was this helpful?