| 36 | } |
| 37 | |
| 38 | void ChordDisplayer::DrawModule() |
| 39 | { |
| 40 | if (Minimized() || IsVisible() == false) |
| 41 | return; |
| 42 | |
| 43 | std::list<int> notes = mNoteOutput.GetHeldNotesList(); |
| 44 | |
| 45 | if (notes.size() == 0) |
| 46 | return; |
| 47 | |
| 48 | if (mAdvancedDetection) |
| 49 | { |
| 50 | std::vector<int> chord{ std::begin(notes), std::end(notes) }; |
| 51 | std::set<std::string> chordNames = TheScale->GetChordDatabase().GetChordNamesAdvanced(chord, mUseScaleDegrees, mShowIntervals); |
| 52 | |
| 53 | if (chordNames.size() <= 5) |
| 54 | { |
| 55 | int drawY = 14; |
| 56 | int drawHeight = 20; |
| 57 | for (std::string chordName : chordNames) |
| 58 | { |
| 59 | DrawTextNormal(chordName, 4, drawY); |
| 60 | drawY += drawHeight; |
| 61 | } |
| 62 | } |
| 63 | else |
| 64 | { |
| 65 | DrawTextNormal("(ambiguous)", 4, 14); |
| 66 | } |
| 67 | } |
| 68 | else |
| 69 | { |
| 70 | std::vector<int> chord{ std::begin(notes), std::end(notes) }; |
| 71 | DrawTextNormal(TheScale->GetChordDatabase().GetChordName(chord), 4, 14); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | void ChordDisplayer::PlayNote(double time, int pitch, int velocity, int voiceIdx, ModulationParameters modulation) |
| 76 | { |
nothing calls this directly
no test coverage detected