Ardour  9.0-pre0-350-gf17a656217
beatbox.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2017 Paul Davis
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 
18 */
19 
20 #pragma once
21 
22 #include <algorithm>
23 #include <vector>
24 #include <set>
25 #include <cstring>
26 
27 #include <stdint.h>
28 
29 #include "pbd/pool.h"
30 #include "pbd/ringbuffer.h"
31 
32 #include "temporal/bbt_time.h"
33 #include "temporal/superclock.h"
34 
36 #include "ardour/processor.h"
37 
38 namespace ARDOUR {
39 
40 class Source;
41 class SMFSource;
42 class StepSequencer;
43 
44 typedef uint64_t superclock_t;
45 
46 class BeatBox : public ARDOUR::Processor {
47  public:
50 
51  StepSequencer& sequencer() const { return *_sequencer; }
52 
53  void run (BufferSet& /*bufs*/, samplepos_t /*start_frame*/, samplepos_t /*end_frame*/, double speed, pframes_t /*nframes*/, bool /*result_required*/);
54  void silence (samplecnt_t nframes, samplepos_t start_frame);
56 
57  XMLNode& state() const;
58  XMLNode& get_state () const;
59 
60  bool fill_source (std::shared_ptr<Source>);
61 
62  private:
64 
66 
67  bool fill_midi_source (std::shared_ptr<SMFSource>);
68 
69 };
70 
71 } /* namespace */
72 
XMLNode & get_state() const
void run(BufferSet &, samplepos_t, samplepos_t, double speed, pframes_t, bool)
BeatBox(ARDOUR::Session &s)
StepSequencer & sequencer() const
Definition: beatbox.h:51
XMLNode & state() const
ARDOUR::MidiNoteTracker inbound_tracker
Definition: beatbox.h:65
StepSequencer * _sequencer
Definition: beatbox.h:63
bool fill_source(std::shared_ptr< Source >)
bool can_support_io_configuration(const ChanCount &in, ChanCount &out)
bool fill_midi_source(std::shared_ptr< SMFSource >)
void silence(samplecnt_t nframes, samplepos_t start_frame)
Definition: xml++.h:114
uint32_t pframes_t
uint64_t superclock_t
Definition: beatbox.h:42
Temporal::samplecnt_t samplecnt_t
Temporal::samplepos_t samplepos_t