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

#include <Bank.h>

Classes

struct  bankstruct
struct  ins_t

Public Member Functions

 Bank (Config *config)
 ~Bank ()
std::string getname (unsigned int ninstrument)
std::string getnamenumbered (unsigned int ninstrument)
int setname (unsigned int ninstrument, const std::string &newname, int newslot)
bool emptyslot (unsigned int ninstrument)
int clearslot (unsigned int ninstrument)
int savetoslot (unsigned int ninstrument, class Part *part)
int loadfromslot (unsigned int ninstrument, class Part *part)
int swapslot (unsigned int n1, unsigned int n2)
int loadbank (std::string bankdirname) NONREALTIME
int newbank (std::string newbankdirname) NONREALTIME
int locked ()
void rescanforbanks ()
void setMsb (uint8_t msb)
void setLsb (uint8_t lsb)
std::vector< std::string > search (std::string) const
std::vector< std::string > blist (std::string)

Public Attributes

std::string bankfiletitle
std::vector< bankstructbanks
int bankpos
struct zyncarla::Bank::ins_t ins [BANK_SIZE]
uint8_t bank_msb
uint8_t bank_lsb

Private Member Functions

int addtobank (int pos, std::string filename, std::string name)
void deletefrombank (int pos)
void clearbank ()
void scanrootdir (std::string rootdir)
void expanddirname (std::string &dirname)
void normalizedirsuffix (std::string &dirname) const

Private Attributes

std::string defaultinsname
std::string dirname
Config *const config
class BankDbdb

Detailed Description

The instrument Bank

Constructor & Destructor Documentation

◆ Bank()

Bank::Bank ( Config * config)

Constructor

◆ ~Bank()

Bank::~Bank ( )

Member Function Documentation

◆ addtobank()

int zyncarla::Bank::addtobank ( int pos,
std::string filename,
std::string name )
private

◆ blist()

std::vector< std::string > Bank::blist ( std::string s)

◆ clearbank()

void Bank::clearbank ( )
private

◆ clearslot()

int Bank::clearslot ( unsigned int ninstrument)

Empties out the selected slot

◆ deletefrombank()

void Bank::deletefrombank ( int pos)
private

◆ emptyslot()

bool Bank::emptyslot ( unsigned int ninstrument)

returns true when slot is empty

◆ expanddirname()

void Bank::expanddirname ( std::string & dirname)
private

Expends ~ prefix in dirname, if any

◆ getname()

string Bank::getname ( unsigned int ninstrument)

◆ getnamenumbered()

string Bank::getnamenumbered ( unsigned int ninstrument)

◆ loadbank()

int zyncarla::Bank::loadbank ( std::string bankdirname)

◆ loadfromslot()

int Bank::loadfromslot ( unsigned int ninstrument,
class Part * part )

Loads the given slot into a Part

◆ locked()

int Bank::locked ( )

◆ newbank()

int zyncarla::Bank::newbank ( std::string newbankdirname)

◆ normalizedirsuffix()

void zyncarla::Bank::normalizedirsuffix ( std::string & dirname) const
private

Ensure that the directory name is suffixed by a directory separator

◆ rescanforbanks()

void Bank::rescanforbanks ( )

◆ savetoslot()

int Bank::savetoslot ( unsigned int ninstrument,
class Part * part )

Saves the given Part to slot

◆ scanrootdir()

void zyncarla::Bank::scanrootdir ( std::string rootdir)
private

◆ search()

std::vector< std::string > Bank::search ( std::string s) const

◆ setLsb()

void Bank::setLsb ( uint8_t lsb)

◆ setMsb()

void Bank::setMsb ( uint8_t msb)

◆ setname()

int zyncarla::Bank::setname ( unsigned int ninstrument,
const std::string & newname,
int newslot )

◆ swapslot()

int Bank::swapslot ( unsigned int n1,
unsigned int n2 )

Swaps Slots

Member Data Documentation

◆ bank_lsb

uint8_t zyncarla::Bank::bank_lsb

◆ bank_msb

uint8_t zyncarla::Bank::bank_msb

◆ bankfiletitle

std::string zyncarla::Bank::bankfiletitle

◆ bankpos

int zyncarla::Bank::bankpos

◆ banks

std::vector<bankstruct> zyncarla::Bank::banks

◆ config

Config* const zyncarla::Bank::config
private

◆ db

class BankDb* zyncarla::Bank::db
private

◆ defaultinsname

std::string zyncarla::Bank::defaultinsname
private

◆ dirname

std::string zyncarla::Bank::dirname
private

◆ ins

struct zyncarla::Bank::ins_t zyncarla::Bank::ins[BANK_SIZE]

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