20 #ifndef __MUSICXMLSUPPORT_H__ 21 #define __MUSICXMLSUPPORT_H__ 51 void addNote(
const int startTick,
const int endTick,
const int staff);
52 void dump(
const QString& voice)
const;
70 void incrChordRests(
int s);
71 int numberChordRests()
const;
72 int numberChordRests(
int s)
const {
return (s >= 0 && s < MAX_STAVES) ? _chordRests[s] : 0; }
73 int preferredStaff()
const;
74 void setStaff(
int s) {
if (s >= 0) _staff = s; }
75 int staff()
const {
return _staff; }
76 void setVoice(
int v) {
if (v >= 0) _voice = v; }
77 int voice()
const {
return _voice; }
78 void setVoice(
int s,
int v) {
if (s >= 0 && s < MAX_STAVES) _voices[s] = v; }
79 int voice(
int s)
const {
return (s >= 0 && s < MAX_STAVES) ? _voices[s] : -1; }
82 void setStaffAlloc(
int s,
int i) {
if (s >= 0 && s < MAX_STAVES) _staffAlloc[s] = i; }
83 int staffAlloc(
int s)
const {
return (s >= 0 && s < MAX_STAVES) ? _staffAlloc[s] : -1; }
86 int _chordRests[MAX_STAVES];
90 int _staffAlloc[MAX_STAVES];
91 int _voices[MAX_STAVES];
111 void addNote(
const int startTick,
const int endTick,
const QString& voice,
const int staff);
146 : pitch(-1), name(), midiChannel(-1), midiPort(-1), midiProgram(-1), midiVolume(100), midiPan(63),
149 : pitch(-1), name(s), midiChannel(-1), midiPort(-1), midiProgram(-1), midiVolume(100), midiPan(63),
152 : pitch(p), name(s), midiChannel(-1), midiPort(-1), midiProgram(-1), midiVolume(100), midiPan(63),
153 notehead(nh), line(l), stemDirection(d) {}
170 static int stringToInt(
const QString& s,
bool* ok);
171 static Fraction durationAsFraction(
const int divisions,
const QDomElement e);
172 static Fraction noteTypeToFraction(QString type);
173 static Fraction calculateFraction(QString type,
int dots,
int normalNotes,
int actualNotes);
192 virtual void handleMessage(QtMsgType type,
const QString& description,
193 const QUrl& identifier,
const QSourceLocation& sourceLocation);
198 extern void domError(
const QDomElement&);
int staffAlloc(int s) const
Definition: musicxmlsupport.h:83
int _staff
The MuseScore staff allocated.
Definition: musicxmlsupport.h:87
QList< StartStopList > _staffNoteLists
The note start/stop times in all staves.
Definition: musicxmlsupport.h:56
List of note start/stop times in a voice in all staves.
Definition: musicxmlsupport.h:48
MusicXMLDrumInstrument(QString s)
Definition: musicxmlsupport.h:148
QList< StartStop > StartStopList
Definition: musicxmlsupport.h:38
int numberChordRests(int s) const
Definition: musicxmlsupport.h:72
AccidentalType microtonalGuess(double val)
Convert a MusicXML alter tag into a microtonal accidental in MuseScore enum AccidentalType.
Definition: musicxmlsupport.cpp:565
AccidentalType mxmlString2accidentalType(const QString mxmlName)
Convert a MusicXML accidental name to a MuseScore enum AccidentalType.
Definition: musicxmlsupport.cpp:500
NoteHead::Group notehead
notehead symbol set
Definition: musicxmlsupport.h:139
void setVoice(int s, int v)
Definition: musicxmlsupport.h:78
QString virtName
Definition: musicxmlsupport.h:133
Message handler for the MusicXML schema validator QXmlSchemaValidator.
Definition: musicxmlsupport.h:184
AccidentalType
Definition: types.h:152
SymId
Definition: sym.h:30
void setStaffAlloc(int s, int i)
Definition: musicxmlsupport.h:82
void domError(const QDomElement &e)
Definition: musicxmlsupport.cpp:217
QString sound
Definition: musicxmlsupport.h:131
ValidatorMessageHandler()
Definition: musicxmlsupport.h:189
QString virtLib
Definition: musicxmlsupport.h:132
const char * toString(Direction val)
Definition: mscore.cpp:176
bool overlaps() const
Definition: musicxmlsupport.h:81
QString accidentalType2MxmlString(const AccidentalType type)
Definition: musicxmlsupport.cpp:460
NoteList()
Definition: musicxmlsupport.cpp:31
QMapIterator< QString, MusicXMLDrumInstrument > MusicXMLDrumsetIterator
Definition: musicxmlsupport.h:161
int _voice
The MuseScore voice allocated.
Definition: musicxmlsupport.h:88
int midiChannel
Definition: musicxmlsupport.h:134
int line
place notehead onto this line
Definition: musicxmlsupport.h:140
QString getErrors() const
Definition: musicxmlsupport.h:190
bool _overlaps
This voice contains active notes in multiple staves at the same time.
Definition: musicxmlsupport.h:89
QString errors
Definition: musicxmlsupport.h:195
int midiProgram
Definition: musicxmlsupport.h:136
int pitch
Definition: musicxmlsupport.h:129
SymId mxmlString2accSymId(const QString mxmlName)
Definition: musicxmlsupport.cpp:412
int staff() const
Definition: musicxmlsupport.h:75
void setVoice(int v)
Definition: musicxmlsupport.h:76
A single instrument in a MusicXML part.
Definition: musicxmlsupport.h:128
Definition: aeolus.cpp:26
QPair< int, int > StartStop
List of note start/stop times in a voice in a single staff.
Definition: musicxmlsupport.h:37
bool anyStaffOverlaps() const
Determine if any note in any staff overlaps.
Definition: musicxmlsupport.cpp:91
int midiPan
Definition: musicxmlsupport.h:138
QMap< QString, MusicXMLDrumInstrument > MusicXMLDrumset
A MusicXML drumset or set of instruments in a multi-instrument part.
Definition: musicxmlsupport.h:160
MusicXMLDrumInstrument(int p, QString s, NoteHead::Group nh, int l, Direction d)
Definition: musicxmlsupport.h:151
void setOverlap(bool b)
Definition: musicxmlsupport.h:80
Direction
Definition: types.h:282
int midiVolume
Definition: musicxmlsupport.h:137
void domNotImplemented(const QDomElement &e)
Definition: musicxmlsupport.cpp:239
Definition of classes Note and NoteHead.
QString accSymId2MxmlString(const SymId id)
Definition: musicxmlsupport.cpp:374
bool stavesOverlap(const int staff1, const int staff2) const
Determine if any note in staff1 and staff2 overlaps.
Definition: musicxmlsupport.cpp:76
int voice(int s) const
Definition: musicxmlsupport.h:79
Definition: musicxmlsupport.h:168
Group
Definition: note.h:56
void dump(const QString &voice) const
Definition: musicxmlsupport.cpp:43
QString name
Definition: musicxmlsupport.h:130
QMap< QString, NoteList > _noteLists
The notelists for all the voices.
Definition: musicxmlsupport.h:116
Definition: fraction.h:46
int midiPort
Definition: musicxmlsupport.h:135
Direction stemDirection
Definition: musicxmlsupport.h:141
Detect overlap in a voice, which is when a voice has two or more notes active at the same time...
Definition: musicxmlsupport.h:108
int voice() const
Definition: musicxmlsupport.h:77
void addNote(const int startTick, const int endTick, const int staff)
Definition: musicxmlsupport.cpp:37
MusicXMLDrumInstrument()
Definition: musicxmlsupport.h:145
The description of a single voice in a MusicXML part.
Definition: musicxmlsupport.h:67
void setStaff(int s)
Definition: musicxmlsupport.h:74