LMMS
Loading...
Searching...
No Matches
zyncarla::Controller Class Reference

#include <Controller.h>

Public Member Functions

 Controller (const SYNTH_T &synth, const AbsTime *time=nullptr)
Controlleroperator= (const Controller &c)
 ~Controller ()
void resetall ()
void add2XML (XMLwrapper &xml)
void defaults ()
void getfromXML (XMLwrapper &xml)
void setpitchwheel (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

struct { 
   int   data 
   bool   is_split 
   short int   bendrange 
   short int   bendrange_down 
   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
const AbsTimetime
int64_t last_update_timestamp

Static Public Attributes

static const rtosc::Ports ports

Private Attributes

const SYNTH_Tsynth

Detailed Description

(Midi) Controllers implementation

Constructor & Destructor Documentation

◆ Controller()

Controller::Controller ( const SYNTH_T & synth,
const AbsTime * time = nullptr )

◆ ~Controller()

Controller::~Controller ( )

Member Function Documentation

◆ add2XML()

void Controller::add2XML ( XMLwrapper & xml)

◆ defaults()

void Controller::defaults ( )

◆ getfromXML()

void Controller::getfromXML ( XMLwrapper & xml)

◆ getnrpn()

int Controller::getnrpn ( int * parhi,
int * parlo,
int * valhi,
int * vallo )

◆ initportamento()

int Controller::initportamento ( float oldfreq,
float newfreq,
bool legatoflag )

Initialize a portamento

Parameters
oldfreqStarting frequency of the portamento (Hz)
newfreqEnding frequency of the portamento (Hz)
legatoflagtrue when legato is in progress, false otherwise
Returns
1 if properly initialized, 0 otherwise

◆ operator=()

Controller & Controller::operator= ( const Controller & c)

◆ resetall()

void Controller::resetall ( )

◆ setbandwidth()

void Controller::setbandwidth ( int value)

◆ setexpression()

void Controller::setexpression ( int value)

◆ setfiltercutoff()

void Controller::setfiltercutoff ( int value)

◆ setfilterq()

void Controller::setfilterq ( int value)

◆ setfmamp()

void Controller::setfmamp ( int value)

◆ setmodwheel()

void Controller::setmodwheel ( int value)

◆ setpanning()

void Controller::setpanning ( int value)

◆ setparameternumber()

void Controller::setparameternumber ( unsigned int type,
int value )

◆ setpitchwheel()

void Controller::setpitchwheel ( int value)

◆ setportamento()

void Controller::setportamento ( int value)

Enable or disable portamento

Parameters
value0-127 MIDI value (greater than 64 enables)

◆ setresonancebw()

void Controller::setresonancebw ( int value)

◆ setresonancecenter()

void Controller::setresonancecenter ( int value)

◆ setsustain()

void Controller::setsustain ( int value)

◆ setvolume()

void Controller::setvolume ( int value)

◆ updateportamento()

void Controller::updateportamento ( )

Update portamento's freqrap to next value based upon dx

Member Data Documentation

◆ [struct]

struct { ... } zyncarla::Controller::bandwidth

◆ bendrange

short int zyncarla::Controller::bendrange

◆ bendrange_down

short int zyncarla::Controller::bendrange_down

◆ data

int zyncarla::Controller::data

<Portamento

◆ depth

unsigned char zyncarla::Controller::depth

◆ dx

float zyncarla::Controller::dx

dx is the increment to x when updateportamento is called

◆ exponential

unsigned char zyncarla::Controller::exponential

◆ [struct]

struct { ... } zyncarla::Controller::expression

◆ [struct]

struct { ... } zyncarla::Controller::filtercutoff

◆ [struct]

struct { ... } zyncarla::Controller::filterq

◆ [struct]

struct { ... } zyncarla::Controller::fmamp

◆ freqrap

float zyncarla::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.

◆ is_split

bool zyncarla::Controller::is_split

◆ last_update_timestamp

int64_t zyncarla::Controller::last_update_timestamp

◆ [struct]

struct { ... } zyncarla::Controller::modwheel

◆ noteusing

int zyncarla::Controller::noteusing

this is used by the Part for knowing which note uses the portamento

◆ [struct]

struct { ... } zyncarla::Controller::NRPN

RPN and NPRPN

◆ origfreqrap

float zyncarla::Controller::origfreqrap

this is used for computing oldfreq value from x

◆ pan

float zyncarla::Controller::pan

◆ [struct]

struct { ... } zyncarla::Controller::panning

◆ parhi

int zyncarla::Controller::parhi

◆ parlo

int zyncarla::Controller::parlo

◆ pitchthresh

unsigned char zyncarla::Controller::pitchthresh

pitchthresh is the threshold of enabling protamento

◆ pitchthreshtype

unsigned char zyncarla::Controller::pitchthreshtype

enable the portamento only below(0)/above(1) the threshold

◆ [struct]

struct { ... } zyncarla::Controller::pitchwheel

◆ [struct] [1/2]

struct { ... } zyncarla::Controller::portamento

◆ portamento [2/2]

unsigned char zyncarla::Controller::portamento

◆ ports

const rtosc::Ports Controller::ports
static

◆ propDepth

unsigned char zyncarla::Controller::propDepth

Depth of proportinal portamento

◆ proportional

unsigned char zyncarla::Controller::proportional

If the portamento is proportinal to the distance spanned

0 - constant time(default) 1 - proportional

◆ propRate

unsigned char zyncarla::Controller::propRate

Rate of proportinal portamento

◆ receive

unsigned char zyncarla::Controller::receive

Whether the portamento midi events are received or not

◆ relamp

float zyncarla::Controller::relamp

◆ relbw

float zyncarla::Controller::relbw

◆ relcenter

float zyncarla::Controller::relcenter

◆ relfreq

float zyncarla::Controller::relfreq

◆ relmod

float zyncarla::Controller::relmod

◆ relq

float zyncarla::Controller::relq

◆ relvolume

float zyncarla::Controller::relvolume

◆ [struct]

struct { ... } zyncarla::Controller::resonancebandwidth

◆ [struct]

struct { ... } zyncarla::Controller::resonancecenter

◆ [struct] [1/2]

struct { ... } zyncarla::Controller::sustain

◆ sustain [2/2]

int zyncarla::Controller::sustain

◆ synth

const SYNTH_T& zyncarla::Controller::synth
private

◆ time [1/2]

const AbsTime* zyncarla::Controller::time

◆ time [2/2]

unsigned char zyncarla::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

◆ updowntimestretch

unsigned char zyncarla::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)

◆ used

int zyncarla::Controller::used

if a the portamento is used by a note

Todo
see if this can be a bool

◆ valhi

int zyncarla::Controller::valhi

◆ vallo

int zyncarla::Controller::vallo

◆ [struct] [1/2]

struct { ... } zyncarla::Controller::volume

◆ volume [2/2]

float zyncarla::Controller::volume

◆ x

float zyncarla::Controller::x

x is from 0.0f (start portamento) to 1.0f (finished portamento)


The documentation for this class was generated from the following files: