LMMS
Loading...
Searching...
No Matches
InstrumentSoundShaping.h
Go to the documentation of this file.
1/*
2 * InstrumentSoundShaping.h - declaration of class InstrumentSoundShaping
3 *
4 * Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5 *
6 * This file is part of LMMS - https://lmms.io
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
22 *
23 */
24
25#ifndef LMMS_INSTRUMENT_SOUND_SHAPING_H
26#define LMMS_INSTRUMENT_SOUND_SHAPING_H
27
28#include "ComboBoxModel.h"
30
31namespace lmms
32{
33
34
35class InstrumentTrack;
36class NotePlayHandle;
37class SampleFrame;
38
39namespace gui
40{
42}
43
44
46{
47 Q_OBJECT
48public:
49 InstrumentSoundShaping( InstrumentTrack * _instrument_track );
50 ~InstrumentSoundShaping() override = default;
51
52 void processAudioBuffer( SampleFrame* _ab, const f_cnt_t _frames,
53 NotePlayHandle * _n );
54
57
60
63
68
69 f_cnt_t envFrames( const bool _only_vol = false ) const;
70 f_cnt_t releaseFrames() const;
71
72 float volumeLevel( NotePlayHandle * _n, const f_cnt_t _frame );
73
74
75 void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
76 void loadSettings( const QDomElement & _this ) override;
77 inline QString nodeName() const override
78 {
79 return "eldata";
80 }
81
82private:
83 QString getVolumeNodeName() const;
84 QString getCutoffNodeName() const;
85 QString getResonanceNodeName() const;
86
87private:
89
93
98};
99
100
101} // namespace lmms
102
103#endif // LMMS_INSTRUMENT_SOUND_SHAPING_H
Definition AutomatableModel.h:497
Definition ComboBoxModel.h:39
Definition EnvelopeAndLfoParameters.h:47
Definition AutomatableModel.h:463
void loadSettings(const QDomElement &_this) override
Definition InstrumentSoundShaping.cpp:341
ComboBoxModel m_filterModel
Definition InstrumentSoundShaping.h:95
ComboBoxModel & getFilterModel()
Definition InstrumentSoundShaping.h:65
FloatModel & getFilterCutModel()
Definition InstrumentSoundShaping.h:66
EnvelopeAndLfoParameters m_cutoffParameters
Definition InstrumentSoundShaping.h:91
QString getCutoffNodeName() const
Definition InstrumentSoundShaping.cpp:377
BoolModel & getFilterEnabledModel()
Definition InstrumentSoundShaping.h:64
EnvelopeAndLfoParameters m_volumeParameters
Definition InstrumentSoundShaping.h:90
EnvelopeAndLfoParameters & getCutoffParameters()
Definition InstrumentSoundShaping.h:59
EnvelopeAndLfoParameters m_resonanceParameters
Definition InstrumentSoundShaping.h:92
QString getResonanceNodeName() const
Definition InstrumentSoundShaping.cpp:382
const EnvelopeAndLfoParameters & getCutoffParameters() const
Definition InstrumentSoundShaping.h:58
QString getVolumeNodeName() const
Definition InstrumentSoundShaping.cpp:372
const EnvelopeAndLfoParameters & getResonanceParameters() const
Definition InstrumentSoundShaping.h:61
FloatModel m_filterResModel
Definition InstrumentSoundShaping.h:97
f_cnt_t envFrames(const bool _only_vol=false) const
Definition InstrumentSoundShaping.cpp:259
EnvelopeAndLfoParameters & getResonanceParameters()
Definition InstrumentSoundShaping.h:62
QString nodeName() const override
Definition InstrumentSoundShaping.h:77
f_cnt_t releaseFrames() const
Definition InstrumentSoundShaping.cpp:284
float volumeLevel(NotePlayHandle *_n, const f_cnt_t _frame)
Definition InstrumentSoundShaping.cpp:90
EnvelopeAndLfoParameters & getVolumeParameters()
Definition InstrumentSoundShaping.h:56
InstrumentSoundShaping(InstrumentTrack *_instrument_track)
Definition InstrumentSoundShaping.cpp:45
FloatModel & getFilterResModel()
Definition InstrumentSoundShaping.h:67
void processAudioBuffer(SampleFrame *_ab, const f_cnt_t _frames, NotePlayHandle *_n)
Definition InstrumentSoundShaping.cpp:108
InstrumentTrack * m_instrumentTrack
Definition InstrumentSoundShaping.h:88
FloatModel m_filterCutModel
Definition InstrumentSoundShaping.h:96
~InstrumentSoundShaping() override=default
void saveSettings(QDomDocument &_doc, QDomElement &_parent) override
Definition InstrumentSoundShaping.cpp:326
BoolModel m_filterEnabledModel
Definition InstrumentSoundShaping.h:94
const EnvelopeAndLfoParameters & getVolumeParameters() const
Definition InstrumentSoundShaping.h:55
Definition InstrumentTrack.h:62
JournallingObject()
Definition JournallingObject.cpp:36
Model(Model *parent, QString displayName=QString(), bool defaultConstructed=false)
Definition Model.cpp:30
Definition NotePlayHandle.h:48
Definition SampleFrame.h:41
Definition InstrumentSoundShapingView.h:47
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35
std::uint64_t f_cnt_t
Definition LmmsTypes.h:43