Ardour
9.2-654-gd2ed0bd940
scale_provider.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2026 Paul Davis <paul@linuxaudiosystems.com>
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 along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#pragma once
20
21
#include "
ardour/libardour_visibility.h
"
22
23
namespace
Temporal
{
24
class
timepos_t
;
25
}
26
27
namespace
ARDOUR
{
28
29
class
MusicalKey;
30
31
class
LIBARDOUR_API
ScaleProvider
{
32
public
:
33
ScaleProvider
(
ScaleProvider
* parent);
34
virtual
~ScaleProvider
();
35
36
ScaleProvider
*
parent
()
const
{
return
_parent; }
37
virtual
MusicalKey
const
*
key
()
const
;
38
virtual
MusicalKey
const
*
key_at
(
Temporal::timepos_t
const
&)
const
{
39
/* by default, ignore time since there's only 1 answer */
40
return
key();
41
}
42
void
set_key
(
MusicalKey
const
&);
43
44
private
:
45
ScaleProvider
*
_parent
;
46
MusicalKey
const
*
_key
;
47
};
48
49
}
// namespace
ARDOUR::MusicalKey
Definition:
ardour/ardour/scale.h:135
ARDOUR::ScaleProvider
Definition:
scale_provider.h:31
ARDOUR::ScaleProvider::key
virtual MusicalKey const * key() const
ARDOUR::ScaleProvider::ScaleProvider
ScaleProvider(ScaleProvider *parent)
ARDOUR::ScaleProvider::_key
MusicalKey const * _key
Definition:
scale_provider.h:46
ARDOUR::ScaleProvider::~ScaleProvider
virtual ~ScaleProvider()
ARDOUR::ScaleProvider::_parent
ScaleProvider * _parent
Definition:
scale_provider.h:45
ARDOUR::ScaleProvider::key_at
virtual MusicalKey const * key_at(Temporal::timepos_t const &) const
Definition:
scale_provider.h:38
ARDOUR::ScaleProvider::set_key
void set_key(MusicalKey const &)
ARDOUR::ScaleProvider::parent
ScaleProvider * parent() const
Definition:
scale_provider.h:36
Temporal::timepos_t
Definition:
timeline.h:55
libardour_visibility.h
LIBARDOUR_API
#define LIBARDOUR_API
Definition:
libardour_visibility.h:38
ARDOUR
Definition:
analysis_window.h:44
ARDOUR::timepos_t
Temporal::timepos_t timepos_t
Definition:
ardour/ardour/types.h:105
Temporal
Definition:
editing_context.h:59
libs
ardour
ardour
scale_provider.h
Generated on Tue May 5 2026 06:20:53 for Ardour by
1.9.1