1 /*
2  * libInstPatch
3  * Copyright (C) 1999-2014 Element Green <element@elementsofsound.org>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation; version 2.1
8  * of the License only.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA or on the web at http://www.gnu.org.
19  */
20 #ifndef __IPATCH_UNIT_SF2_H__
21 #define __IPATCH_UNIT_SF2_H__
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 int ipatch_unit_sf2_abs_pitch_to_dls_abs_pitch(int sf2_abs_pitch);
27 int ipatch_unit_dls_abs_pitch_to_sf2_abs_pitch(int dls_abs_pitch);
28 double ipatch_unit_sf2_abs_pitch_to_hertz(int sf2_abs_pitch);
29 int ipatch_unit_hertz_to_sf2_abs_pitch(double hz);
30 double ipatch_unit_sf2_ofs_pitch_to_multiplier(int sf2_ofs_pitch);
31 int ipatch_unit_multiplier_to_sf2_ofs_pitch(double multiplier);
32 
33 int ipatch_unit_sf2_abs_time_to_dls_abs_time(int sf2_abs_time);
34 int ipatch_unit_dls_abs_time_to_sf2_abs_time(int dls_abs_time);
35 double ipatch_unit_sf2_abs_time_to_seconds(int sf2_abs_time);
36 int ipatch_unit_seconds_to_sf2_abs_time(double sec);
37 double ipatch_unit_sf2_ofs_time_to_multiplier(int sf2_ofs_time);
38 int ipatch_unit_multiplier_to_sf2_ofs_time(double multiplier);
39 
40 int ipatch_unit_centibels_to_dls_gain(int centibel);
41 int ipatch_unit_dls_gain_to_centibels(int dls_gain);
42 double ipatch_unit_centibels_to_decibels(int cb);
43 int ipatch_unit_decibels_to_centibels(double db);
44 
45 double ipatch_unit_tenth_percent_to_percent(int tenth_percent);
46 int ipatch_unit_percent_to_tenth_percent(double percent);
47 
48 #endif
49