From 54634fd412e836d90cfc9664cb13d58b2fc99888 Mon Sep 17 00:00:00 2001 From: Alexander Pavlov Date: Thu, 8 Aug 2024 20:37:38 +0300 Subject: [PATCH] gp-import: translated comments --- .../guitarpro/internal/gtp/gpbeat.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/importexport/guitarpro/internal/gtp/gpbeat.h b/src/importexport/guitarpro/internal/gtp/gpbeat.h index 4f511b8c61dcd..6cf667829b6b0 100644 --- a/src/importexport/guitarpro/internal/gtp/gpbeat.h +++ b/src/importexport/guitarpro/internal/gtp/gpbeat.h @@ -210,15 +210,12 @@ class GPBeat const std::vector >& 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 }; @@ -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