Expose voice detune parameter of the lv2 plugin
[zyn.git] / util.h
blobe549061374cc6b01abeb856b227d4e01feac88aa
1 /*
2 ZynAddSubFX - a software synthesizer
4 Util.h - Miscellaneous functions
5 Copyright (C) 2002-2005 Nasca Octavian Paul
6 Author: Nasca Octavian Paul
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of version 2 of the GNU General Public License
10 as published by the Free Software Foundation.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License (version 2) for more details.
17 You should have received a copy of the GNU General Public License (version 2)
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef UTIL_H
24 #define UTIL_H
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 #if 0
30 } /* Adjust editor indent */
31 #endif
33 // Velocity Sensing function
34 extern REALTYPE VelF(REALTYPE velocity,unsigned char scaling);
36 float
37 zyn_velocity_scale(float velocity, float scaling);
39 REALTYPE
40 zyn_get_detune(
41 signed int type,
42 signed int octave,
43 signed int coarse,
44 float fine);
46 void
47 silence_buffer(
48 zyn_sample_type * buffer,
49 size_t size);
51 void
52 silence_two_buffers(
53 zyn_sample_type * buffer1,
54 zyn_sample_type * buffer2,
55 size_t size);
57 void
58 mix_add_two_buffers(
59 zyn_sample_type * buffer_mix_1,
60 zyn_sample_type * buffer_mix_2,
61 zyn_sample_type * buffer1,
62 zyn_sample_type * buffer2,
63 size_t size);
65 void
66 fadeout_two_buffers(
67 zyn_sample_type * buffer1,
68 zyn_sample_type * buffer2,
69 size_t size);
71 void
72 copy_buffer(
73 zyn_sample_type * buffer_dest,
74 zyn_sample_type * buffer_src,
75 size_t size);
77 void
78 multiply_buffer(
79 zyn_sample_type * buffer,
80 float multiplyer,
81 size_t size);
84 * Random generator (0.0..1.0)
86 float
87 zyn_random();
89 #define ZYN_BOOL_XOR(p, q) (((p) && !(q)) || (!(p) && (q)))
91 #if 0
92 { /* Adjust editor indent */
93 #endif
94 #ifdef __cplusplus
95 } /* extern "C" */
96 #endif
98 #endif