This commit is contained in:
ws 2014-11-28 12:41:59 +01:00
parent 7a647ad3dd
commit 94c902213d
3 changed files with 9 additions and 5 deletions

View file

@ -135,10 +135,10 @@ void RepeatList::update()
int utick = 0;
qreal t = 0;
foreach(RepeatSegment* s, *this) {
for(RepeatSegment* s : *this) {
s->utick = utick;
s->utime = t;
qreal ct = tl->tick2time(s->tick);
qreal ct = tl->tick2time(s->tick);
s->timeOffset = t - ct;
utick += s->len;
t += tl->tick2time(s->tick + s->len) - ct;
@ -175,7 +175,7 @@ int RepeatList::utick2tick(int tick) const
int RepeatList::tick2utick(int tick) const
{
foreach (const RepeatSegment* s, *this) {
for (const RepeatSegment* s : *this) {
if (tick >= s->tick && tick < (s->tick + s->len))
return s->utick + (tick - s->tick);
}

View file

@ -538,6 +538,7 @@ void Seq::processMessages()
}
else
cs->tempomap()->setRelTempo(msg.realVal);
cs->repeatList()->update();
prevTempo = curTempo();
emit tempoChanged();
}

View file

@ -50,8 +50,11 @@ enum class POS : char;
// message format for gui -> sequencer messages
//---------------------------------------------------------
enum class SeqMsgId : char { NO_MESSAGE, TEMPO_CHANGE, PLAY, SEEK,
MIDI_INPUT_EVENT
enum class SeqMsgId : char {
NO_MESSAGE,
TEMPO_CHANGE,
PLAY, SEEK,
MIDI_INPUT_EVENT
};
struct SeqMsg {