mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Represent codas (incorrectly)
This commit is contained in:
parent
5e0cd4e002
commit
0929beb54a
|
@ -263,6 +263,14 @@ const char * sSteps = "C DbD EbE F GbG AbA BbB ";
|
||||||
return identification;
|
return identification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSXMLElement *) soundElt:(NSString *)title
|
||||||
|
{
|
||||||
|
NSXMLElement * sound = [NSXMLNode elementWithName:@"sound"];
|
||||||
|
[sound addAttribute: [NSXMLNode attributeWithName:title
|
||||||
|
stringValue:@"A"]];
|
||||||
|
return sound;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSData *)XMLDataWithError:(NSError **)outError
|
- (NSData *)XMLDataWithError:(NSError **)outError
|
||||||
{
|
{
|
||||||
NSXMLElement * work = [NSXMLNode elementWithName:@"work"];
|
NSXMLElement * work = [NSXMLNode elementWithName:@"work"];
|
||||||
|
@ -386,10 +394,15 @@ const char * sSteps = "C DbD EbE F GbG AbA BbB ";
|
||||||
|
|
||||||
[melMeas addChild:barline];
|
[melMeas addChild:barline];
|
||||||
}
|
}
|
||||||
|
if (song->fCoda == measure)
|
||||||
|
[melMeas addChild:[self soundElt:@"coda"]];
|
||||||
|
|
||||||
[self addNotes:&song->fMeasures[measure].fMelody toMeasure:melMeas];
|
[self addNotes:&song->fMeasures[measure].fMelody toMeasure:melMeas];
|
||||||
[self addChords:&song->fMeasures[measure].fChords toMeasure:harMeas];
|
[self addChords:&song->fMeasures[measure].fChords toMeasure:harMeas];
|
||||||
|
|
||||||
|
if (song->fGoToCoda == measure+1)
|
||||||
|
[melMeas addChild:[self soundElt:@"tocoda"]];
|
||||||
|
|
||||||
[melody addChild:melMeas];
|
[melody addChild:melMeas];
|
||||||
[chords addChild:harMeas];
|
[chords addChild:harMeas];
|
||||||
}
|
}
|
||||||
|
@ -583,7 +596,10 @@ int8_t sStepToPitch[] = {
|
||||||
|
|
||||||
[self readBarlines:[measure elementsForName:@"barline"] measure:m
|
[self readBarlines:[measure elementsForName:@"barline"] measure:m
|
||||||
repeat:&repeat inRepeat:&inRepeat error:outError];
|
repeat:&repeat inRepeat:&inRepeat error:outError];
|
||||||
|
if ([measure nodeForXPath:@".//sound[@coda=\"A\"]" error:outError])
|
||||||
|
song->fCoda = m;
|
||||||
|
if ([measure nodeForXPath:@".//sound[@tocoda=\"A\"]" error:outError])
|
||||||
|
song->fGoToCoda = m+1;
|
||||||
NSEnumerator * n = [[measure elementsForName:@"note"] objectEnumerator];
|
NSEnumerator * n = [[measure elementsForName:@"note"] objectEnumerator];
|
||||||
|
|
||||||
for (NSXMLElement * note; note = [n nextObject]; ) {
|
for (NSXMLElement * note; note = [n nextObject]; ) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user