aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/JackDriver.cpp5
-rw-r--r--src/engine/LearnRequest.cpp2
-rw-r--r--src/engine/LearnRequest.hpp (renamed from src/engine/machina/LearnRequest.hpp)7
-rw-r--r--src/engine/Machine.cpp10
-rw-r--r--src/engine/MachineBuilder.cpp8
-rw-r--r--src/engine/Mutation.cpp4
-rw-r--r--src/engine/machina/Machine.hpp13
7 files changed, 32 insertions, 17 deletions
diff --git a/src/engine/JackDriver.cpp b/src/engine/JackDriver.cpp
index 020d833..55b06e2 100644
--- a/src/engine/JackDriver.cpp
+++ b/src/engine/JackDriver.cpp
@@ -17,9 +17,12 @@
#include <iostream>
#include <iomanip>
+
+#include "machina-config.h"
#include "machina/JackDriver.hpp"
#include "machina/MidiAction.hpp"
-#include "machina-config.h"
+
+#include "LearnRequest.hpp"
#include "jack_compat.h"
using namespace Raul;
diff --git a/src/engine/LearnRequest.cpp b/src/engine/LearnRequest.cpp
index ae61b5c..d5f7846 100644
--- a/src/engine/LearnRequest.cpp
+++ b/src/engine/LearnRequest.cpp
@@ -16,7 +16,7 @@
*/
#include "raul/Quantizer.hpp"
-#include "machina/LearnRequest.hpp"
+#include "LearnRequest.hpp"
namespace Machina {
diff --git a/src/engine/machina/LearnRequest.hpp b/src/engine/LearnRequest.hpp
index 04f0626..6ee60fe 100644
--- a/src/engine/machina/LearnRequest.hpp
+++ b/src/engine/LearnRequest.hpp
@@ -20,9 +20,10 @@
#include "raul/Maid.hpp"
#include "raul/SharedPtr.hpp"
-#include "types.hpp"
-#include "Node.hpp"
-#include "MidiAction.hpp"
+
+#include "machina/MidiAction.hpp"
+#include "machina/Node.hpp"
+#include "machina/types.hpp"
namespace Machina {
diff --git a/src/engine/Machine.cpp b/src/engine/Machine.cpp
index cbfa54e..c7ea48d 100644
--- a/src/engine/Machine.cpp
+++ b/src/engine/Machine.cpp
@@ -16,14 +16,18 @@
*/
#include <cstdlib>
+
#include "raul/SharedPtr.hpp"
#include "redlandmm/Model.hpp"
#include "redlandmm/World.hpp"
+
#include "machina/Edge.hpp"
#include "machina/Machine.hpp"
#include "machina/MidiAction.hpp"
#include "machina/Node.hpp"
+#include "LearnRequest.hpp"
+
using namespace std;
using namespace Raul;
@@ -367,9 +371,9 @@ Machine::run(const Raul::TimeSlice& time)
* NOT realtime (actions are allocated here).
*/
void
-Machine::learn(SharedPtr<LearnRequest> learn)
+Machine::learn(SharedPtr<Raul::Maid> maid, SharedPtr<Node> node)
{
- _pending_learn = learn;
+ _pending_learn = LearnRequest::create(maid, node);
}
@@ -418,6 +422,4 @@ Machine::write_state(Redland::Model& model)
}
}
-
} // namespace Machina
-
diff --git a/src/engine/MachineBuilder.cpp b/src/engine/MachineBuilder.cpp
index 3078cc2..946b7f5 100644
--- a/src/engine/MachineBuilder.cpp
+++ b/src/engine/MachineBuilder.cpp
@@ -16,12 +16,16 @@
*/
#include <algorithm>
+
#include "raul/midi_events.h"
+#include "raul/SharedPtr.hpp"
#include "raul/Quantizer.hpp"
-#include "machina/MachineBuilder.hpp"
+
+#include "machina/Edge.hpp"
#include "machina/Machine.hpp"
+#include "machina/MachineBuilder.hpp"
+#include "machina/MidiAction.hpp"
#include "machina/Node.hpp"
-#include "machina/Edge.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/engine/Mutation.cpp b/src/engine/Mutation.cpp
index bdf0599..d83ea8a 100644
--- a/src/engine/Mutation.cpp
+++ b/src/engine/Mutation.cpp
@@ -17,10 +17,12 @@
#include <iostream>
#include <cstdlib>
+
+#include "machina/ActionFactory.hpp"
#include "machina/Edge.hpp"
#include "machina/Machine.hpp"
+#include "machina/MidiAction.hpp"
#include "machina/Mutation.hpp"
-#include "machina/ActionFactory.hpp"
using namespace std;
diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp
index 1d07a2c..8c1caf3 100644
--- a/src/engine/machina/Machine.hpp
+++ b/src/engine/machina/Machine.hpp
@@ -1,5 +1,5 @@
/* This file is part of Machina.
- * Copyright (C) 2007-2009 David Robillard <http://drobilla.net>
+ * Copyright (C) 2007-2010 David Robillard <http://drobilla.net>
*
* Machina is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
@@ -20,17 +20,20 @@
#include <vector>
#include <boost/utility.hpp>
-#include "raul/SharedPtr.hpp"
-#include "raul/WeakPtr.hpp"
+
#include "raul/List.hpp"
+#include "raul/Maid.hpp"
+#include "raul/SharedPtr.hpp"
#include "raul/TimeSlice.hpp"
+#include "raul/WeakPtr.hpp"
#include "redlandmm/Model.hpp"
+
#include "types.hpp"
-#include "LearnRequest.hpp"
#include "Node.hpp"
namespace Machina {
+class LearnRequest;
/** A (Finite State) Machine.
*/
@@ -54,7 +57,7 @@ public:
void add_node(SharedPtr<Node> node);
void remove_node(SharedPtr<Node> node);
- void learn(SharedPtr<LearnRequest> learn);
+ void learn(SharedPtr<Raul::Maid> maid, SharedPtr<Node> node);
void write_state(Redland::Model& model);