MuseScore  3.4
Music composition and notation
Public Slots | Signals | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Ms::MasterSynthesizer Class Reference

#include <msynthesizer.h>

Inheritance diagram for Ms::MasterSynthesizer:
Inheritance graph
[legend]
Collaboration diagram for Ms::MasterSynthesizer:
Collaboration graph
[legend]

Public Slots

void sfChanged ()
 
void setGain (float f)
 

Signals

void soundFontChanged ()
 
void gainChanged (float)
 

Public Member Functions

 MasterSynthesizer ()
 
 ~MasterSynthesizer ()
 
void registerSynthesizer (Synthesizer *)
 
void init ()
 
float sampleRate ()
 
void setSampleRate (float val)
 
void process (unsigned, float *)
 
void play (const NPlayEvent &, unsigned)
 
void setMasterTuning (double val)
 
double masterTuning () const
 
int index (const QString &) const
 
QString name (unsigned) const
 
QList< MidiPatch * > getPatchInfo () const
 
MidiPatchgetPatchInfo (QString synti, int bank, int program)
 
SynthesizerState state () const
 
bool setState (const SynthesizerState &)
 
Synthesizersynthesizer (const QString &name)
 
const std::vector< Effect * > & effectList (int ab) const
 
const std::vector< Synthesizer * > synthesizer () const
 
void registerEffect (int ab, Effect *)
 
void reset ()
 
void allSoundsOff (int channel)
 
void allNotesOff (int channel)
 
void setEffect (int ab, int idx)
 
Effecteffect (int ab)
 
int indexOfEffect (int ab)
 
float gain () const
 
float gainAsDecibels () const
 
void setGainAsDecibels (float decibelValue)
 
float boost () const
 
void setBoost (float v)
 
int dynamicsMethod () const
 
void setDynamicsMethod (int val)
 
int ccToUseIndex () const
 
void setCcToUseIndex (int val)
 
bool storeState ()
 

Public Attributes

float defaultGainAsDecibels
 
float minGainAsDecibels = -80
 
float maxGainAsDecibels = 0
 

Static Public Attributes

static const int MAX_BUFFERSIZE = 8192
 
static const int MAX_EFFECTS = 2
 
static constexpr float defaultGain = 0.1f
 

Private Member Functions

int indexOfEffect (int ab, const QString &name)
 
float convertGainToDecibels (float gain) const
 

Private Attributes

float _gain { defaultGain }
 
float _boost { 10.0 }
 
double _masterTuning { 440.0 }
 
int _dynamicsMethod { 1 }
 
int _ccToUse { 1 }
 
std::atomic< bool > lock1 { false }
 
std::atomic< bool > lock2 { true }
 
std::vector< Synthesizer * > _synthesizer
 
std::vector< Effect * > _effectList [MAX_EFFECTS]
 
Effect_effect [MAX_EFFECTS] { nullptr, nullptr }
 
float _sampleRate
 
float effect1Buffer [MAX_BUFFERSIZE]
 
float effect2Buffer [MAX_BUFFERSIZE]
 

Static Private Attributes

static constexpr double MUTE = 0.00
 
static constexpr double MAX = 10.00
 
static constexpr double N = 20.0
 

Constructor & Destructor Documentation

◆ MasterSynthesizer()

Ms::MasterSynthesizer::MasterSynthesizer ( )

◆ ~MasterSynthesizer()

Ms::MasterSynthesizer::~MasterSynthesizer ( )

Member Function Documentation

◆ allNotesOff()

void Ms::MasterSynthesizer::allNotesOff ( int  channel)

◆ allSoundsOff()

void Ms::MasterSynthesizer::allSoundsOff ( int  channel)

◆ boost()

float Ms::MasterSynthesizer::boost ( ) const
inline

◆ ccToUseIndex()

int Ms::MasterSynthesizer::ccToUseIndex ( ) const
inline

◆ convertGainToDecibels()

float Ms::MasterSynthesizer::convertGainToDecibels ( float  gain) const
private

◆ dynamicsMethod()

int Ms::MasterSynthesizer::dynamicsMethod ( ) const
inline

◆ effect()

Effect * Ms::MasterSynthesizer::effect ( int  ab)

◆ effectList()

const std::vector<Effect*>& Ms::MasterSynthesizer::effectList ( int  ab) const
inline

◆ gain()

float Ms::MasterSynthesizer::gain ( ) const
inline

◆ gainAsDecibels()

float Ms::MasterSynthesizer::gainAsDecibels ( ) const

◆ gainChanged

void Ms::MasterSynthesizer::gainChanged ( float  )
signal

◆ getPatchInfo() [1/2]

QList< MidiPatch * > Ms::MasterSynthesizer::getPatchInfo ( ) const

◆ getPatchInfo() [2/2]

MidiPatch * Ms::MasterSynthesizer::getPatchInfo ( QString  synti,
int  bank,
int  program 
)

◆ index()

int Ms::MasterSynthesizer::index ( const QString &  name) const

◆ indexOfEffect() [1/2]

int Ms::MasterSynthesizer::indexOfEffect ( int  ab,
const QString &  name 
)
private

◆ indexOfEffect() [2/2]

int Ms::MasterSynthesizer::indexOfEffect ( int  ab)

◆ init()

void Ms::MasterSynthesizer::init ( )

◆ masterTuning()

double Ms::MasterSynthesizer::masterTuning ( ) const
inline

◆ name()

QString Ms::MasterSynthesizer::name ( unsigned  idx) const

◆ play()

void Ms::MasterSynthesizer::play ( const NPlayEvent event,
unsigned  syntiIdx 
)

◆ process()

void Ms::MasterSynthesizer::process ( unsigned  n,
float *  p 
)

◆ registerEffect()

void Ms::MasterSynthesizer::registerEffect ( int  ab,
Effect e 
)

◆ registerSynthesizer()

void Ms::MasterSynthesizer::registerSynthesizer ( Synthesizer s)

◆ reset()

void Ms::MasterSynthesizer::reset ( )

◆ sampleRate()

float Ms::MasterSynthesizer::sampleRate ( )
inline

◆ setBoost()

void Ms::MasterSynthesizer::setBoost ( float  v)
inline

◆ setCcToUseIndex()

void Ms::MasterSynthesizer::setCcToUseIndex ( int  val)
inline

◆ setDynamicsMethod()

void Ms::MasterSynthesizer::setDynamicsMethod ( int  val)
inline

◆ setEffect()

void Ms::MasterSynthesizer::setEffect ( int  ab,
int  idx 
)

◆ setGain

void Ms::MasterSynthesizer::setGain ( float  f)
slot

◆ setGainAsDecibels()

void Ms::MasterSynthesizer::setGainAsDecibels ( float  decibelValue)

◆ setMasterTuning()

void Ms::MasterSynthesizer::setMasterTuning ( double  val)

◆ setSampleRate()

void Ms::MasterSynthesizer::setSampleRate ( float  val)

◆ setState()

bool Ms::MasterSynthesizer::setState ( const SynthesizerState ss)

◆ sfChanged

void Ms::MasterSynthesizer::sfChanged ( )
inlineslot

◆ soundFontChanged

void Ms::MasterSynthesizer::soundFontChanged ( )
signal

◆ state()

SynthesizerState Ms::MasterSynthesizer::state ( ) const

◆ storeState()

bool Ms::MasterSynthesizer::storeState ( )

◆ synthesizer() [1/2]

Synthesizer * Ms::MasterSynthesizer::synthesizer ( const QString &  name)

◆ synthesizer() [2/2]

const std::vector<Synthesizer*> Ms::MasterSynthesizer::synthesizer ( ) const
inline

Member Data Documentation

◆ _boost

float Ms::MasterSynthesizer::_boost { 10.0 }
private

◆ _ccToUse

int Ms::MasterSynthesizer::_ccToUse { 1 }
private

◆ _dynamicsMethod

int Ms::MasterSynthesizer::_dynamicsMethod { 1 }
private

◆ _effect

Effect* Ms::MasterSynthesizer::_effect[MAX_EFFECTS] { nullptr, nullptr }
private

◆ _effectList

std::vector<Effect*> Ms::MasterSynthesizer::_effectList[MAX_EFFECTS]
private

◆ _gain

float Ms::MasterSynthesizer::_gain { defaultGain }
private

◆ _masterTuning

double Ms::MasterSynthesizer::_masterTuning { 440.0 }
private

◆ _sampleRate

float Ms::MasterSynthesizer::_sampleRate
private

◆ _synthesizer

std::vector<Synthesizer*> Ms::MasterSynthesizer::_synthesizer
private

◆ defaultGain

constexpr float Ms::MasterSynthesizer::defaultGain = 0.1f
static

◆ defaultGainAsDecibels

float Ms::MasterSynthesizer::defaultGainAsDecibels

◆ effect1Buffer

float Ms::MasterSynthesizer::effect1Buffer[MAX_BUFFERSIZE]
private

◆ effect2Buffer

float Ms::MasterSynthesizer::effect2Buffer[MAX_BUFFERSIZE]
private

◆ lock1

std::atomic<bool> Ms::MasterSynthesizer::lock1 { false }
private

◆ lock2

std::atomic<bool> Ms::MasterSynthesizer::lock2 { true }
private

◆ MAX

constexpr double Ms::MasterSynthesizer::MAX = 10.00
staticprivate

◆ MAX_BUFFERSIZE

const int Ms::MasterSynthesizer::MAX_BUFFERSIZE = 8192
static

◆ MAX_EFFECTS

const int Ms::MasterSynthesizer::MAX_EFFECTS = 2
static

◆ maxGainAsDecibels

float Ms::MasterSynthesizer::maxGainAsDecibels = 0

◆ minGainAsDecibels

float Ms::MasterSynthesizer::minGainAsDecibels = -80

◆ MUTE

constexpr double Ms::MasterSynthesizer::MUTE = 0.00
staticprivate

◆ N

constexpr double Ms::MasterSynthesizer::N = 20.0
staticprivate

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