|
Canorus 0.0
|
#include <lilypondimport.h>

Classes | |
| struct | CATime |
Private Types | |
| enum | CALilyPondDepth { Score , Layout , Voice , Chord } |
Private Attributes | |
| CAVoice * | _curVoice |
| CASlur * | _curSlur |
| CASlur * | _curPhrasingSlur |
| QStack< CALilyPondDepth > | _depth |
| int | _curLine |
| int | _curChar |
| QList< QString > | _errors |
| QList< QString > | _warnings |
| CAVoice * | _templateVoice |
| CADocument * | _document |
Static Private Attributes | |
| static const QRegExp | WHITESPACE_DELIMITERS = QRegExp("[\\s]") |
| static const QRegExp | SYNTAX_DELIMITERS = QRegExp("[<>{}]") |
| static const QRegExp | DELIMITERS |
Additional Inherited Members | |
Signals inherited from CAImport | |
| void | documentImported (CADocument *) |
| void | sheetImported (CASheet *) |
| void | staffImported (CAStaff *) |
| void | voiceImported (CAVoice *) |
| void | lyricsContextImported (CALyricsContext *) |
| void | functionMarkContextImported (CAFunctionMarkContext *) |
| void | importDone (int status) |
Protected Member Functions inherited from CAImport | |
| virtual CADocument * | importDocumentImpl () |
| virtual CASheet * | importSheetImpl () |
| virtual CAStaff * | importStaffImpl () |
| virtual CAVoice * | importVoiceImpl () |
| virtual CALyricsContext * | importLyricsContextImpl () |
| virtual CAFunctionMarkContext * | importFunctionMarkContextImpl () |
| QTextStream & | in () |
Protected Member Functions inherited from CAFile | |
| void | setStatus (const int status) |
| void | setProgress (const int progress) |
| QTextStream * | stream () |
| virtual void | setStream (QTextStream *stream) |
| QFile * | file () |
| void | setFile (QFile *file) |
Protected Attributes inherited from CAImport | |
| QString | _fileName |
|
private |
| CALilyPondImport::CALilyPondImport | ( | const QString | in | ) |
| CALilyPondImport::CALilyPondImport | ( | QTextStream * | in = 0 | ) |
| CALilyPondImport::CALilyPondImport | ( | CADocument * | document, |
| QTextStream * | in = 0 |
||
| ) |
|
virtual |
|
private |
|
private |
Genarates barline type from the LilyPond syntax for the given barline from format "barlineType".
References CABarline::Dotted, CABarline::Double, CABarline::End, CABarline::RepeatClose, CABarline::RepeatCloseOpen, CABarline::RepeatOpen, CABarline::Single, and CABarline::Undefined.
Referenced by importVoiceImpl().

|
private |
Returns the Canorus octava or whichever interval above or below the clef.
Referenced by importVoiceImpl().

|
inlineprivate |
References _curChar.
Referenced by addError(), and readableStatus().

|
inlineprivate |
|
inlineprivate |
References _curLine.
Referenced by addError(), and readableStatus().

|
inlineprivate |
References _curVoice.
Referenced by findSharedElement(), and importVoiceImpl().

|
private |
Returns the key signature gender from format \genderType.
References CADiatonicKey::Major, and CADiatonicKey::Minor.
Referenced by importVoiceImpl().

|
private |
Gathers a list of music elements with the given element's start time and returns the first music element in the gathered list with the same attributes.
This method is usually called when voices have "shared" music elements (barlines, clefs etc.). However, in LilyPond syntax the music element can/should be present in all the voices. This function finds this shared music element, if it already exists.
If the music element with the same properties exists, user should delete its own instance and add an already existing instance of the returned shared music element to the voice.
References curVoice(), CAStaff::getEltByType(), CAMusElement::musElementType(), CAVoice::staff(), and CAMusElement::timeStart().
Referenced by importVoiceImpl().


|
privatevirtual |
Reimplemented from CAImport.
References CALyricsContext::addSyllable(), in(), parseNextElement(), peekNextElement(), CALyricsContext::repositSyllables(), CASyllable::setHyphenStart(), and CASyllable::setMelismaStart().

|
virtual |
Reimplemented from CAImport.
References _document, CAImport::fileName(), in(), parseNextElement(), CASheet::setName(), and CAFile::stream().

|
privatevirtual |
Reimplemented from CAImport.
References _curPhrasingSlur, _curSlur, addError(), CAVoice::append(), barlineTypeFromLilyPond(), CALilyPondImport::CATime::beat, CALilyPondImport::CATime::beats, Chord, clefOffsetFromLilyPond(), CAVoice::cloneVoiceProperties(), curDepth(), curVoice(), diatonicKeyGenderFromLilyPond(), CANote::diatonicPitch(), findSharedElement(), in(), isNote(), isRest(), CAVoice::lastMusElement(), CAMusElement::musElementTypeToString(), CAPlayableLength::musicLength(), CAMusElement::Note, parseNextElement(), peekNextElement(), CASlur::PhrasingSlurType, playableLengthFromLilyPond(), popDepth(), predefinedClefTypeFromLilyPond(), pushDepth(), CAPlayableLength::Quarter, relativePitchFromLilyPond(), restTypeFromLilyPond(), setCurVoice(), CASlur::setNoteEnd(), CANote::setPhrasingSlurEnd(), CANote::setPhrasingSlurStart(), CANote::setSlurEnd(), CANote::setSlurStart(), CANote::setTieStart(), CABarline::Single, CASlur::SlurPreferred, CASlur::SlurType, CAPlayable::staff(), templateVoice(), CASlur::TieType, timeSigFromLilyPond(), CABarline::Undefined, CAClef::Undefined, CAPlayableLength::Undefined, CANote::updateTies(), and Voice.

|
inlineprivate |
References CAFile::stream().
Referenced by importLyricsContextImpl(), importSheetImpl(), importVoiceImpl(), parseNextElement(), and peekNextElement().


|
private |
References _curChar, _curLine, _curPhrasingSlur, _curSlur, and _templateVoice.
Referenced by CALilyPondImport().

|
private |
Returns true, if the given LilyPond element is a note.
Referenced by importVoiceImpl().

|
private |
Returns true, if the given LilyPond element is a rest.
Referenced by importVoiceImpl().

|
private |
Returns the first element in input stream ended with one of the delimiters and shorten input stream for the element.
References DELIMITERS, and in().
Referenced by importLyricsContextImpl(), importSheetImpl(), and importVoiceImpl().


|
private |
Returns the first element in input stream ended with one of the delimiters but don't shorten the stream.
References DELIMITERS, and in().
Referenced by importLyricsContextImpl(), and importVoiceImpl().


|
private |
Generates playable lentgth and number of dots from the note/rest string in LilyPond syntax. If the playable element doesn't include length, { CAPlayable::CAPlayableLength::Undefined, 0 } is returned. This function also shortens the given string for the playable length, if parse is True.
References CAPlayableLength::dotted(), CAPlayableLength::setDotted(), and CAPlayableLength::setMusicLength().
Referenced by importVoiceImpl().


|
inlineprivate |
|
private |
Genarates clef type from the LilyPond syntax for the given clef from format "clefType".
References CAClef::Alto, CAClef::Baritone, CAClef::Bass, CAClef::French, CAClef::Mezzosoprano, CAClef::Percussion, CAClef::Soprano, CAClef::Subbass, CAClef::Tablature, CAClef::Tenor, CAClef::Treble, and CAClef::Varbaritone.
Referenced by importVoiceImpl().

|
inlineprivate |
|
virtual |
Reimplemented from CAImport.
References curChar(), curLine(), and CAFile::status().

|
private |
Generates the note pitch and number of accidentals from the note written in LilyPond syntax.
References CADiatonicPitch::noteName().
Referenced by importVoiceImpl().


|
private |
Genarates rest type from the LilyPond syntax for the given rest. This function also shortens the given string for the rest type, if parse is True.
References CARest::Hidden, and CARest::Normal.
Referenced by importVoiceImpl().

|
inlineprivate |
|
inline |
References _templateVoice.
Referenced by CAMainWin::sourceViewCommit().

|
inlineprivate |
References _templateVoice.
Referenced by importVoiceImpl().

|
private |
Returns the time signature beat and beats in beats/beat format.
Referenced by importVoiceImpl().

|
private |
Referenced by addError(), curChar(), and initLilyPondImport().
|
private |
Referenced by addError(), curLine(), and initLilyPondImport().
|
private |
Referenced by importVoiceImpl(), and initLilyPondImport().
|
private |
Referenced by importVoiceImpl(), and initLilyPondImport().
|
private |
Referenced by curVoice(), and setCurVoice().
|
private |
Referenced by curDepth(), popDepth(), and pushDepth().
|
private |
Referenced by CALilyPondImport(), and importSheetImpl().
|
private |
Referenced by addError().
|
private |
Referenced by initLilyPondImport(), setTemplateVoice(), and templateVoice().
|
private |
|
staticprivate |
Combined WHITESPACE_DELIMITERS and SYNTAX_DELIMITERS.
Referenced by parseNextElement(), and peekNextElement().
|
staticprivate |
Delimiters which separate various music elements in LilyPond syntax, but are specific for LilyPond syntax. They are reported as its own element when parsing the next element.
|
staticprivate |
Copyright (c) 2007, 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.
Delimiters which separate various music elements in LilyPond syntax. These are new lines, tabs, blanks etc.