2007-05-24 08:52:14 +00:00
|
|
|
//
|
|
|
|
// File: VLLilypondWriter.h
|
|
|
|
//
|
|
|
|
// Author(s):
|
|
|
|
//
|
|
|
|
// (MN) Matthias Neeracher
|
|
|
|
//
|
2018-02-19 00:59:23 +00:00
|
|
|
// Copyright © 2007-2018 Matthias Neeracher
|
2007-05-24 08:52:14 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "VLModel.h"
|
|
|
|
|
|
|
|
class VLLilypondWriter: public VLSongVisitor {
|
|
|
|
public:
|
|
|
|
VLLilypondWriter() {}
|
|
|
|
|
2018-02-19 00:59:23 +00:00
|
|
|
void Visit(VLSong & song) override;
|
|
|
|
void VisitMeasure(uint32_t m, VLProperties & p, VLMeasure & meas) override;
|
|
|
|
void VisitNote(VLLyricsNote & n) override;
|
|
|
|
void VisitChord(VLChord & c) override;
|
2007-05-24 08:52:14 +00:00
|
|
|
|
|
|
|
const std::string & Chords() const { return fChords; }
|
|
|
|
const std::string & Melody() const { return fMelody; }
|
|
|
|
const std::string & Lyrics(size_t stanza) const { return fLyrics[stanza]; }
|
|
|
|
private:
|
|
|
|
std::string fChords;
|
|
|
|
std::string fMelody;
|
|
|
|
std::vector<std::string> fLyrics;
|
|
|
|
|
|
|
|
VLSong * fSong;
|
|
|
|
bool fUseSharps;
|
|
|
|
bool fInPickup;
|
2018-02-19 00:59:23 +00:00
|
|
|
bool fInSlur;
|
2008-08-15 13:25:42 +00:00
|
|
|
bool fAutomaticLayout;
|
2008-08-15 13:27:21 +00:00
|
|
|
int fPrevBreak;
|
2007-05-24 08:52:14 +00:00
|
|
|
size_t fSeenEnding;
|
2018-02-19 00:59:23 +00:00
|
|
|
size_t fPrevTie;
|
|
|
|
size_t fStartTie;
|
2007-05-24 08:52:14 +00:00
|
|
|
int fNumEndings;
|
|
|
|
VLNote fPrevNote;
|
|
|
|
std::string fAccum;
|
|
|
|
std::string fIndent;
|
|
|
|
std::vector<std::string> fL;
|
2008-01-26 10:54:00 +00:00
|
|
|
VLProperties * fLastProp;
|
2007-05-24 08:52:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Local Variables:
|
|
|
|
// mode:C++
|
|
|
|
// End:
|