Skip to content

Commit

Permalink
Merge pull request #23961 from musescore/gp_translate
Browse files Browse the repository at this point in the history
gp-import: translated comments
  • Loading branch information
alexpavlov96 committed Aug 8, 2024
2 parents b07d9b1 + 54634fd commit a5a1130
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/importexport/guitarpro/internal/gtp/gpbeat.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,12 @@ class GPBeat

const std::vector<std::shared_ptr<GPNote> >& notes() const { return _notes; }

//! NOTE В текущей версии GP 6.2.0 (и позднее) в биты записывается уже расставленная лирика,
//! поэтому достаточно поля lyrics у бита.
//!
//! В ранних версиях GP не было расстановки лирики по битам,
//! т.е нужно было каждый раз при открытии таба парсить общую лирику
//! и расставлять её по битам.
//! При этом, может использоваться один и тот же бит в разных тактах,
//! даже если у него разная лирика (т.е лирика не участвовала в определении уникальности бита)
//! Поэтому, чтобы записать лирику в такие биты, добавлен ключ - номер такта (мастер бара)
//! NOTE In GP version 6.2.0+ already arranged lyrics are written into bits, so the lyrics field of the beat is enough.
//! In earlier versions of GP, there was no arrangement of lyrics by bits,
//! i.e. it was necessary to parse the general lyrics each time a tab was opened and arrange them by bits.
//! At the same time, the same beat can be used in different bars, even if it has different lyrics
//! (i.e. the lyrics did not participate in determining the uniqueness of the beat).
//! Therefore, in order to write lyrics into such bits, a key was added - the bar number (master bar)

struct Key {
int32_t trackId{ -1 };
Expand Down Expand Up @@ -251,7 +248,7 @@ class GPBeat
return _lyrics.at(key);
}

//! NOTE Тажа проблема, что с лирикой
//! NOTE Same problem as with lyrics
void setDiagramIdx(int idx) { setDiagramIdx(-1, -1, idx); }
void setDiagramIdx(int32_t ti, int32_t mi, int idx) { _diagramIdx[Key(ti, mi)] = idx; }
int diagramIdx(int32_t ti = -1, int32_t mi = -1) const
Expand Down

0 comments on commit a5a1130

Please sign in to comment.