From 198cfe96b4a6ebb9bc3c23f708ee53144e191ea8 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 28 Apr 2009 14:50:22 -0700 Subject: [PATCH] fix alignment of automation recording --- include/automation_recorder.h | 1 - src/core/automation_recorder.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/automation_recorder.h b/include/automation_recorder.h index da3ea42da..9434ee3c6 100644 --- a/include/automation_recorder.h +++ b/include/automation_recorder.h @@ -4,7 +4,6 @@ * controllers and creates automation TCOs if automation * recording is on. * - * Copyright (c) 2008-2009 Tobias Doerffel * Copyright (c) 2009-2009 Andrew Kelley * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net diff --git a/src/core/automation_recorder.cpp b/src/core/automation_recorder.cpp index 492160149..0e12ea9c1 100644 --- a/src/core/automation_recorder.cpp +++ b/src/core/automation_recorder.cpp @@ -4,7 +4,6 @@ * controller and records automation if automation * recording is on. * - * Copyright (c) 2008-2009 Tobias Doerffel * Copyright (c) 2009-2009 Andrew Kelley * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net @@ -90,7 +89,7 @@ void AutomationRecorder::controllerEvent( data.pat->changeLength( song_pos - data.pat->startPosition() ); // now draw a line from the last one to this one // TODO: make it smooth (draw line instead of insert value) - data.pat->putValue( song_pos, _val ); + data.pat->putValue( song_pos - data.pat->startPosition(), _val, false ); } else @@ -120,7 +119,8 @@ void AutomationRecorder::controllerEvent( } // add first value TODO: make sure this is absolute - data.pat->putValue( song_pos, _val ); + data.pat->putValue( + song_pos - data.pat->startPosition(), _val, false ); // insert into map data.seen = true;