From 69ad86f21555d28f5065923eea06ccc3cc4f4ce5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 1 Apr 2007 18:29:24 +0000 Subject: Fixed missed events (off by one bug comparing time stamps with end of cycle). git-svn-id: http://svn.drobilla.net/lad/machina@388 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/JackDriver.cpp | 7 +++- src/engine/Machine.cpp | 2 +- src/gui/machina.glade | 103 ++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 103 insertions(+), 9 deletions(-) diff --git a/src/engine/JackDriver.cpp b/src/engine/JackDriver.cpp index 7a2b03d..7df3a4b 100644 --- a/src/engine/JackDriver.cpp +++ b/src/engine/JackDriver.cpp @@ -182,7 +182,12 @@ JackDriver::write_event(Raul::BeatTime time, if (_cycle_time.beats_to_ticks(time) + _cycle_time.offset_ticks() < _cycle_time.start_ticks()) { std::cerr << "ERROR: Missed event by " << _cycle_time.start_ticks() - (_cycle_time.beats_to_ticks(time) + _cycle_time.offset_ticks()) - << "ticks." << std::endl; + << " ticks" + << "\n\tbpm: " << _cycle_time.bpm() + << "\n\tev time: " << _cycle_time.beats_to_ticks(time) + << "\n\tcycle_start: " << _cycle_time.start_ticks() + << "\n\tcycle_end: " << _cycle_time.start_ticks() + _cycle_time.length_ticks() + << "\n\tcycle_length: " << _cycle_time.length_ticks() << std::endl << std::endl; return; } diff --git a/src/engine/Machine.cpp b/src/engine/Machine.cpp index 2857e8b..c61bd4f 100644 --- a/src/engine/Machine.cpp +++ b/src/engine/Machine.cpp @@ -242,7 +242,7 @@ Machine::run(const Raul::TimeSlice& time) // Must do comparison in ticks here to avoid rounding up and executing // an event outside the current cycle } else if (time.beats_to_ticks(earliest->exit_time()) - < time.beats_to_ticks(cycle_end)) { + <= time.beats_to_ticks(cycle_end)) { this_time += earliest->exit_time() - _time; _time = earliest->exit_time(); exit_node(sink, earliest); diff --git a/src/gui/machina.glade b/src/gui/machina.glade index 136d384..fb61bd8 100644 --- a/src/gui/machina.glade +++ b/src/gui/machina.glade @@ -85,7 +85,7 @@ - + True gtk-media-record 1 @@ -107,7 +107,7 @@ - + True gtk-convert 1 @@ -129,13 +129,14 @@ True - Export _Graphviz... + Export a DOT file for rendering diagram with the GraphViz suite of tools + Export _GraphViz... True - + True gtk-convert 1 @@ -176,12 +177,24 @@ + + + True + Show labels on canvas + _Labels + True + False + + + + + True _Toolbar True - False + True @@ -240,6 +253,7 @@ True + Record gtk-media-record True True @@ -255,6 +269,7 @@ True + Stop playback or recording gtk-media-stop True True @@ -269,11 +284,12 @@ True + Play gtk-media-play True True False - False + True False @@ -294,6 +310,51 @@ + + + True + Add selected states + gtk-add + True + True + False + + + False + True + + + + + + True + Multiply (merge) selected states + + True + gtk-convert + True + True + False + + + False + True + + + + + + True + True + True + True + + + False + False + + + True @@ -312,6 +373,7 @@ True False + Slave to JACK transport True Slave True @@ -337,8 +399,9 @@ True + Use internal tempo True - BPM: + True GTK_RELIEF_NORMAL True @@ -373,6 +436,31 @@ True + + + + True + BPM + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + 0 @@ -419,6 +507,7 @@ True + Quantize recording True Quantize: 1/ True -- cgit v1.2.1