aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-05 17:06:53 +0000
committerDavid Robillard <d@drobilla.net>2007-04-05 17:06:53 +0000
commit4541e87aa843dd97c542f7c66fcbc0a16ffbcee5 (patch)
treeb78b2bc374e62401df6e6e5d3d250d1845053ec4 /src/engine/machina
parent0123cdeacc9acc7ca16fa8b0a9dee7a5d916b7df (diff)
downloadmachina-4541e87aa843dd97c542f7c66fcbc0a16ffbcee5.tar.gz
machina-4541e87aa843dd97c542f7c66fcbc0a16ffbcee5.tar.bz2
machina-4541e87aa843dd97c542f7c66fcbc0a16ffbcee5.zip
Code cleanups.
git-svn-id: http://svn.drobilla.net/lad/machina@399 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/machina')
-rw-r--r--src/engine/machina/ActionFactory.hpp2
-rw-r--r--src/engine/machina/Driver.hpp3
-rw-r--r--src/engine/machina/Engine.hpp3
-rw-r--r--src/engine/machina/JackDriver.hpp7
-rw-r--r--src/engine/machina/LearnRequest.hpp8
-rw-r--r--src/engine/machina/Loader.hpp2
-rw-r--r--src/engine/machina/Machine.hpp6
-rw-r--r--src/engine/machina/MachineBuilder.hpp2
-rw-r--r--src/engine/machina/MidiAction.hpp2
-rw-r--r--src/engine/machina/Recorder.hpp2
-rw-r--r--src/engine/machina/SMFDriver.hpp2
-rw-r--r--src/engine/machina/types.hpp6
12 files changed, 20 insertions, 25 deletions
diff --git a/src/engine/machina/ActionFactory.hpp b/src/engine/machina/ActionFactory.hpp
index c43bf72..72303ee 100644
--- a/src/engine/machina/ActionFactory.hpp
+++ b/src/engine/machina/ActionFactory.hpp
@@ -12,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MACHINA_ACTIONFACTORY_HPP
diff --git a/src/engine/machina/Driver.hpp b/src/engine/machina/Driver.hpp
index acc4278..c28bfcf 100644
--- a/src/engine/machina/Driver.hpp
+++ b/src/engine/machina/Driver.hpp
@@ -1,5 +1,4 @@
/* This file is part of Machina.
- * _engine->driver()->reset_time();
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
*
* Machina is free software; you can redistribute it and/or modify it under the
@@ -13,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MACHINA_DRIVER_HPP
diff --git a/src/engine/machina/Engine.hpp b/src/engine/machina/Engine.hpp
index dc47b2a..a7d0ed7 100644
--- a/src/engine/machina/Engine.hpp
+++ b/src/engine/machina/Engine.hpp
@@ -20,6 +20,7 @@
#include <glibmm/ustring.h>
#include <raul/SharedPtr.h>
+#include <raul/types.h>
#include "machina/Driver.hpp"
namespace Machina {
@@ -38,7 +39,7 @@ public:
SharedPtr<Machine> load_machine(const Glib::ustring& uri);
SharedPtr<Machine> import_machine(const Glib::ustring& uri);
- SharedPtr<Machine> learn_midi(const Glib::ustring& uri);
+ SharedPtr<Machine> import_midi(const Glib::ustring& uri, Raul::BeatTime d);
void set_bpm(double bpm);
void set_quantization(double beat_fraction);
diff --git a/src/engine/machina/JackDriver.hpp b/src/engine/machina/JackDriver.hpp
index 1ab6643..ce95462 100644
--- a/src/engine/machina/JackDriver.hpp
+++ b/src/engine/machina/JackDriver.hpp
@@ -12,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MACHINA_JACKDRIVER_HPP
@@ -69,8 +69,9 @@ public:
void finish_record();
private:
- void process_input(SharedPtr<Machine> machine,
- const Raul::TimeSlice& time);
+ void process_input(SharedPtr<Machine> machine,
+ const Raul::TimeSlice& time);
+
virtual void on_process(jack_nframes_t nframes);
Raul::Semaphore _machine_changed;
diff --git a/src/engine/machina/LearnRequest.hpp b/src/engine/machina/LearnRequest.hpp
index 9284e90..20c02e5 100644
--- a/src/engine/machina/LearnRequest.hpp
+++ b/src/engine/machina/LearnRequest.hpp
@@ -43,10 +43,12 @@ public:
return ret;
}
+ void start(double q, BeatTime time)
+ { _started = true; _start_time = time; _quantization = q; }
+
void finish(BeatTime time);
-
- void start(double q, BeatTime time) { _started = true; _start_time = time; _quantization = q; }
- bool started() { return _started; }
+
+ bool started() { return _started; }
const SharedPtr<Node>& node() { return _node; }
const SharedPtr<MidiAction>& enter_action() { return _enter_action; }
diff --git a/src/engine/machina/Loader.hpp b/src/engine/machina/Loader.hpp
index af35c56..7e296c0 100644
--- a/src/engine/machina/Loader.hpp
+++ b/src/engine/machina/Loader.hpp
@@ -12,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MACHINA_LOADER_HPP
diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp
index 14632f0..9504217 100644
--- a/src/engine/machina/Machine.hpp
+++ b/src/engine/machina/Machine.hpp
@@ -56,10 +56,8 @@ public:
// Any context
Raul::BeatTime time() { return _time; }
- //LearnRequest pop_learn() { return _pending_learns.pop_front(); }
- //SharedPtr<LearnRequest> first_learn() { return *_pending_learns.begin(); }
- SharedPtr<LearnRequest> pending_learn() { return _pending_learn; }
- void clear_pending_learn() { _pending_learn.reset(); }
+ SharedPtr<LearnRequest> pending_learn() { return _pending_learn; }
+ void clear_pending_learn() { _pending_learn.reset(); }
typedef Raul::List<SharedPtr<Node> > Nodes;
Nodes& nodes() { return _nodes; }
diff --git a/src/engine/machina/MachineBuilder.hpp b/src/engine/machina/MachineBuilder.hpp
index 25104e8..ddb3e02 100644
--- a/src/engine/machina/MachineBuilder.hpp
+++ b/src/engine/machina/MachineBuilder.hpp
@@ -12,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MACHINA_MACHINEBUILDER_HPP
diff --git a/src/engine/machina/MidiAction.hpp b/src/engine/machina/MidiAction.hpp
index 510c0d0..6541f0e 100644
--- a/src/engine/machina/MidiAction.hpp
+++ b/src/engine/machina/MidiAction.hpp
@@ -12,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MACHINA_MIDIACTION_HPP
diff --git a/src/engine/machina/Recorder.hpp b/src/engine/machina/Recorder.hpp
index 1bc07c3..d03f6fc 100644
--- a/src/engine/machina/Recorder.hpp
+++ b/src/engine/machina/Recorder.hpp
@@ -12,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MACHINA_RECORDER_HPP
diff --git a/src/engine/machina/SMFDriver.hpp b/src/engine/machina/SMFDriver.hpp
index 7b22a26..af6e1bb 100644
--- a/src/engine/machina/SMFDriver.hpp
+++ b/src/engine/machina/SMFDriver.hpp
@@ -12,7 +12,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MACHINA_SMFDRIVER_HPP
diff --git a/src/engine/machina/types.hpp b/src/engine/machina/types.hpp
index 70eae7d..6e661ef 100644
--- a/src/engine/machina/types.hpp
+++ b/src/engine/machina/types.hpp
@@ -18,14 +18,8 @@
#ifndef MACHINA_TYPES_HPP
#define MACHINA_TYPES_HPP
-#include <jack/types.h>
-
namespace Machina {
-
-//typedef jack_nframes_t FrameCount;
-//typedef jack_nframes_t Timestamp;
-
typedef unsigned char byte;
} // namespace Machina