int absStep(int tpc, int pitch) { int line = tpc2step(tpc) + (pitch / 12) * 7; int tpcPitch = tpc2pitch(tpc); if (tpcPitch < 0) line += 7; else line -= (tpcPitch / 12) * 7; return line; }
void ChordEdit::setBase(int val) { if (val == INVALID_TPC) return; // translate tpc to button nr int idx = tpc2pitch(val) + 1; bassNote->setCurrentIndex(idx); chordChanged(); }