当前位置: 首页>>代码示例>>C++>>正文


C++ Position::GetNote方法代码示例

本文整理汇总了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);
}
开发者ID:RaptDept,项目名称:ptparser,代码行数:11,代码来源:positiontestsuite.cpp

示例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)
开发者ID:BackupTheBerlios,项目名称:ptparser-svn,代码行数:67,代码来源:powertabview.cpp


注:本文中的Position::GetNote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。