LMMS
Loading...
Searching...
No Matches
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
34class QString;
35
36namespace lmms {
37
39{
40public:
41 DrumSynth() = default;
42 int GetDSFileSamples(QString dsfile, int16_t*& wave, int channels, sample_rate_t Fs);
43
44private:
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
static long waveform[8]
Definition adlibemu.c:197
float GetPrivateProfileFloat(const char *sec, const char *key, float def, QString file)
Definition DrumSynth.cpp:264
int LongestEnv()
Definition DrumSynth.cpp:65
void GetEnv(int env, const char *sec, const char *key, QString ini)
Definition DrumSynth.cpp:127
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
void UpdateEnv(int e, long t)
Definition DrumSynth.cpp:108
int GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sample_rate_t Fs)
Definition DrumSynth.cpp:284
DrumSynth()=default
float LoudestEnv()
Definition DrumSynth.cpp:92
int GetPrivateProfileInt(const char *sec, const char *key, int def, QString file)
Definition DrumSynth.cpp:249
* e
Definition inflate.c:1404
struct huft * t
Definition inflate.c:943
short int16_t
Definition mid.cpp:96
Definition AudioAlsa.cpp:35
std::uint32_t sample_rate_t
Definition LmmsTypes.h:42
ZCONST char * key
Definition crypt.c:587
ulg size
Definition extract.c:2350
struct zdirent * file
Definition win32.c:1500