diff options
Diffstat (limited to 'src/engine/machina')
-rw-r--r-- | src/engine/machina/JackDriver.hpp | 6 | ||||
-rw-r--r-- | src/engine/machina/LearnRequest.hpp | 12 |
2 files changed, 7 insertions, 11 deletions
diff --git a/src/engine/machina/JackDriver.hpp b/src/engine/machina/JackDriver.hpp index e52af88..1f9b197 100644 --- a/src/engine/machina/JackDriver.hpp +++ b/src/engine/machina/JackDriver.hpp @@ -51,10 +51,11 @@ public: size_t size, const unsigned char* event); - void set_bpm(double bpm) { _bpm.set(bpm); } + void set_bpm(double bpm) { _bpm.set(bpm); } + void set_quantization(double quantization) { _quantization.set(quantization); } private: - void process_input(jack_nframes_t nframes); + void process_input(const Raul::TimeSlice& time); virtual void on_process(jack_nframes_t nframes); SharedPtr<Machine> _machine; @@ -65,6 +66,7 @@ private: Raul::TimeSlice _cycle_time; Raul::DoubleBuffer<double> _bpm; + Raul::DoubleBuffer<double> _quantization; }; diff --git a/src/engine/machina/LearnRequest.hpp b/src/engine/machina/LearnRequest.hpp index f485560..9284e90 100644 --- a/src/engine/machina/LearnRequest.hpp +++ b/src/engine/machina/LearnRequest.hpp @@ -43,16 +43,9 @@ public: return ret; } - // Add the learned actions to the node - void finish(BeatTime time) - { - _node->add_enter_action(_enter_action); - _node->add_exit_action(_exit_action); - _node->set_duration(time - _start_time); - std::cerr << "LEARN DURATION: " << _node->duration() << std::endl; - } + void finish(BeatTime time); - void start(BeatTime time) { _started = true; _start_time = time; } + void start(double q, BeatTime time) { _started = true; _start_time = time; _quantization = q; } bool started() { return _started; } const SharedPtr<Node>& node() { return _node; } @@ -70,6 +63,7 @@ private: bool _started; BeatTime _start_time; + double _quantization; SharedPtr<Node> _node; SharedPtr<MidiAction> _enter_action; SharedPtr<MidiAction> _exit_action; |