本文整理汇总了C++中Position::GetNote方法的典型用法代码示例。如果您正苦于以下问题:C++ Position::GetNote方法的具体用法?C++ Position::GetNote怎么用?C++ Position::GetNote使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Position
的用法示例。
在下文中一共展示了Position::GetNote方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestCaseNoteArray
/// Tests the Note Array Functions
/// @return True if all tests were executed, false if not
bool PositionTestSuite::TestCaseNoteArray()
{
//------Last Checked------//
// - Jan 25, 2005
Position position;
TEST(wxT("IsValidNoteIndex - false"), !position.IsValidNoteIndex(0));
TEST(wxT("GetNote - invalid index"), (position.GetNote(0) == NULL));
return (true);
}
示例2: OnTestParseFile
//.........这里部分代码省略.........
// Parse the guitars in the score
// In Power Tab Editor v1.7, the guitar data can be accessed via the Guitar Property Sheet:
// Menu Guitar -> Setup
wxUint32 guitarIndex = 0;
wxUint32 guitarCount = score->GetGuitarCount();
for (; guitarIndex < guitarCount; guitarIndex++)
{
Guitar* guitar = score->GetGuitar(guitarIndex);
wxCHECK2(guitar != NULL, continue);
wxByte number = guitar->GetNumber();
wxString description = guitar->GetDescription();
wxByte preset = guitar->GetPreset();
wxByte initialVolume = guitar->GetInitialVolume();
wxByte pan = guitar->GetPan();
wxByte reverb = guitar->GetReverb();
wxByte chorus = guitar->GetChorus();
wxByte tremolo = guitar->GetTremolo();
wxByte phaser = guitar->GetPhaser();
wxByte capo = guitar->GetCapo();
const Tuning& tuning = guitar->GetTuning();
wxString name = tuning.GetName();
wxInt8 musicNotationOffset = tuning.GetMusicNotationOffset();
bool usesSharps = tuning.UsesSharps();
// Get the MIDI note pitch for each string, starting with the highest string
// Highest string = High E on standard guitar tuning
size_t string = 0;
size_t stringCount = tuning.GetStringCount();
for (; string < stringCount; string++)
{
// MIDI note pitch (see MIDI_NOTE_xx constants in generalmidi.h)
wxByte note = tuning.GetNote(string);
}
}
// Parse the chord diagrams in the score
// In Power Tab Editor v1.7, chord diagrams can be accessed via the Guitar Property Sheet:
// Menu Guitar -> Chord Diagram List
// The chord diagrams appear in the Chord Diagram List in the order they are stored in the chord diagram
// array in the score
wxUint32 chordDiagramIndex = 0;
wxUint32 chordDiagramCount = score->GetChordDiagramCount();
for (; chordDiagramIndex < chordDiagramCount; chordDiagramIndex++)
{
ChordDiagram* chordDiagram = score->GetChordDiagram(chordDiagramIndex);
wxCHECK2(chordDiagram != NULL, continue);
// In Power Tab Editor v1.7, chord name data can be accessed via the Chord Name dialog:
// Menu Text -> Chord Name
const ChordName& chordName = chordDiagram->GetChordNameConstRef();
wxByte tonicKey = 0;
wxByte tonicKeyVariation = 0;
chordName.GetTonic(tonicKey, tonicKeyVariation);
wxByte bassNoteKey = 0;
wxByte bassNoteKeyVariation = 0;
chordName.GetBassNote(bassNoteKey, bassNoteKeyVariation);
wxByte formula = chordName.GetFormula();
bool brackets = chordName.HasBrackets();
bool noChord = chordName.IsNoChord();
wxWord formulaModificationFlag = ChordName::extended9th;
for (; formulaModificationFlag <= ChordName::suspended4th; formulaModificationFlag *= 2)