2006-09-11 02:49:56 +00:00
|
|
|
/*
|
|
|
|
* TVLChord.cpp
|
|
|
|
* Vocalese
|
|
|
|
*
|
|
|
|
* Created by Matthias Neeracher on 12/19/05.
|
|
|
|
* Copyright 2005 __MyCompanyName__. All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "VLModel.h"
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
int main(int, char *const [])
|
|
|
|
{
|
|
|
|
std::string chordName;
|
|
|
|
|
|
|
|
while (std::cin >> chordName) {
|
|
|
|
VLChord chord(chordName);
|
|
|
|
|
2006-10-21 09:24:50 +00:00
|
|
|
std::string baseS, extS, rootS, baseF, extF, rootF, lilyS, lilyF;
|
2006-09-11 02:49:56 +00:00
|
|
|
|
|
|
|
chord.Name(baseS, extS, rootS, true);
|
|
|
|
chord.Name(baseF, extF, rootF, false);
|
2006-10-21 09:24:50 +00:00
|
|
|
chord.LilypondName(lilyS, true);
|
|
|
|
chord.LilypondName(lilyF, false);
|
|
|
|
|
2006-09-11 02:49:56 +00:00
|
|
|
std::cout << baseS << "[" << extS << "]" << rootS << " "
|
2006-10-21 09:24:50 +00:00
|
|
|
<< baseF << "[" << extF << "]" << rootF << " "
|
2006-11-11 05:30:50 +00:00
|
|
|
<< lilyS << " " << lilyF << " (";
|
2006-10-21 09:24:50 +00:00
|
|
|
|
2006-11-11 05:30:50 +00:00
|
|
|
for (int i=0; i<32; ++i)
|
|
|
|
if (chord.fSteps & (1<<i)) {
|
|
|
|
VLNote n(1, chord.fPitch+i);
|
|
|
|
std::string nn;
|
|
|
|
n.Name(nn);
|
|
|
|
std::cout << " " << nn;
|
|
|
|
}
|
|
|
|
std::cout << " )" << std::endl;
|
2006-09-11 02:49:56 +00:00
|
|
|
}
|
|
|
|
exit(0);
|
|
|
|
}
|