struct Voice

Instrument voice definition. More...

Full nameTSE3::Ins::Voice
Definition#include <Instrument.h>
Inheritsstd::pair (unknown) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

A Voice struct holds information about a voice - the bank and patch values. It is based on pair where the first in is the bank value and the second int is the patch value.

Bank values are defined to be (MSB<<7)+LSB.

The value -1 denotes a wildcard - it matches any bank/patch.

This is a value type.

 Voice (int bank, int patch)

Voice

Creates a Voice with the given bank and patch values.

Parameters:
bankNew bank value in the form (MSB<<7)+LSB
patchNew patch value

 Voice (int bankMSB, int bankLSB, int patch)

Voice

Creates a Voice with the given bank and patch values.

Parameters:
bankMSBBank select MSB
bankLSBBank select LSB
patchNew patch value

int  bank ()

bank

[const]

Returns the bank value in the form (bankMSB<<7)+bankLSB.

int  bankMSB ()

bankMSB

[const]

Returns the bank MSB value.

int  bankLSB ()

bankLSB

[const]

Returns the bank LSB value.

int  patch ()

patch

[const]

Returns the patch value.

int  operator < (const Voice &v)

operator <

[const]

Comparison operator. Compares banks first, then patches.