|
LMMS
|
#include <Controller.h>
Public Member Functions | |
| Controller () | |
| ~Controller () | |
| void | send (int npar, float xval) |
| Controller () | |
| ~Controller () | |
| void | resetall () |
| void | add2XML (XMLwrapper *xml) |
| void | defaults () |
| void | getfromXML (XMLwrapper *xml) |
| void | setpitchwheel (int value) |
| void | setpitchwheelbendrange (unsigned short int value) |
| void | setexpression (int value) |
| void | setpanning (int value) |
| void | setfiltercutoff (int value) |
| void | setfilterq (int value) |
| void | setbandwidth (int value) |
| void | setmodwheel (int value) |
| void | setfmamp (int value) |
| void | setvolume (int value) |
| void | setsustain (int value) |
| void | setportamento (int value) |
| void | setresonancecenter (int value) |
| void | setresonancebw (int value) |
| void | setparameternumber (unsigned int type, int value) |
| int | getnrpn (int *parhi, int *parlo, int *valhi, int *vallo) |
| int | initportamento (float oldfreq, float newfreq, bool legatoflag) |
| void | updateportamento () |
Public Attributes | |
| unsigned char | Pchout |
| struct { | |
| unsigned char mode | |
| unsigned char val1 | |
| unsigned char val2 | |
| struct { | |
| unsigned char par | |
| } ctl | |
| struct { | |
| unsigned char cpar | |
| unsigned char fpar | |
| unsigned char cval | |
| } nrpn | |
| } | pars [6] |
| struct { | |
| int data | |
| short int bendrange | |
| float relfreq | |
| } | pitchwheel |
| struct { | |
| int data | |
| float relvolume | |
| unsigned char receive | |
| } | expression |
| struct { | |
| int data | |
| float pan | |
| unsigned char depth | |
| } | panning |
| struct { | |
| int data | |
| float relfreq | |
| unsigned char depth | |
| } | filtercutoff |
| struct { | |
| int data | |
| float relq | |
| unsigned char depth | |
| } | filterq |
| struct { | |
| int data | |
| float relbw | |
| unsigned char depth | |
| unsigned char exponential | |
| } | bandwidth |
| struct { | |
| int data | |
| float relmod | |
| unsigned char depth | |
| unsigned char exponential | |
| } | modwheel |
| struct { | |
| int data | |
| float relamp | |
| unsigned char receive | |
| } | fmamp |
| struct { | |
| int data | |
| float volume | |
| unsigned char receive | |
| } | volume |
| struct { | |
| int data | |
| int sustain | |
| unsigned char receive | |
| } | sustain |
| struct { | |
| int data | |
| unsigned char portamento | |
| unsigned char receive | |
| unsigned char time | |
| unsigned char proportional | |
| unsigned char propRate | |
| unsigned char propDepth | |
| unsigned char pitchthresh | |
| unsigned char pitchthreshtype | |
| unsigned char updowntimestretch | |
| float freqrap | |
| int noteusing | |
| int used | |
| float x | |
| float dx | |
| float origfreqrap | |
| } | portamento |
| struct { | |
| int data | |
| float relcenter | |
| unsigned char depth | |
| } | resonancecenter |
| struct { | |
| int data | |
| float relbw | |
| unsigned char depth | |
| } | resonancebandwidth |
| struct { | |
| int parhi | |
| int parlo | |
| int valhi | |
| int vallo | |
| unsigned char receive | |
| } | NRPN |
Private Member Functions | |
| void | sendcontroller (int par, unsigned char val) |
| void | sendnrpn (int npar, unsigned char val) |
Private Attributes | |
| snd_seq_t * | midi_out |
(Midi) Controllers implementation
| Controller::Controller | ( | ) |
| Controller::~Controller | ( | ) |
| Controller::Controller | ( | ) |
| Controller::~Controller | ( | ) |
| void Controller::add2XML | ( | XMLwrapper * | xml | ) |
| void Controller::defaults | ( | ) |
| void Controller::getfromXML | ( | XMLwrapper * | xml | ) |
| int Controller::initportamento | ( | float | oldfreq, |
| float | newfreq, | ||
| bool | legatoflag ) |
Initialize a portamento
| oldfreq | Starting frequency of the portamento (Hz) |
| newfreq | Ending frequency of the portamento (Hz) |
| legatoflag | true when legato is in progress, false otherwise |
| void Controller::resetall | ( | ) |
Enable or disable portamento
| value | 0-127 MIDI value (greater than 64 enables) |
| void Controller::updateportamento | ( | ) |
Update portamento's freqrap to next value based upon dx
| struct { ... } Controller::bandwidth |
| short int Controller::bendrange |
| unsigned char Controller::cpar |
| struct { ... } Controller::ctl |
| unsigned char Controller::cval |
| int Controller::data |
<Portamento
| unsigned char Controller::depth |
| float Controller::dx |
dx is the increment to x when updateportamento is called
| unsigned char Controller::exponential |
| struct { ... } Controller::expression |
| struct { ... } Controller::filtercutoff |
| struct { ... } Controller::filterq |
| struct { ... } Controller::fmamp |
| unsigned char Controller::fpar |
| float Controller::freqrap |
this value is used to compute the actual portamento
This is a multiplyer to change the frequency of the newer frequency to fit the profile of the portamento. This will be linear with respect to x.
|
private |
| unsigned char Controller::mode |
| struct { ... } Controller::modwheel |
| struct { ... } Controller::NRPN |
RPN and NPRPN
| struct { ... } Controller::nrpn |
| float Controller::origfreqrap |
this is used for computing oldfreq value from x
| float Controller::pan |
| struct { ... } Controller::panning |
| unsigned char Controller::par |
| int Controller::parhi |
| int Controller::parlo |
| struct { ... } Controller::pars[6] |
| unsigned char Controller::Pchout |
| unsigned char Controller::pitchthresh |
pitchthresh is the threshold of enabling protamento
| unsigned char Controller::pitchthreshtype |
enable the portamento only below(0)/above(1) the threshold
| struct { ... } Controller::pitchwheel |
| struct { ... } Controller::portamento |
| unsigned char Controller::portamento |
| unsigned char Controller::propDepth |
Depth of proportinal portamento
| unsigned char Controller::proportional |
If the portamento is proportinal to the distance spanned
0 - constant time(default) 1 - proportional
| unsigned char Controller::propRate |
Rate of proportinal portamento
| unsigned char Controller::receive |
Whether the portamento midi events are received or not
| float Controller::relamp |
| float Controller::relbw |
| float Controller::relcenter |
| float Controller::relfreq |
| float Controller::relmod |
| float Controller::relq |
| float Controller::relvolume |
| struct { ... } Controller::resonancebandwidth |
| struct { ... } Controller::resonancecenter |
| struct { ... } Controller::sustain |
| int Controller::sustain |
| unsigned char Controller::time |
The time that it takes for the portamento to complete
Translates in an expontal fashion to 0 Seconds to 1.93f Seconds of completion time
| unsigned char Controller::updowntimestretch |
this value represent how the portamento time is reduced 0 - for down portamento 1-63 - the up portamento's time is smaller than the down portamento 64 - the portamento time is always the same 64-126 - the down portamento's time is smaller than the up portamento 127 - for upper portamento 'up portamento' means when the frequency is rising (eg: the portamento is from 200Hz to 300 Hz) 'down portamento' means when the frequency is lowering (eg: the portamento is from 300Hz to 200 Hz)
| unsigned char Controller::val1 |
| unsigned char Controller::val2 |
| int Controller::valhi |
| int Controller::vallo |
| struct { ... } Controller::volume |
| float Controller::volume |
| float Controller::x |
x is from 0.0f (start portamento) to 1.0f (finished portamento)