Ardour
9.0-pre0-582-g084a23a80d
quantize.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2007-2015 David Robillard <d@drobilla.net>
3
* Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
*/
19
20
#pragma once
21
22
#include "
ardour/libardour_visibility.h
"
23
#include "
ardour/types.h
"
24
#include "
ardour/midi_operator.h
"
25
26
namespace
ARDOUR
{
27
28
class
LIBARDOUR_API
Quantize
:
public
MidiOperator
{
29
public
:
30
Quantize
(
bool
snap_start,
bool
snap_end,
31
Temporal::Beats
start_grid,
Temporal::Beats
end_grid,
32
float
strength,
float
swing,
Temporal::Beats
const
& threshold);
33
~Quantize
();
34
35
PBD::Command
* operator() (std::shared_ptr<ARDOUR::MidiModel>,
36
Temporal::Beats
position
,
37
std::vector<
Evoral::Sequence<Temporal::Beats>::Notes
>&);
38
std::string
name
()
const
{
return
std::string (
"quantize"
); }
39
bool
empty
()
const
{
return
!_snap_start && !_snap_end; }
40
41
Temporal::Beats
start_grid
()
const
{
return
_start_grid; }
42
Temporal::Beats
end_grid
()
const
{
return
_end_grid; }
43
void
set_start_grid
(
Temporal::Beats
const
&);
44
void
set_end_grid
(
Temporal::Beats
const
&);
45
46
private
:
47
bool
_snap_start
;
48
bool
_snap_end
;
49
Temporal::Beats
_start_grid
;
50
Temporal::Beats
_end_grid
;
51
float
_strength
;
52
float
_swing
;
53
Temporal::Beats
_threshold
;
54
};
55
56
}
/* namespace */
57
types.h
ARDOUR::MidiOperator
Definition:
midi_operator.h:38
ARDOUR::Quantize
Definition:
quantize.h:28
ARDOUR::Quantize::_start_grid
Temporal::Beats _start_grid
Definition:
quantize.h:49
ARDOUR::Quantize::Quantize
Quantize(bool snap_start, bool snap_end, Temporal::Beats start_grid, Temporal::Beats end_grid, float strength, float swing, Temporal::Beats const &threshold)
ARDOUR::Quantize::_strength
float _strength
Definition:
quantize.h:51
ARDOUR::Quantize::~Quantize
~Quantize()
ARDOUR::Quantize::_swing
float _swing
Definition:
quantize.h:52
ARDOUR::Quantize::_threshold
Temporal::Beats _threshold
Definition:
quantize.h:53
ARDOUR::Quantize::_snap_end
bool _snap_end
Definition:
quantize.h:48
ARDOUR::Quantize::set_end_grid
void set_end_grid(Temporal::Beats const &)
ARDOUR::Quantize::end_grid
Temporal::Beats end_grid() const
Definition:
quantize.h:42
ARDOUR::Quantize::start_grid
Temporal::Beats start_grid() const
Definition:
quantize.h:41
ARDOUR::Quantize::_snap_start
bool _snap_start
Definition:
quantize.h:47
ARDOUR::Quantize::empty
bool empty() const
Definition:
quantize.h:39
ARDOUR::Quantize::_end_grid
Temporal::Beats _end_grid
Definition:
quantize.h:50
ARDOUR::Quantize::name
std::string name() const
Definition:
quantize.h:38
ARDOUR::Quantize::set_start_grid
void set_start_grid(Temporal::Beats const &)
Evoral::Sequence::Notes
std::multiset< NotePtr, EarlierNoteComparator > Notes
Definition:
Sequence.h:157
PBD::Command
Definition:
command.h:35
Temporal::Beats
Definition:
beats.h:65
libardour_visibility.h
LIBARDOUR_API
#define LIBARDOUR_API
Definition:
libardour_visibility.h:38
midi_operator.h
ARDOUR
Definition:
analysis_window.h:44
MIDI::position
@ position
Definition:
midi++2/midi++/types.h:51
libs
ardour
ardour
quantize.h
Generated on Wed Dec 25 2024 05:44:45 for Ardour by
1.9.1