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

#include <instrument.h>

Collaboration diagram for Ms::Instrument:
Collaboration graph
[legend]

Public Member Functions

 Instrument ()
 
 Instrument (const Instrument &)
 
void operator= (const Instrument &)
 
 ~Instrument ()
 
void read (XmlReader &, Part *part)
 
bool readProperties (XmlReader &, Part *, bool *customDrumset)
 
void write (XmlWriter &xml, const Part *part) const
 
NamedEventListmidiAction (const QString &s, int channel) const
 
int channelIdx (const QString &s) const
 
void updateVelocity (int *velocity, int channel, const QString &name)
 
void updateGateTime (int *gateTime, int channelIdx, const QString &name)
 
bool operator== (const Instrument &) const
 
void setMinPitchP (int v)
 
void setMaxPitchP (int v)
 
void setMinPitchA (int v)
 
void setMaxPitchA (int v)
 
Interval transpose () const
 
void setTranspose (const Interval &v)
 
QString instrumentId ()
 
void setInstrumentId (const QString &instrumentId)
 
void setDrumset (const Drumset *ds)
 
const Drumsetdrumset () const
 
Drumsetdrumset ()
 
bool useDrumset () const
 
void setUseDrumset (bool val)
 
void setAmateurPitchRange (int a, int b)
 
void setProfessionalPitchRange (int a, int b)
 
Channelchannel (int idx)
 
const Channelchannel (int idx) const
 
ChannelplaybackChannel (int idx, MasterScore *)
 
const ChannelplaybackChannel (int idx, const MasterScore *) const
 
ClefTypeList clefType (int staffIdx) const
 
void setClefType (int staffIdx, const ClefTypeList &c)
 
const QList< NamedEventList > & midiActions () const
 
const QList< MidiArticulation > & articulation () const
 
const QList< Channel * > & channel () const
 
void appendChannel (Channel *c)
 
void clearChannels ()
 
void setMidiActions (const QList< NamedEventList > &l)
 
void setArticulation (const QList< MidiArticulation > &l)
 
const StringDatastringData () const
 
void setStringData (const StringData &d)
 
void setLongName (const QString &f)
 
void setShortName (const QString &f)
 
void addLongName (const StaffName &f)
 
void addShortName (const StaffName &f)
 
int minPitchP () const
 
int maxPitchP () const
 
int minPitchA () const
 
int maxPitchA () const
 
QString instrumentId () const
 
const QList< StaffName > & longNames () const
 
const QList< StaffName > & shortNames () const
 
QList< StaffName > & longNames ()
 
QList< StaffName > & shortNames ()
 
QString trackName () const
 
void setTrackName (const QString &s)
 
bool singleNoteDynamics () const
 
void setSingleNoteDynamics (bool val)
 
void setSingleNoteDynamicsFromTemplate ()
 
bool getSingleNoteDynamicsFromTemplate () const
 
void switchExpressive (MasterScore *score, Synthesizer *synth, bool expressive, bool force=false)
 

Static Public Member Functions

static Instrument fromTemplate (const InstrumentTemplate *t)
 

Private Attributes

StaffNameList _longNames
 
StaffNameList _shortNames
 
QString _trackName
 
char _minPitchA
 
char _maxPitchA
 
char _minPitchP
 
char _maxPitchP
 
Interval _transpose
 
QString _instrumentId
 
bool _useDrumset
 
Drumset_drumset
 
StringData _stringData
 
QList< NamedEventList_midiActions
 
QList< MidiArticulation_articulation
 
QList< Channel * > _channel
 
QList< ClefTypeList_clefType
 
bool _singleNoteDynamics
 

Constructor & Destructor Documentation

◆ Instrument() [1/2]

Ms::Instrument::Instrument ( )

◆ Instrument() [2/2]

Ms::Instrument::Instrument ( const Instrument i)

◆ ~Instrument()

Ms::Instrument::~Instrument ( )

Member Function Documentation

◆ addLongName()

void Ms::Instrument::addLongName ( const StaffName f)

◆ addShortName()

void Ms::Instrument::addShortName ( const StaffName f)

◆ appendChannel()

void Ms::Instrument::appendChannel ( Channel c)
inline

◆ articulation()

const QList<MidiArticulation>& Ms::Instrument::articulation ( ) const
inline

◆ channel() [1/3]

Channel* Ms::Instrument::channel ( int  idx)
inline

◆ channel() [2/3]

const Channel* Ms::Instrument::channel ( int  idx) const
inline

◆ channel() [3/3]

const QList<Channel*>& Ms::Instrument::channel ( ) const
inline

◆ channelIdx()

int Ms::Instrument::channelIdx ( const QString &  s) const

◆ clearChannels()

void Ms::Instrument::clearChannels ( )
inline

◆ clefType()

ClefTypeList Ms::Instrument::clefType ( int  staffIdx) const

◆ drumset() [1/2]

const Drumset* Ms::Instrument::drumset ( ) const
inline

◆ drumset() [2/2]

Drumset* Ms::Instrument::drumset ( )
inline

◆ fromTemplate()

Instrument Ms::Instrument::fromTemplate ( const InstrumentTemplate t)
static

◆ getSingleNoteDynamicsFromTemplate()

bool Ms::Instrument::getSingleNoteDynamicsFromTemplate ( ) const

◆ instrumentId() [1/2]

QString Ms::Instrument::instrumentId ( )
inline

◆ instrumentId() [2/2]

QString Ms::Instrument::instrumentId ( ) const

◆ longNames() [1/2]

const QList< StaffName > & Ms::Instrument::longNames ( ) const

◆ longNames() [2/2]

QList< StaffName > & Ms::Instrument::longNames ( )

◆ maxPitchA()

int Ms::Instrument::maxPitchA ( ) const

◆ maxPitchP()

int Ms::Instrument::maxPitchP ( ) const

◆ midiAction()

NamedEventList * Ms::Instrument::midiAction ( const QString &  s,
int  channel 
) const

◆ midiActions()

const QList<NamedEventList>& Ms::Instrument::midiActions ( ) const
inline

◆ minPitchA()

int Ms::Instrument::minPitchA ( ) const

◆ minPitchP()

int Ms::Instrument::minPitchP ( ) const

◆ operator=()

void Ms::Instrument::operator= ( const Instrument i)

◆ operator==()

bool Ms::Instrument::operator== ( const Instrument i) const

◆ playbackChannel() [1/2]

Channel * Ms::Instrument::playbackChannel ( int  idx,
MasterScore score 
)

◆ playbackChannel() [2/2]

const Channel * Ms::Instrument::playbackChannel ( int  idx,
const MasterScore score 
) const

◆ read()

void Ms::Instrument::read ( XmlReader e,
Part part 
)

◆ readProperties()

bool Ms::Instrument::readProperties ( XmlReader e,
Part part,
bool *  customDrumset 
)

◆ setAmateurPitchRange()

void Ms::Instrument::setAmateurPitchRange ( int  a,
int  b 
)
inline

◆ setArticulation()

void Ms::Instrument::setArticulation ( const QList< MidiArticulation > &  l)
inline

◆ setClefType()

void Ms::Instrument::setClefType ( int  staffIdx,
const ClefTypeList c 
)

◆ setDrumset()

void Ms::Instrument::setDrumset ( const Drumset ds)

◆ setInstrumentId()

void Ms::Instrument::setInstrumentId ( const QString &  instrumentId)
inline

◆ setLongName()

void Ms::Instrument::setLongName ( const QString &  f)

◆ setMaxPitchA()

void Ms::Instrument::setMaxPitchA ( int  v)
inline

◆ setMaxPitchP()

void Ms::Instrument::setMaxPitchP ( int  v)
inline

◆ setMidiActions()

void Ms::Instrument::setMidiActions ( const QList< NamedEventList > &  l)
inline

◆ setMinPitchA()

void Ms::Instrument::setMinPitchA ( int  v)
inline

◆ setMinPitchP()

void Ms::Instrument::setMinPitchP ( int  v)
inline

◆ setProfessionalPitchRange()

void Ms::Instrument::setProfessionalPitchRange ( int  a,
int  b 
)
inline

◆ setShortName()

void Ms::Instrument::setShortName ( const QString &  f)

◆ setSingleNoteDynamics()

void Ms::Instrument::setSingleNoteDynamics ( bool  val)
inline

◆ setSingleNoteDynamicsFromTemplate()

void Ms::Instrument::setSingleNoteDynamicsFromTemplate ( )

◆ setStringData()

void Ms::Instrument::setStringData ( const StringData d)
inline

◆ setTrackName()

void Ms::Instrument::setTrackName ( const QString &  s)

◆ setTranspose()

void Ms::Instrument::setTranspose ( const Interval v)
inline

◆ setUseDrumset()

void Ms::Instrument::setUseDrumset ( bool  val)

◆ shortNames() [1/2]

const QList< StaffName > & Ms::Instrument::shortNames ( ) const

◆ shortNames() [2/2]

QList< StaffName > & Ms::Instrument::shortNames ( )

◆ singleNoteDynamics()

bool Ms::Instrument::singleNoteDynamics ( ) const
inline

◆ stringData()

const StringData* Ms::Instrument::stringData ( ) const
inline

◆ switchExpressive()

void Ms::Instrument::switchExpressive ( MasterScore score,
Synthesizer synth,
bool  expressive,
bool  force = false 
)

◆ trackName()

QString Ms::Instrument::trackName ( ) const

◆ transpose()

Interval Ms::Instrument::transpose ( ) const
inline

◆ updateGateTime()

void Ms::Instrument::updateGateTime ( int *  gateTime,
int  channelIdx,
const QString &  name 
)

◆ updateVelocity()

void Ms::Instrument::updateVelocity ( int *  velocity,
int  channel,
const QString &  name 
)

◆ useDrumset()

bool Ms::Instrument::useDrumset ( ) const
inline

◆ write()

void Ms::Instrument::write ( XmlWriter xml,
const Part part 
) const

Member Data Documentation

◆ _articulation

QList<MidiArticulation> Ms::Instrument::_articulation
private

◆ _channel

QList<Channel*> Ms::Instrument::_channel
private

◆ _clefType

QList<ClefTypeList> Ms::Instrument::_clefType
private

◆ _drumset

Drumset* Ms::Instrument::_drumset
private

◆ _instrumentId

QString Ms::Instrument::_instrumentId
private

◆ _longNames

StaffNameList Ms::Instrument::_longNames
private

◆ _maxPitchA

char Ms::Instrument::_maxPitchA
private

◆ _maxPitchP

char Ms::Instrument::_maxPitchP
private

◆ _midiActions

QList<NamedEventList> Ms::Instrument::_midiActions
private

◆ _minPitchA

char Ms::Instrument::_minPitchA
private

◆ _minPitchP

char Ms::Instrument::_minPitchP
private

◆ _shortNames

StaffNameList Ms::Instrument::_shortNames
private

◆ _singleNoteDynamics

bool Ms::Instrument::_singleNoteDynamics
private

◆ _stringData

StringData Ms::Instrument::_stringData
private

◆ _trackName

QString Ms::Instrument::_trackName
private

◆ _transpose

Interval Ms::Instrument::_transpose
private

◆ _useDrumset

bool Ms::Instrument::_useDrumset
private

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