mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Implement groove changes in MMA documents
This commit is contained in:
parent
cb78a2ba75
commit
fc1e8277c7
|
@ -42,10 +42,6 @@
|
|||
// Can't handle these yet
|
||||
break;
|
||||
}
|
||||
sprintf(buf, "Groove %s\n", [songGroove UTF8String]);
|
||||
mmaFile += buf;
|
||||
sprintf(buf, "KeySig %d%c\n", labs(prop.fKey), prop.fKey>=0 ? '#' : '&');
|
||||
mmaFile += buf;
|
||||
if (!(playElements & kVLPlayAccompaniment))
|
||||
mmaFile += "AllTracks Off\nSolo On\n";
|
||||
if (!(playElements & kVLPlayMelody))
|
||||
|
|
|
@ -16,16 +16,29 @@ void VLMMAWriter::Visit(VLSong & song)
|
|||
fMeas = 0;
|
||||
fInitial= true;
|
||||
fMeasures.clear();
|
||||
fKey = -999;
|
||||
fGroove = "";
|
||||
|
||||
VisitMeasures(song, true);
|
||||
}
|
||||
|
||||
void VLMMAWriter::VisitMeasure(size_t m, VLProperties & p, VLMeasure & meas)
|
||||
{
|
||||
char buf[8];
|
||||
char buf[64];
|
||||
|
||||
if (p.fKey != fKey) {
|
||||
fKey = p.fKey;
|
||||
sprintf(buf, "KeySig %d%c\n", labs(fKey), fKey>=0 ? '#' : '&');
|
||||
fMeasures += buf;
|
||||
}
|
||||
if (p.fGroove != fGroove) {
|
||||
fGroove = p.fGroove;
|
||||
fMeasures += "Groove " + fGroove + '\n';
|
||||
}
|
||||
|
||||
sprintf(buf, "%-3d", ++fMeas);
|
||||
|
||||
fUseSharps = p.fKey >= 0;
|
||||
fUseSharps = fKey >= 0;
|
||||
|
||||
//
|
||||
// Generate chords
|
||||
|
|
|
@ -21,15 +21,17 @@ public:
|
|||
|
||||
const std::string & Measures() const { return fMeasures; }
|
||||
private:
|
||||
std::string fMeasures;
|
||||
std::string fMeasures;
|
||||
|
||||
VLSong * fSong;
|
||||
bool fUseSharps;
|
||||
bool fTied;
|
||||
bool fInitial;
|
||||
int fMeas;
|
||||
size_t fLastDur;
|
||||
std::string fAccum;
|
||||
VLSong * fSong;
|
||||
bool fUseSharps;
|
||||
bool fTied;
|
||||
bool fInitial;
|
||||
int fMeas;
|
||||
size_t fLastDur;
|
||||
std::string fAccum;
|
||||
int fKey;
|
||||
std::string fGroove;
|
||||
};
|
||||
|
||||
// Local Variables:
|
||||
|
|
|
@ -517,4 +517,4 @@ advanceAt:
|
|||
return [self readFromPlist:outPlist error:outError];
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue
Block a user