LMMS
Loading...
Searching...
No Matches
_LV2_Programs_Interface Struct Reference

#include <lv2_programs.h>

Public Attributes

const LV2_Program_Descriptor *(* get_program )(LV2_Handle handle, uint32_t index)
void(* select_program )(LV2_Handle handle, uint32_t bank, uint32_t program)

Detailed Description

Programs extension, plugin data.

When the plugin's extension_data is called with argument LV2_PROGRAMS__Interface, the plugin MUST return an LV2_Programs_Instance structure, which remains valid for the lifetime of the plugin.

Member Data Documentation

◆ get_program

const LV2_Program_Descriptor *(* _LV2_Programs_Interface::get_program) (LV2_Handle handle, uint32_t index)

get_program()

This member is a function pointer that provides a description of a program (named preset sound) available on this plugin.

The index argument is an index into the plugin's list of programs, not a program number as represented by the Program field of the LV2_Program_Descriptor. (This distinction is needed to support plugins that use non-contiguous program or bank numbers.)

This function returns a LV2_Program_Descriptor pointer that is guaranteed to be valid only until the next call to get_program or deactivate, on the same plugin instance. This function must return NULL if passed an index argument out of range, so that the host can use it to query the number of programs as well as their properties.

◆ select_program

void(* _LV2_Programs_Interface::select_program) (LV2_Handle handle, uint32_t bank, uint32_t program)

select_program()

This member is a function pointer that selects a new program for this plugin. The program change should take effect immediately at the start of the next run() call. (This means that a host providing the capability of changing programs between any two notes on a track must vary the block size so as to place the program change at the right place. A host that wanted to avoid this would probably just instantiate a plugin for each program.)

Plugins should ignore a select_program() call with an invalid bank or program.

A plugin is not required to select any particular default program on activate(): it's the host's duty to set a program explicitly.

A plugin is permitted to re-write the values of its input control ports when select_program is called. The host should re-read the input control port values and update its own records appropriately. (This is the only circumstance in which a LV2 plugin is allowed to modify its own control-input ports.)


The documentation for this struct was generated from the following file: