Updated SWH plugins and added missing hermes_filter plugin
[lmms/mlankhorst.git] / include / drumsynth.h
blob8e566d35cc45853c5a553550b817493cb5e20a76
1 /*
2 * drumsynth.h - DrumSynth DS file renderer
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 Linux MultiMedia Studio - http://lmms.sourceforge.net
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.
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.
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.
27 #ifndef _DRUMSYNTH_H__
28 #define _DRUMSYNTH_H__
30 #include <stdint.h>
32 class DrumSynth {
33 public:
34 DrumSynth() {};
35 int GetDSFileSamples(const char *dsfile, int16_t *&wave, int channels);
37 private:
38 float LoudestEnv(void);
39 int LongestEnv(void);
40 void UpdateEnv(int e, long t);
41 void GetEnv(int env, const char *sec, const char *key, const char *ini);
43 float waveform(float ph, int form);
45 int GetPrivateProfileString(const char *sec, const char *key, const char *def, char *buffer, int size, const char *file);
46 int GetPrivateProfileInt(const char *sec, const char *key, int def, const char *file);
47 float GetPrivateProfileFloat(const char *sec, const char *key, float def, const char *file);
51 #endif