LMMS
Loading...
Searching...
No Matches
LocalZynAddSubFx.h
Go to the documentation of this file.
1/*
2 * LocalZynAddSubFx.h - local implementation of ZynAddSubFx plugin
3 *
4 * Copyright (c) 2009-2014 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 LOCAL_ZYNADDSUBFX_H
26#define LOCAL_ZYNADDSUBFX_H
27
28#include <array>
29
30#include "Note.h"
31
32class Master;
33class NulEngine;
34
35namespace lmms
36{
37
38class MidiEvent;
39class SampleFrame;
40
41
43{
44
45public:
48
49 void initConfig();
50
51 void setSampleRate( int _sampleRate );
52 void setBufferSize( int _bufferSize );
53
54 void saveXML( const std::string & _filename );
55 void loadXML( const std::string & _filename );
56
57 void loadPreset( const std::string & _filename, int _part = 0 );
58
59 void setPresetDir( const std::string & _dir );
60 void setLmmsWorkingDir( const std::string & _dir );
61
62 void setPitchWheelBendRange( int semitones );
63
64 void processMidiEvent( const MidiEvent& event );
65
66 void processAudio( SampleFrame* _out );
67
68 inline Master * master()
69 {
70 return m_master;
71 }
72
73
74protected:
75 static int s_instanceCount;
76
77 std::string m_presetsDir;
78
79 std::array<int, NumKeys> m_runningNotes = {};
82
83} ;
84
85
86} // namespace lmms
87
88#endif
Definition Master.h:55
Definition NulEngine.h:33
std::string m_presetsDir
Definition LocalZynAddSubFx.h:77
void setLmmsWorkingDir(const std::string &_dir)
Definition LocalZynAddSubFx.cpp:203
void loadPreset(const std::string &_filename, int _part=0)
Definition LocalZynAddSubFx.cpp:165
static int s_instanceCount
Definition LocalZynAddSubFx.h:75
void setBufferSize(int _bufferSize)
Definition LocalZynAddSubFx.cpp:122
NulEngine * m_ioEngine
Definition LocalZynAddSubFx.h:81
~LocalZynAddSubFx()
Definition LocalZynAddSubFx.cpp:89
void processMidiEvent(const MidiEvent &event)
Definition LocalZynAddSubFx.cpp:226
Master * m_master
Definition LocalZynAddSubFx.h:80
void saveXML(const std::string &_filename)
Definition LocalZynAddSubFx.cpp:131
LocalZynAddSubFx()
Definition LocalZynAddSubFx.cpp:57
void setPitchWheelBendRange(int semitones)
Definition LocalZynAddSubFx.cpp:216
void setSampleRate(int _sampleRate)
Definition LocalZynAddSubFx.cpp:113
void loadXML(const std::string &_filename)
Definition LocalZynAddSubFx.cpp:141
std::array< int, NumKeys > m_runningNotes
Definition LocalZynAddSubFx.h:79
void setPresetDir(const std::string &_dir)
Definition LocalZynAddSubFx.cpp:183
void initConfig()
Definition LocalZynAddSubFx.cpp:103
Master * master()
Definition LocalZynAddSubFx.h:68
void processAudio(SampleFrame *_out)
Definition LocalZynAddSubFx.cpp:269
Definition MidiEvent.h:37
Definition SampleFrame.h:41
Definition AudioAlsa.cpp:35