Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
midilib.hh
Go to the documentation of this file.
1 // This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0
2#ifndef __ASE_MIDILIB_HH__
3#define __ASE_MIDILIB_HH__
4
5#include <ase/processor.hh>
6#include <ase/track.hh>
7#include <ase/clip.hh>
8
9namespace Ase {
10
11namespace MidiLib {
12
14struct MidiFeed {
15 ClipImplGeneratorS generators;
17 int trigger = ~0;
18};
20
22public:
23 struct Position {
24 int next = -1;
25 int current = -1;
26 double tick = -1;
27 };
28 virtual void update_feed (MidiFeedP &feed) = 0;
29 virtual Position* position () const = 0; // MT-Safe
30 virtual void start () = 0;
31 virtual void stop (bool restart = false) = 0;
32 MidiProducerIface (const ProcessorSetup &psetup) : AudioProcessor (psetup) {}
33};
34
35using MidiProducerIfaceP = std::shared_ptr<MidiProducerIface>;
36
37} // MidiLib
38} // Ase
39
40#endif // __ASE_MIDILIB_HH__
41
Audio signal AudioProcessor base class, implemented by all effects and instruments.
Definition processor.hh:76
MIDI clip playback succession generator.
Definition track.hh:47
Aggregation of MIDI events and sequencing information.
Definition midilib.hh:14
The Anklang C++ API namespace.
Definition api.hh:9