mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +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
|
// Can't handle these yet
|
||||||
break;
|
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))
|
if (!(playElements & kVLPlayAccompaniment))
|
||||||
mmaFile += "AllTracks Off\nSolo On\n";
|
mmaFile += "AllTracks Off\nSolo On\n";
|
||||||
if (!(playElements & kVLPlayMelody))
|
if (!(playElements & kVLPlayMelody))
|
||||||
|
|
|
@ -16,16 +16,29 @@ void VLMMAWriter::Visit(VLSong & song)
|
||||||
fMeas = 0;
|
fMeas = 0;
|
||||||
fInitial= true;
|
fInitial= true;
|
||||||
fMeasures.clear();
|
fMeasures.clear();
|
||||||
|
fKey = -999;
|
||||||
|
fGroove = "";
|
||||||
|
|
||||||
VisitMeasures(song, true);
|
VisitMeasures(song, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VLMMAWriter::VisitMeasure(size_t m, VLProperties & p, VLMeasure & meas)
|
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);
|
sprintf(buf, "%-3d", ++fMeas);
|
||||||
|
|
||||||
fUseSharps = p.fKey >= 0;
|
fUseSharps = fKey >= 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Generate chords
|
// Generate chords
|
||||||
|
|
|
@ -30,6 +30,8 @@ private:
|
||||||
int fMeas;
|
int fMeas;
|
||||||
size_t fLastDur;
|
size_t fLastDur;
|
||||||
std::string fAccum;
|
std::string fAccum;
|
||||||
|
int fKey;
|
||||||
|
std::string fGroove;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Local Variables:
|
// Local Variables:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user