lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
DrumSynth.h
Go to the documentation of this file.
1
/*
2
* DrumSynth.h - DrumSynth DS file renderer
3
*
4
* Copyright (c) 1998-2000 Paul Kellett (mda-vst.com)
5
* Copyright (c) 2007 Paul Giblock <drfaygo/at/gmail.com>
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_DRUM_SYNTH_H
27
#define LMMS_DRUM_SYNTH_H
28
29
#include <cstddef>
30
#include <cstdint>
31
32
#include "
LmmsTypes.h
"
33
34
class
QString;
35
36
namespace
lmms
{
37
38
class
DrumSynth
39
{
40
public
:
41
DrumSynth
() =
default
;
42
int
GetDSFileSamples
(QString dsfile, int16_t*& wave,
int
channels,
sample_rate_t
Fs);
43
44
private
:
45
float
LoudestEnv
();
46
int
LongestEnv
();
47
void
UpdateEnv
(
int
e,
long
t);
48
void
GetEnv
(
int
env,
const
char
* sec,
const
char
* key, QString ini);
49
50
float
waveform
(
float
ph,
int
form);
51
52
std::size_t
GetPrivateProfileString
(
const
char
* sec,
53
const
char
* key,
const
char
* def,
char
* buffer,
54
std::size_t size, QString file);
55
int
GetPrivateProfileInt
(
const
char
* sec,
const
char
* key,
int
def, QString file);
56
float
GetPrivateProfileFloat
(
const
char
* sec,
const
char
* key,
float
def, QString file);
57
};
58
59
}
// namespace lmms
60
61
#endif
// LMMS_DRUM_SYNTH_H
LmmsTypes.h
lmms::DrumSynth::GetPrivateProfileFloat
float GetPrivateProfileFloat(const char *sec, const char *key, float def, QString file)
Definition
DrumSynth.cpp:264
lmms::DrumSynth::LongestEnv
int LongestEnv()
Definition
DrumSynth.cpp:65
lmms::DrumSynth::GetEnv
void GetEnv(int env, const char *sec, const char *key, QString ini)
Definition
DrumSynth.cpp:127
lmms::DrumSynth::GetPrivateProfileString
std::size_t GetPrivateProfileString(const char *sec, const char *key, const char *def, char *buffer, std::size_t size, QString file)
Definition
DrumSynth.cpp:189
lmms::DrumSynth::UpdateEnv
void UpdateEnv(int e, long t)
Definition
DrumSynth.cpp:108
lmms::DrumSynth::GetDSFileSamples
int GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sample_rate_t Fs)
Definition
DrumSynth.cpp:284
lmms::DrumSynth::DrumSynth
DrumSynth()=default
lmms::DrumSynth::waveform
float waveform(float ph, int form)
Definition
DrumSynth.cpp:173
lmms::DrumSynth::LoudestEnv
float LoudestEnv()
Definition
DrumSynth.cpp:92
lmms::DrumSynth::GetPrivateProfileInt
int GetPrivateProfileInt(const char *sec, const char *key, int def, QString file)
Definition
DrumSynth.cpp:249
lmms
Definition
RemotePluginBase.cpp:34
lmms::sample_rate_t
std::uint32_t sample_rate_t
Definition
LmmsTypes.h:42
Generated on
for lmms by
1.18.0