|
Canorus 0.0
|
Class which represents a voice in the staff. More...
#include <voice.h>
Private Member Functions | |
| bool | addNoteToChord (CANote *note, CANote *referenceNote) |
| bool | insertMusElement (CAMusElement *before, CAMusElement *elt) |
| bool | updateTimes (int idx, int length, bool signsToo=false) |
Private Attributes | |
| QList< CAMusElement * > | _musElementList |
| CAStaff * | _staff |
| CANote::CAStemDirection | _stemDirection |
| QList< CALyricsContext * > | _lyricsContextList |
| QString | _name |
| unsigned char | _midiChannel |
| unsigned char | _midiProgram |
| char | _midiPitchOffset |
Friends | |
| class | CAStaff |
Class which represents a voice in the staff.
Copyright (c) 2006-2008, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.
CAVoice is a class which holds music elements in the staff. In hieararchy, staff includes multiple voices and every voice includes multiple music elements.
| CAVoice::CAVoice | ( | const QString | name, |
| CAStaff * | staff, | ||
| CANote::CAStemDirection | stemDirection = CANote::StemNeutral |
||
| ) |
Creates a new voice named name, in staff, voiceNumber and stemDirection of notes stems. Voice number starts at 1.
References _midiChannel, _midiPitchOffset, _midiProgram, _name, _staff, _stemDirection, CAMidiDevice::freeMidiChannel(), name(), CAContext::sheet(), staff(), and stemDirection().
Referenced by clone().


| CAVoice::~CAVoice | ( | ) |
Clears and destroys the current voice. This also destroys all non-shared music elements held by the voice.
References clear(), lyricsContextList(), CAStaff::removeVoice(), and staff().

|
inline |
References _lyricsContextList.
Referenced by CAMusicXmlImport::readNote(), CALyricsContext::setAssociatedVoice(), and CAMainWin::sourceViewCommit().

|
inline |
References _lyricsContextList.
Adds a note to an already existing referenceNote chord or a single note and creates a chord out of it. Notes in a chord always need to be sorted by pitch rising. Chord in Canorus isn't its own structure but simply a list of notes sharing the same start time.
The inserted note properteis timeStart, timeLength, dotted and playableLength change according to other notes in the chord.
Returns True, if a referenceNote was found and a note was added; otherwise False.
References _musElementList, CANote::diatonicPitch(), CANote::getChord(), CADiatonicPitch::noteName(), CAPlayable::playableLength(), CAPlayable::setPlayableLength(), CANote::setStemDirection(), CAMusElement::setTimeLength(), CAMusElement::setTimeStart(), CANote::stemDirection(), CAMusElement::timeLength(), and CAMusElement::timeStart().
Referenced by append(), and insert().


| void CAVoice::append | ( | CAMusElement * | elt, |
| bool | addToChord = false |
||
| ) |
Appends a music element elt at the end of the voice.
If addToChord is True and the appended element is note, the note is added to the chord instead of added after the chord. If appended element is rest, addToChord is ignored.
Appended element's timeStart is changed respectively.
References addNoteToChord(), insertMusElement(), musElementList(), CAMusElement::musElementType(), CAMusElement::Note, CAMusElement::setTimeStart(), CAMusElement::timeEnd(), and CAMusElement::timeStart().
Referenced by CAMusicXmlImport::addVoiceIfNeeded(), CAMainWin::copySelection(), CACanorusMLImport::endElement(), CALilyPondImport::importVoiceImpl(), CAKeybdInput::midiInEventToScore(), CAMusicXmlImport::readForward(), CAMusicXmlImport::readNote(), CAMidiImport::writeMidiChannelEventsToVoice_New(), and CAMidiImport::writeMidiFileEventsToScore_New().


| bool CAVoice::binarySearch_startTime | ( | int | time, |
| int & | position | ||
| ) |
\A common binary search Algorithm with its pseudocode
References _musElementList.
| void CAVoice::clear | ( | ) |
Destroys all non-shared music elements held by the voice.
When clearing the whole staff, make sure the voice is deleted. It is automatically removed from the staff - in voice's destructor.
References _musElementList, and staff().
Referenced by ~CAVoice().


Clones the current voice including all the music elements. Sets the voice staff to newStaff. If none given, use the original staff.
References CAVoice(), cloneVoiceProperties(), name(), and setStaff().

| void CAVoice::cloneVoiceProperties | ( | CAVoice * | voice | ) |
Sets the properties of the given voice to this voice.
References lyricsContextList(), midiChannel(), midiPitchOffset(), midiProgram(), name(), setLyricsContexts(), setMidiChannel(), setMidiPitchOffset(), setMidiProgram(), setName(), setStaff(), setStemDirection(), staff(), and stemDirection().
Referenced by clone(), and CALilyPondImport::importVoiceImpl().


| bool CAVoice::containsPitch | ( | CADiatonicPitch | p, |
| int | timeStart | ||
| ) |
Returns true, if this voice contains a note with the given diatonic pitch at the given timeStart.
This is useful when inserting a note and there needs to be determined if a user is adding a note to a chord and the note is maybe already there.
References _musElementList, and CAMusElement::Note.
| bool CAVoice::containsPitch | ( | int | noteName, |
| int | timeStart | ||
| ) |
Returns true, if this voice contains a note with the given pitch notename at the given timeStart.
This is useful when inserting a note and there needs to be determined if a user is adding a note to a chord and the note is maybe already there. Note's accidentals are ignored.
References _musElementList, and CAMusElement::Note.
Referenced by CAMainWin::insertMusElementAt().

| QList< CAMusElement * > CAVoice::getBar | ( | int | time | ) |
Returns a list of music elements inside the given bar. The return list consists of all music elements between two barlines excluding the first barline. Expression marks and other non-standalone elements are excluded as well. The parameter time is any time of music elements inside the bar.
This function is usually called when double clicking on the score.
References CAMusElement::Barline, getChord(), CAMusElement::musElementType(), next(), and previous().

| QList< CAPlayable * > CAVoice::getChord | ( | int | time | ) |
Returns a list of notes and rests (chord) in the given voice in the given time slice time.
This is useful for determination of the harmony at certain point in time.
References _musElementList, getChord(), and CAMusElement::Note.
Referenced by getBar(), getChord(), getTempo(), insert(), CAKeybdInput::midiInEventToScore(), and synchronizeMusElements().


| CAClef * CAVoice::getClef | ( | CAMusElement * | elt | ) |
Returns a pointer to the clef which the given elt belongs to. Returns 0, if no clefs placed yet.
Warning! This operation is slow (linear time), but always returns the correct clef depending on the order of the musElementList. If a timeBased result suffices, use CAStaff::getClef(time).
References CAMusElement::Clef, lastMusElement(), musElementList(), CAMusElement::musElementType(), and previous().

| QList< CAMusElement * > CAVoice::getClef | ( | int | startTime | ) |
Returns a list of pointers to key signatures which have the given startTime. This is useful for querying for eg. If a new key signature exists at the certain point in time.
References CAStaff::clefRefs(), and staff().

| QList< CAMusElement * > CAVoice::getEltByType | ( | CAMusElement::CAMusElementType | type, |
| int | startTime | ||
| ) |
Returns a list of pointers to actual music elements which have the given startTime and are of given type. This is useful for querying for eg. If a new key signature exists at the certain point in time.
References _musElementList.
| CAKeySignature * CAVoice::getKeySig | ( | CAMusElement * | elt | ) |
Returns a pointer to the key signature which the given elt belongs to. Returns 0, if no key signatures placed yet.
Warning! This operation is slow (linear time), but always returns the correct keySig depending on the order of the musElementList. If a timeBased result suffices, use CAStaff::getClef(time).
References CAMusElement::KeySignature, lastMusElement(), musElementList(), CAMusElement::musElementType(), and previous().
Referenced by CAMainWin::scoreViewKeyPress().


| QList< CAMusElement * > CAVoice::getKeySignature | ( | int | startTime | ) |
Returns a list of pointers to key signatures which have the given startTime. This is useful for querying for eg. If a new key signature exists at the certain point in time.
References CAStaff::keySignatureRefs(), and staff().

| QList< CANote * > CAVoice::getNoteList | ( | ) |
Generates a list of all the notes and chords in the voice.
This is useful for harmony analysis.
References _musElementList, and CAMusElement::Note.
Referenced by CAMainWin::insertMusElementAt(), CALyricsContext::repositSyllables(), and CANote::updateTies().

| CAMusElement * CAVoice::getOneEltByType | ( | CAMusElement::CAMusElementType | type, |
| int | startTime | ||
| ) |
Returns a music element which has the given startTime and type. This is useful for querying for eg. If a barline exists at the certain point in time.
References _musElementList.
| CAMusElement * CAVoice::getOnePreviousByType | ( | CAMusElement::CAMusElementType | type, |
| int | startTime | ||
| ) |
Returns a music elements which is at or left (not past) the given startTime and of given type. This is useful for querying for eg. which is the barline before a certain point in time.
References _musElementList.
Referenced by CAMidiImport::writeMidiChannelEventsToVoice_New().

| QList< CAMusElement * > CAVoice::getPreviousByType | ( | CAMusElement::CAMusElementType | type, |
| int | startTime | ||
| ) |
Returns a list of pointers to actual music elements which are at or left (not past) the given startTime and are of given type. This is useful for querying for eg. which key pitch is in effect before a certain point in time.
A list from time 0 until startTime is created which is questionable regarding need and efficiency.
References _musElementList.
Referenced by CAKeybdInput::matchPitchToKey(), and CAMidiImport::matchPitchToKey().

| QList< CAMusElement * > CAVoice::getPreviousClef | ( | int | startTime | ) |
Returns a list of pointers to clefs which are at or left (not past) the given startTime. This is useful for querying for eg. which clef is in effect before a certain point in time.
References CAStaff::clefRefs(), and staff().

| QList< CAMusElement * > CAVoice::getPreviousKeySignature | ( | int | startTime | ) |
Returns a list of pointers to key signatures which are at or left (not past) the given startTime. This is useful for querying for eg. which key signature is in effect before a certain point in time.
References CAStaff::keySignatureRefs(), and staff().

| QList< CAMusElement * > CAVoice::getPreviousTimeSignature | ( | int | startTime | ) |
Returns a list of pointers to key signatures which are at or left (not past) the given startTime. This is useful for querying for eg. which key signature is in effect before a certain point in time.
References staff(), and CAStaff::timeSignatureRefs().

| QList< CAMusElement * > CAVoice::getSignList | ( | ) |
Generates a list of all the notes and chords in the voice.
This is useful when importing a specific voice and all the shared elements should be completely repositioned.
References _musElementList.
Referenced by CAMainWin::sourceViewCommit().

| CATempo * CAVoice::getTempo | ( | int | time | ) |
Returns the Tempo element active at the given time.
References getChord(), musElementList(), and CAMark::Tempo.

| CATimeSignature * CAVoice::getTimeSig | ( | CAMusElement * | elt | ) |
Returns a pointer to the time signature which the given elt belongs to. Returns 0, if no time signatures placed yet.
Warning! This operation is slow (linear time), but always returns the correct timeSig depending on the order of the musElementList. If a timeBased result suffices, use CAStaff::getClef(time).
References lastMusElement(), musElementList(), CAMusElement::musElementType(), previous(), and CAMusElement::TimeSignature.

| QList< CAMusElement * > CAVoice::getTimeSignature | ( | int | startTime | ) |
Returns a list of pointers to key signatures which have the given startTime. This is useful for querying for eg. If a new key signature exists at the certain point in time.
References staff(), and CAStaff::timeSignatureRefs().

| bool CAVoice::insert | ( | CAMusElement * | eltAfter, |
| CAMusElement * | elt, | ||
| bool | addToChord = false |
||
| ) |
Adds the given element elt to the voice before the given eltAfter. If eltAfter is null, the element is appended.
If elt is non-playable, it eventually does the same as insertMusElement().
If elt is a note and addToChord is True, the eltAfter should also be a note and the elt is then added to the chord which eltAfter is part of.
If elt is other playable element, it is appropriately added before the eltAfter. addToChord is ignored.
Inserted element's timeStart is correctly changed.
Returns True, if the insertion action was successfully made, otherwise False.
References addNoteToChord(), CAMusElement::Clef, CANote::diatonicPitch(), CANote::getChord(), getChord(), insertMusElement(), CAMusElement::isPlayable(), lastTimeEnd(), musElementList(), CAMusElement::musElementType(), CAMusElement::Note, CAMusElement::setTimeStart(), CAMusElement::timeLength(), CAMusElement::timeStart(), and updateTimes().
Referenced by CATuplet::assignTimes(), CAMusElementFactory::configureNote(), CAMusElementFactory::configureRest(), CAMainWin::deleteSelection(), insertInTupletAndVoiceAt(), CAMainWin::insertMusElementAt(), CAKeybdInput::midiInEventToScore(), CAMainWin::on_uiPlayableLength_toggled(), CAStaff::placeAutoBar(), CATuplet::resetTimes(), and CAMainWin::scoreViewKeyPress().


| CAPlayable * CAVoice::insertInTupletAndVoiceAt | ( | CAPlayable * | reference, |
| CAPlayable * | p | ||
| ) |
Inserts a note/rest in a tuplet/voice. If the result should not be a chord the element found will be deleted and replaced. This function probably should also work for non tuplets.
Currently only adding notes, and with the basic tuplet timelength are implemented.
References CATuplet::addNote(), CATuplet::assignTimes(), insert(), next(), remove(), CATuplet::removeNote(), CAMusElement::Rest, CAMusElement::setTimeStart(), CAPlayable::setTuplet(), CAMusElement::timeStart(), CAPlayable::tuplet(), and CAPlayable::voice().
Referenced by CAKeybdInput::midiInEventToScore().


|
private |
Inserts the elt before the given eltAfter. If eltAfter is Null, it appends the element.
Returns True, if eltAfter was found and the elt was inserted/appended; otherwise False.
References _musElementList, CAMusElement::Barline, CAStaff::barlineRefs(), CAMusElement::Clef, CAStaff::clefRefs(), CAMusElement::KeySignature, CAStaff::keySignatureRefs(), musElementList(), CAMusElement::musElementType(), next(), nextByType(), CAMusElement::Slur, staff(), CAMusElement::TimeSignature, and CAStaff::timeSignatureRefs().
Referenced by append(), and insert().


|
inline |
|
inline |
References musElementList().
Referenced by getClef(), getKeySig(), getTimeSig(), CALilyPondImport::importVoiceImpl(), CAKeybdInput::midiInEventToScore(), and CAMidiImport::writeMidiChannelEventsToVoice_New().


| CANote * CAVoice::lastNote | ( | ) |
Returns the note in the voice.
References _musElementList, and CAMusElement::Note.
Referenced by CAMusElementFactory::configureNote(), and CACanorusMLImport::endElement().

| CADiatonicPitch CAVoice::lastNotePitch | ( | bool | inChord = false | ) |
Returns the pitch of the last note in the voice (default) or of the first note in the last chord, if inChord is true.
This method is usually used by LilyPond parser when exporting the document, where , or ' octave marks need to be determined.
References _musElementList, CAMusElement::Clef, CANote::diatonicPitch(), and CAMusElement::Note.

| CAPlayable * CAVoice::lastPlayableElt | ( | ) |
Returns the last playable element (eg. note or rest) in the voice.
References _musElementList.
Referenced by CAKeybdInput::midiInEventToScore().

|
inline |
References musElementList().
Referenced by insert(), CAMainWin::insertMusElementAt(), CAKeybdInput::matchPitchToKey(), CAMidiImport::matchPitchToKey(), CAKeybdInput::midiInEventToScore(), CAMusicXmlImport::readForward(), and CAMidiImport::writeMidiChannelEventsToVoice_New().


|
inline |
References musElementList().
Referenced by CAKeybdInput::midiInEventToScore().


|
inline |
References _lyricsContextList.
Referenced by cloneVoiceProperties(), CAMusElementFactory::configureNote(), CAMusElementFactory::configureRest(), CAMainWin::deleteSelection(), CAMainWin::on_uiPlayableLength_toggled(), CAMusicXmlImport::readNote(), CAMainWin::scoreViewKeyPress(), and ~CAVoice().

|
inline |
References _midiChannel.
Referenced by cloneVoiceProperties(), CACanorusMLExport::exportDocumentImpl(), CAPlayback::playSelectionImpl(), CAPlayback::run(), and CAPropertiesDialog::updateVoiceProperties().

|
inline |
References _midiPitchOffset.
Referenced by cloneVoiceProperties(), CACanorusMLExport::exportDocumentImpl(), CAPlayback::playSelectionImpl(), CAPlayback::run(), setMidiPitchOffset(), and CAPropertiesDialog::updateVoiceProperties().

|
inline |
References _midiProgram.
Referenced by cloneVoiceProperties(), CACanorusMLExport::exportDocumentImpl(), CAPlayback::playSelectionImpl(), and CAMainWin::updateVoiceToolBar().

|
inline |
Returns the list of music elements in the voice.
References _musElementList.
Referenced by append(), CALilyPondExport::doAnacrusisCheck(), CACanorusMLImport::endElement(), CAMusicXmlExport::exportMeasure(), CALilyPondExport::exportVoiceImpl(), CACanorusMLExport::exportVoiceImpl(), CANote::getChord(), getClef(), getKeySig(), getTempo(), getTimeSig(), insert(), insertMusElement(), CANote::isFirstInChord(), CANote::isLastInChord(), CANote::isPartOfChord(), lastMusElement(), lastTimeEnd(), lastTimeStart(), CAKeybdInput::midiInEventToScore(), next(), previous(), remove(), synchronizeMusElements(), updateTimes(), and CALilyPondExport::writeRelativeIntro().

|
inline |
References _name.
Referenced by CAVoice(), clone(), cloneVoiceProperties(), CACanorusMLExport::exportDocumentImpl(), CALilyPondExport::exportStaffVoices(), CAMainWin::on_uiRemoveVoice_triggered(), CAMusicXmlImport::readNote(), setName(), and CAMainWin::updateVoiceToolBar().

| CAMusElement * CAVoice::next | ( | CAMusElement * | elt | ) |
Returns pointer to the music element after the given elt or 0, if the next music element doesn't exist.
If \elt is null, it returns the first element in the voice.
References _musElementList, and musElementList().
Referenced by CATuplet::assignTimes(), CAMainWin::deleteSelection(), getBar(), insertInTupletAndVoiceAt(), insertMusElement(), CAMainWin::insertMusElementAt(), nextByType(), CAMainWin::on_uiPlayableLength_toggled(), CATuplet::resetTimes(), CAMainWin::scoreViewKeyPress(), and CAScoreView::selectNextMusElement().


| CAMusElement * CAVoice::nextByType | ( | CAMusElement::CAMusElementType | type, |
| CAMusElement * | elt | ||
| ) |
Returns the first element of type type after the given elt or Null if such an element doesn't exist.
If elt is Null, it returns the first element with such a type in the voice.
References CAMusElement::musElementType(), and next().
Referenced by insertMusElement().


| CANote * CAVoice::nextNote | ( | int | timeStart | ) |
Returns a pointer to the next note with the strictly higher timeStart than the given one. Returns 0, if the such a note doesn't exist.
References _musElementList, and CAMusElement::Note.
| CAPlayable * CAVoice::nextPlayable | ( | int | timeStart | ) |
Returns a pointer to the next playable element with the strictly higher timeStart than the given one. Returns 0, if the such a note doesn't exist.
References _musElementList.
Referenced by CAMainWin::deleteSelection().

| CARest * CAVoice::nextRest | ( | int | timeStart | ) |
Returns a pointer to the next rest with the strictly higher timeStart than the given one. Returns 0, if the such a note doesn't exist.
References _musElementList, and CAMusElement::Rest.
| CAMusElement * CAVoice::previous | ( | CAMusElement * | elt | ) |
Returns pointer to the music element before the given elt or 0, if the previous music element doesn't exist.
If \elt is null, it returns the last element in the voice.
References _musElementList, and musElementList().
Referenced by getBar(), getClef(), getKeySig(), getTimeSig(), previousByType(), and CAScoreView::selectPrevMusElement().


| CAMusElement * CAVoice::previousByType | ( | CAMusElement::CAMusElementType | type, |
| CAMusElement * | elt | ||
| ) |
Returns the first element of type type before the given elt or Null if such an element doesn't exist.
If elt is Null, it returns the last element with such a type in the voice.
References CAMusElement::musElementType(), and previous().
Referenced by CAKeybdInput::midiInEventToScore(), CAStaff::placeAutoBar(), and CAMidiImport::writeMidiChannelEventsToVoice_New().


| CANote * CAVoice::previousNote | ( | int | timeStart | ) |
Returns a pointer to the previous note with the strictly lower timeStart than the given one. Returns 0, if the such a note doesn't exist.
References _musElementList, and CAMusElement::Note.
Referenced by CAMusicXmlImport::readNote().

| CAPlayable * CAVoice::previousPlayable | ( | int | timeStart | ) |
Returns a pointer to the previous playable with the strictly lower timeStart than the given one. Returns 0, if the such a note doesn't exist.
References _musElementList.
| CARest * CAVoice::previousRest | ( | int | timeStart | ) |
Returns a pointer to the previous rest with the strictly lower timeStart than the given one. Returns 0, if the such a note doesn't exist.
References _musElementList, and CAMusElement::Rest.
| bool CAVoice::remove | ( | CAMusElement * | elt, |
| bool | updateSigns = true |
||
| ) |
Removes the given music element elt from this voice, if the element is playable or from all the voices in the staff, if non-playable and part of the staff.
If updateSigns is True, startTimes of elements after the removed one are decreased including the shared signs. Otherwise only timeStarts for playable elements are effected.
Returns true, if the element was found and removed; otherwise false.
References _musElementList, CAMusElement::addMark(), CAMusElement::Barline, CAStaff::barlineRefs(), CAMusElement::Clef, CAStaff::clefRefs(), CANote::getChord(), CANote::isFirstInChord(), CANote::isPartOfChord(), CAMusElement::isPlayable(), CAMusElement::KeySignature, CAStaff::keySignatureRefs(), CAMusElement::markList(), musElementList(), CAMusElement::musElementType(), CAMusElement::Note, CANote::phrasingSlurEnd(), CANote::phrasingSlurStart(), CAMusElement::removeMark(), CANote::setPhrasingSlurEnd(), CANote::setPhrasingSlurStart(), CANote::setSlurEnd(), CANote::setSlurStart(), CANote::slurEnd(), CANote::slurStart(), staff(), CAMusElement::timeLength(), CAMusElement::TimeSignature, CAStaff::timeSignatureRefs(), CAPlayable::tuplet(), updateTimes(), and CAStaff::voiceList().
Referenced by CATuplet::assignTimes(), CAMainWin::deleteSelection(), insertInTupletAndVoiceAt(), CAMainWin::insertMusElementAt(), CAMainWin::on_uiPlayableLength_toggled(), CATuplet::resetTimes(), CAMainWin::scoreViewKeyPress(), CAMainWin::sourceViewCommit(), and CAPlayable::~CAPlayable().


|
inline |
References _lyricsContextList.
Referenced by CASheet::clone(), CALyricsContext::setAssociatedVoice(), CAMainWin::sourceViewCommit(), and CALyricsContext::~CALyricsContext().

|
inline |
References _lyricsContextList.
Referenced by cloneVoiceProperties().

|
inline |
References _midiChannel.
Referenced by CAPropertiesDialog::applyProperties(), cloneVoiceProperties(), CACanorusMLImport::startElement(), and CAMidiImport::writeMidiFileEventsToScore_New().

|
inline |
References _midiPitchOffset, and midiPitchOffset().
Referenced by CAPropertiesDialog::applyProperties(), cloneVoiceProperties(), and CACanorusMLImport::startElement().


|
inline |
References _midiProgram.
Referenced by cloneVoiceProperties(), CAMainWin::on_uiVoiceInstrument_activated(), CACanorusMLImport::startElement(), and CAMidiImport::writeMidiChannelEventsToVoice_New().

|
inline |
Referenced by cloneVoiceProperties(), and CAMainWin::on_uiVoiceName_returnPressed().


|
inline |
References _staff, and staff().
Referenced by clone(), and cloneVoiceProperties().


|
inline |
Sets the stem direction and update slur directions in all the notes in the voice.
References _stemDirection.
Referenced by cloneVoiceProperties(), and CAMainWin::on_uiVoiceStemDirection_toggled().

|
inline |
References _staff.
Referenced by CAMusicXmlImport::addVoiceIfNeeded(), CAVoice(), clear(), cloneVoiceProperties(), CAMusElementFactory::configureNote(), CALilyPondExport::exportScoreBlock(), CAKDTree< T >::findNearestLeft(), CAKDTree< T >::findNearestRight(), CALilyPondImport::findSharedElement(), getClef(), getKeySignature(), getPreviousClef(), getPreviousKeySignature(), getPreviousTimeSignature(), getTimeSignature(), insertMusElement(), CANote::notePosition(), CAMainWin::on_uiRedo_toggled(), CAMainWin::on_uiRemoveVoice_triggered(), CAMainWin::on_uiUndo_toggled(), CAMainWin::pasteAt(), CAStaff::placeAutoBar(), CAMusicXmlImport::readNote(), remove(), CAMainWin::removeSheet(), CALayoutEngine::reposit(), CAMainWin::scoreViewKeyPress(), CAMainWin::scoreViewMouseRelease(), CAMainWin::setCurrentVoice(), setStaff(), CAPlayable::setVoice(), CAMainWin::sourceViewCommit(), CACanorusMLImport::startElement(), voiceNumber(), CAPropertiesDialog::voiceProperties(), and ~CAVoice().

|
inline |
References _stemDirection.
Referenced by CANote::actualStemDirection(), CAVoice(), cloneVoiceProperties(), CACanorusMLExport::exportDocumentImpl(), CAMusicXmlExport::exportNote(), CAMainWin::on_uiVoiceStemDirection_toggled(), and CAMainWin::updateVoiceToolBar().

| bool CAVoice::synchronizeMusElements | ( | ) |
Fixes any inconsistencies between music elements: 1) If a common (shared) mark is present only in non-first note of the chord, it's moved and assigned to first note in the chord. The exception are non-common marks (eg. fingering), which are assigned to each note separately.
Returns True, if fixes were made or False otherwise.
References getChord(), musElementList(), and CAMusElement::Note.
Referenced by CAKeybdInput::midiInEventToScore().


|
private |
Updates times of playable elements and optionally signsToo after and including the given index idx for a delta length. The order of the elements stays intact.
This method is usually called when inserting, removing or changing the music elements so they affect others.
References CAMark::isCommon(), musElementList(), CAMusElement::Note, and CAMusElement::setTimeStart().
Referenced by insert(), and remove().


|
inline |
Voice number in the staff starting at 1.
Voice number is 1, if no staff defined.
References staff(), and CAStaff::voiceList().
Referenced by CAMusicXmlExport::exportMeasure(), isFirstVoice(), CAMainWin::scoreViewKeyPress(), and CAMainWin::sourceViewCommit().


|
friend |
|
private |
Referenced by addLyricsContext(), addLyricsContexts(), lyricsContextList(), removeLyricsContext(), and setLyricsContexts().
|
private |
Referenced by CAVoice(), midiChannel(), and setMidiChannel().
|
private |
Referenced by CAVoice(), midiPitchOffset(), and setMidiPitchOffset().
|
private |
Referenced by CAVoice(), midiProgram(), and setMidiProgram().
|
private |
Referenced by addNoteToChord(), binarySearch_startTime(), clear(), containsPitch(), getChord(), getEltByType(), getNoteList(), getOneEltByType(), getOnePreviousByType(), getPreviousByType(), getSignList(), insertMusElement(), lastNote(), lastNotePitch(), lastPlayableElt(), musElementList(), next(), nextNote(), nextPlayable(), nextRest(), previous(), previousNote(), previousPlayable(), previousRest(), and remove().
|
private |
Staff which this voice belongs to.
Referenced by CAVoice(), setStaff(), and staff().
|
private |
Referenced by CAVoice(), setStemDirection(), and stemDirection().