lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
DummyInstrument.h
Go to the documentation of this file.
1
/*
2
* DummyInstrument.h - instrument used as fallback if an instrument couldn't
3
* be loaded
4
*
5
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6
*
7
* This file is part of LMMS - https://lmms.io
8
*
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public
20
* License along with this program (see COPYING); if not, write to the
21
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22
* Boston, MA 02110-1301 USA.
23
*
24
*/
25
26
#ifndef LMMS_DUMMY_INSTRUMENT_H
27
#define LMMS_DUMMY_INSTRUMENT_H
28
29
#include "
Instrument.h
"
30
#include "
InstrumentView.h
"
31
#include "
Engine.h
"
32
33
#include <cstring>
34
35
#include "
AudioEngine.h
"
36
37
38
namespace
lmms
39
{
40
41
42
class
DummyInstrument
:
public
Instrument
43
{
44
public
:
45
DummyInstrument
(
InstrumentTrack
* _instrument_track ) :
46
Instrument
( _instrument_track, nullptr )
47
{
48
}
49
50
~DummyInstrument
()
override
=
default
;
51
52
void
playNote
(
NotePlayHandle
*,
SampleFrame
* buffer )
override
53
{
54
zeroSampleFrames
(buffer,
Engine::audioEngine
()->framesPerPeriod());
55
}
56
57
void
saveSettings
( QDomDocument &, QDomElement & )
override
58
{
59
}
60
61
void
loadSettings
(
const
QDomElement & )
override
62
{
63
}
64
65
QString
nodeName
()
const override
66
{
67
return
"dummyinstrument"
;
68
}
69
70
gui::PluginView
*
instantiateView
( QWidget * _parent )
override
71
{
72
return
new
gui::InstrumentViewFixedSize
(
this
, _parent );
73
}
74
} ;
75
76
77
}
// namespace lmms
78
79
#endif
// LMMS_DUMMY_INSTRUMENT_H
AudioEngine.h
Engine.h
Instrument.h
InstrumentView.h
lmms::DummyInstrument::saveSettings
void saveSettings(QDomDocument &, QDomElement &) override
Definition
DummyInstrument.h:57
lmms::DummyInstrument::loadSettings
void loadSettings(const QDomElement &) override
Definition
DummyInstrument.h:61
lmms::DummyInstrument::~DummyInstrument
~DummyInstrument() override=default
lmms::DummyInstrument::instantiateView
gui::PluginView * instantiateView(QWidget *_parent) override
Create a view for the model.
Definition
DummyInstrument.h:70
lmms::DummyInstrument::nodeName
QString nodeName() const override
Definition
DummyInstrument.h:65
lmms::DummyInstrument::playNote
void playNote(NotePlayHandle *, SampleFrame *buffer) override
Definition
DummyInstrument.h:52
lmms::DummyInstrument::DummyInstrument
DummyInstrument(InstrumentTrack *_instrument_track)
Definition
DummyInstrument.h:45
lmms::Engine::audioEngine
static AudioEngine * audioEngine()
Definition
Engine.h:59
lmms::Instrument::Instrument
Instrument(InstrumentTrack *_instrument_track, const Descriptor *_descriptor, const Descriptor::SubPluginFeatures::Key *key=nullptr, Flags flags=Flag::NoFlags)
Definition
Instrument.cpp:38
lmms::InstrumentTrack
Definition
InstrumentTrack.h:62
lmms::NotePlayHandle
Definition
NotePlayHandle.h:48
lmms::SampleFrame
Definition
SampleFrame.h:41
lmms::gui::InstrumentViewFixedSize
Instrument view with fixed LMMS-default size.
Definition
InstrumentView.h:66
lmms::gui::PluginView
Definition
PluginView.h:36
lmms
Definition
RemotePluginBase.cpp:34
lmms::zeroSampleFrames
void zeroSampleFrames(SampleFrame *buffer, size_t frames)
Definition
SampleFrame.h:192
Generated on
for lmms by
1.18.0