From e190d38057892b69246391841b234a368bc2b4ad Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 1 Mar 2011 19:19:02 +0000 Subject: MAJOR rewrite of the internals. New input/output 'plugin' system. Still a lot missing. --- src/instrument.h | 59 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 12 deletions(-) (limited to 'src/instrument.h') diff --git a/src/instrument.h b/src/instrument.h index 96fc6ba..b01379f 100644 --- a/src/instrument.h +++ b/src/instrument.h @@ -30,25 +30,60 @@ #include #include -#include - -#include "velocity.h" +#include "rangemap.h" +#include "sample.h" class Instrument { public: - Instrument(std::string name, unsigned int midimap); - - void addVelocity(Velocity *velocity); - Velocity *getVelocity(unsigned int velocity); + Instrument(std::string name); - std::string name; - unsigned int midimap; + Sample *sample(level_t level); - jack_port_t *port; + void addSample(level_t a, level_t b, Sample *s); private: - typedef std::vector< Velocity * > Velocities; - Velocities velocities; + std::string name; + RangeMap samples; }; +typedef std::map< std::string, Instrument > Instruments; + +/* + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + #endif/*__DRUMGIZMO_INSTRUMENT_H__*/ -- cgit v1.2.3