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

#include <Microtonal.h>

Public Member Functions

 Microtonal (const int &gzip_compression)
 ~Microtonal ()
void defaults ()
float getnotefreq (int note, int keyshift) const
unsigned char getoctavesize () const
void tuningtoline (int n, char *line, int maxn)
int texttotunings (const char *text)
void texttomapping (const char *text)
void add2XML (XMLwrapper &xml) const
void getfromXML (XMLwrapper &xml)
int saveXML (const char *filename) const
int loadXML (const char *filename)
bool operator== (const Microtonal &micro) const
bool operator!= (const Microtonal &micro) const
void clone (Microtonal &m)

Static Public Member Functions

static int loadscl (SclInfo &scl, const char *filename)
static int loadkbm (KbmInfo &kbm, const char *filename)

Public Attributes

unsigned char Pinvertupdown
unsigned char Pinvertupdowncenter
unsigned char Penabled
unsigned char PAnote
float PAfreq
unsigned char Pscaleshift
unsigned char Pfirstkey
unsigned char Plastkey
unsigned char Pmiddlenote
unsigned char Pmapsize
unsigned char Pmappingenabled
short int Pmapping [128]
unsigned char Pglobalfinedetune
char Pname [MICROTONAL_MAX_NAME_LEN]
char Pcomment [MICROTONAL_MAX_NAME_LEN]
unsigned char octavesize
OctaveTuning octave [MAX_OCTAVE_SIZE]

Static Public Attributes

static const rtosc::Ports ports

Private Member Functions

void apply (void)

Static Private Member Functions

static int loadline (FILE *file, char *line)
static int linetotunings (struct OctaveTuning &tune, const char *line)

Private Attributes

const intgzip_compression

Detailed Description

Tuning settings and microtonal capabilities

Constructor & Destructor Documentation

◆ Microtonal()

Microtonal::Microtonal ( const int & gzip_compression)

Constructor

◆ ~Microtonal()

Microtonal::~Microtonal ( )

Destructor

Member Function Documentation

◆ add2XML()

void Microtonal::add2XML ( XMLwrapper & xml) const

◆ apply()

void Microtonal::apply ( void )
private

◆ clone()

void zyncarla::Microtonal::clone ( Microtonal & m)

◆ defaults()

void Microtonal::defaults ( )

◆ getfromXML()

void Microtonal::getfromXML ( XMLwrapper & xml)

◆ getnotefreq()

float Microtonal::getnotefreq ( int note,
int keyshift ) const

Calculates the frequency for a given note

◆ getoctavesize()

unsigned char Microtonal::getoctavesize ( ) const

Return the current octave size

◆ linetotunings()

int Microtonal::linetotunings ( struct OctaveTuning & tune,
const char * line )
staticprivate

◆ loadkbm()

int Microtonal::loadkbm ( KbmInfo & kbm,
const char * filename )
static

load the mapping from .kbm file

◆ loadline()

int Microtonal::loadline ( FILE * file,
char * line )
staticprivate

◆ loadscl()

int Microtonal::loadscl ( SclInfo & scl,
const char * filename )
static

load the tunnings from a .scl file

◆ loadXML()

int Microtonal::loadXML ( const char * filename)

◆ operator!=()

bool Microtonal::operator!= ( const Microtonal & micro) const

◆ operator==()

bool Microtonal::operator== ( const Microtonal & micro) const

◆ saveXML()

int Microtonal::saveXML ( const char * filename) const

◆ texttomapping()

void Microtonal::texttomapping ( const char * text)

Load text into the internal mappings

Todo
better description

◆ texttotunings()

int Microtonal::texttotunings ( const char * text)

Load text into the internal tunings

Todo
better description

◆ tuningtoline()

void Microtonal::tuningtoline ( int n,
char * line,
int maxn )

Convert tunning to string

Member Data Documentation

◆ gzip_compression

const int& zyncarla::Microtonal::gzip_compression
private

◆ octave

OctaveTuning zyncarla::Microtonal::octave[MAX_OCTAVE_SIZE]

◆ octavesize

unsigned char zyncarla::Microtonal::octavesize

◆ PAfreq

float zyncarla::Microtonal::PAfreq

the frequency of the "A" note

◆ PAnote

unsigned char zyncarla::Microtonal::PAnote

the note of "A" key

◆ Pcomment

char zyncarla::Microtonal::Pcomment[MICROTONAL_MAX_NAME_LEN]

Comment about the tuning

◆ Penabled

unsigned char zyncarla::Microtonal::Penabled

0 for 12 key temperate scale, 1 for microtonal

◆ Pfirstkey

unsigned char zyncarla::Microtonal::Pfirstkey

◆ Pglobalfinedetune

unsigned char zyncarla::Microtonal::Pglobalfinedetune

Fine detune to be applied to all notes

◆ Pinvertupdown

unsigned char zyncarla::Microtonal::Pinvertupdown

if the keys are inversed (the pitch is lower to keys from the right direction)

◆ Pinvertupdowncenter

unsigned char zyncarla::Microtonal::Pinvertupdowncenter

the central key of the inversion

◆ Plastkey

unsigned char zyncarla::Microtonal::Plastkey

◆ Pmapping

short int zyncarla::Microtonal::Pmapping[128]

Mapping (keys)

◆ Pmappingenabled

unsigned char zyncarla::Microtonal::Pmappingenabled

Mapping ON/OFF

◆ Pmapsize

unsigned char zyncarla::Microtonal::Pmapsize

Map size

◆ Pmiddlenote

unsigned char zyncarla::Microtonal::Pmiddlenote

The middle note where scale degree 0 is mapped to

◆ Pname

char zyncarla::Microtonal::Pname[MICROTONAL_MAX_NAME_LEN]

Name of Microtonal tuning

◆ ports

const rtosc::Ports Microtonal::ports
static

TODO Consider how much of this should really exist on the rt side of things. All the rt side needs is a function to map notes at various keyshifts to frequencies, which does not require this many parameters...

A good lookup table should be a good finalization of this

◆ Pscaleshift

unsigned char zyncarla::Microtonal::Pscaleshift

if the scale is "tuned" to a note, you can tune to other note


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