MuseScore  3.4
Music composition and notation
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Zerberus Class Reference

#include <zerberus.h>

Inheritance diagram for Zerberus:
Inheritance graph
[legend]
Collaboration diagram for Zerberus:
Collaboration graph
[legend]

Public Member Functions

 Zerberus ()
 
 ~Zerberus ()
 
virtual void process (unsigned frames, float *, float *, float *)
 
virtual void play (const Ms::PlayEvent &event)
 
bool loadInstrument (const QString &)
 
ZInstrumentinstrument (int program) const
 
VoicegetActiveVoices ()
 
Channelchannel (int n)
 
int loadProgress ()
 
void setLoadProgress (int val)
 
bool loadWasCanceled ()
 
void setLoadWasCanceled (bool status)
 
virtual void setMasterTuning (double val)
 
virtual double masterTuning () const
 
double ct2hz (double c) const
 
virtual const char * name () const
 
virtual Ms::SynthesizerGroup state () const
 
virtual bool setState (const Ms::SynthesizerGroup &)
 
virtual void allSoundsOff (int channel)
 
virtual void allNotesOff (int channel)
 
virtual bool addSoundFont (const QString &)
 
virtual bool removeSoundFont (const QString &)
 
virtual bool loadSoundFonts (const QStringList &)
 
virtual bool removeSoundFonts (const QStringList &fileNames)
 
QStringList soundFonts () const
 
std::vector< Ms::SoundFontInfosoundFontsInfo () const override
 
virtual const QList< Ms::MidiPatch * > & getPatchInfo () const override
 
void updatePatchList ()
 
virtual Ms::SynthesizerGuigui ()
 
- Public Member Functions inherited from Ms::Synthesizer
 Synthesizer ()
 
virtual ~Synthesizer ()
 
virtual void init (float sr)
 
float sampleRate () const
 
virtual void setValue (int, double)
 
virtual double value (int) const
 
void reset ()
 
bool active () const
 
void setActive (bool val=true)
 

Static Public Member Functions

static QFileInfoList sfzFiles ()
 

Private Member Functions

void programChange (int channel, int program)
 
void trigger (Channel *, int key, int velo, Trigger, int cc, int ccVal, double durSinceNoteOn)
 
void processNoteOff (Channel *, int pitch)
 
void processNoteOn (Channel *cp, int key, int velo)
 

Private Attributes

QList< Ms::MidiPatch * > patches
 
double _masterTuning = 440.0
 
std::atomic< bool > busy
 
std::list< ZInstrument * > instruments
 
Channel_channel [MAX_CHANNELS]
 
int allocatedVoices = 0
 
VoiceFifo freeVoices
 
VoiceactiveVoices = 0
 
int _loadProgress = 0
 
bool _loadWasCanceled = false
 
QMutex mutex
 

Static Private Attributes

static bool initialized = false
 
static std::list< ZInstrument * > globalInstruments
 

Additional Inherited Members

- Protected Attributes inherited from Ms::Synthesizer
float _sampleRate
 
SynthesizerGui_gui
 

Constructor & Destructor Documentation

◆ Zerberus()

Zerberus::Zerberus ( )

◆ ~Zerberus()

Zerberus::~Zerberus ( )

Member Function Documentation

◆ addSoundFont()

bool Zerberus::addSoundFont ( const QString &  s)
virtual

Reimplemented from Ms::Synthesizer.

◆ allNotesOff()

void Zerberus::allNotesOff ( int  channel)
virtual

Reimplemented from Ms::Synthesizer.

◆ allSoundsOff()

void Zerberus::allSoundsOff ( int  channel)
virtual

Reimplemented from Ms::Synthesizer.

◆ channel()

Channel* Zerberus::channel ( int  n)
inline

◆ ct2hz()

double Zerberus::ct2hz ( double  c) const
inline

◆ getActiveVoices()

Voice* Zerberus::getActiveVoices ( )
inline

◆ getPatchInfo()

virtual const QList<Ms::MidiPatch*>& Zerberus::getPatchInfo ( ) const
inlineoverridevirtual

Implements Ms::Synthesizer.

◆ gui()

Ms::SynthesizerGui * Zerberus::gui ( )
virtual

Reimplemented from Ms::Synthesizer.

◆ instrument()

ZInstrument * Zerberus::instrument ( int  program) const

◆ loadInstrument()

bool Zerberus::loadInstrument ( const QString &  s)

◆ loadProgress()

int Zerberus::loadProgress ( )
inline

◆ loadSoundFonts()

bool Zerberus::loadSoundFonts ( const QStringList &  sl)
virtual

Implements Ms::Synthesizer.

◆ loadWasCanceled()

bool Zerberus::loadWasCanceled ( )
inline

◆ masterTuning()

virtual double Zerberus::masterTuning ( ) const
inlinevirtual

Reimplemented from Ms::Synthesizer.

◆ name()

const char * Zerberus::name ( ) const
virtual

Implements Ms::Synthesizer.

◆ play()

void Zerberus::play ( const Ms::PlayEvent event)
virtual

Implements Ms::Synthesizer.

◆ process()

void Zerberus::process ( unsigned  frames,
float *  p,
float *  ,
float *   
)
virtual

Implements Ms::Synthesizer.

◆ processNoteOff()

void Zerberus::processNoteOff ( Channel cp,
int  pitch 
)
private

◆ processNoteOn()

void Zerberus::processNoteOn ( Channel cp,
int  key,
int  velo 
)
private

◆ programChange()

void Zerberus::programChange ( int  channel,
int  program 
)
private

◆ removeSoundFont()

bool Zerberus::removeSoundFont ( const QString &  s)
virtual

Reimplemented from Ms::Synthesizer.

◆ removeSoundFonts()

bool Zerberus::removeSoundFonts ( const QStringList &  fileNames)
virtual

◆ setLoadProgress()

void Zerberus::setLoadProgress ( int  val)
inline

◆ setLoadWasCanceled()

void Zerberus::setLoadWasCanceled ( bool  status)
inline

◆ setMasterTuning()

virtual void Zerberus::setMasterTuning ( double  val)
inlinevirtual

Reimplemented from Ms::Synthesizer.

◆ setState()

bool Zerberus::setState ( const Ms::SynthesizerGroup sp)
virtual

Implements Ms::Synthesizer.

◆ sfzFiles()

QFileInfoList Zerberus::sfzFiles ( )
static

◆ soundFonts()

QStringList Zerberus::soundFonts ( ) const

◆ soundFontsInfo()

std::vector< Ms::SoundFontInfo > Zerberus::soundFontsInfo ( ) const
overridevirtual

Implements Ms::Synthesizer.

◆ state()

Ms::SynthesizerGroup Zerberus::state ( ) const
virtual

Implements Ms::Synthesizer.

◆ trigger()

void Zerberus::trigger ( Channel channel,
int  key,
int  velo,
Trigger  trigger,
int  cc,
int  ccVal,
double  durSinceNoteOn 
)
private

◆ updatePatchList()

void Zerberus::updatePatchList ( )

Member Data Documentation

◆ _channel

Channel* Zerberus::_channel[MAX_CHANNELS]
private

◆ _loadProgress

int Zerberus::_loadProgress = 0
private

◆ _loadWasCanceled

bool Zerberus::_loadWasCanceled = false
private

◆ _masterTuning

double Zerberus::_masterTuning = 440.0
private

◆ activeVoices

Voice* Zerberus::activeVoices = 0
private

◆ allocatedVoices

int Zerberus::allocatedVoices = 0
private

◆ busy

std::atomic<bool> Zerberus::busy
private

◆ freeVoices

VoiceFifo Zerberus::freeVoices
private

◆ globalInstruments

std::list< ZInstrument * > Zerberus::globalInstruments
staticprivate

◆ initialized

bool Zerberus::initialized = false
staticprivate

◆ instruments

std::list<ZInstrument*> Zerberus::instruments
private

◆ mutex

QMutex Zerberus::mutex
private

◆ patches

QList<Ms::MidiPatch*> Zerberus::patches
private

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