1/* FluidSynth - A Software Synthesizer 2 * 3 * Copyright (C) 2003 Peter Hanappe and others. 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public License 7 * as published by the Free Software Foundation; either version 2 of 8 * the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the Free 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18 * 02111-1307, USA 19 */ 20 21 22/* 23 24 More information about micro tuning can be found at: 25 26 http://www.midi.org/about-midi/tuning.htm 27 http://www.midi.org/about-midi/tuning-scale.htm 28 http://www.midi.org/about-midi/tuning_extens.htm 29 30*/ 31 32#ifndef _FLUID_TUNING_H 33#define _FLUID_TUNING_H 34 35#include "fluidsynth_priv.h" 36 37struct _fluid_tuning_t { 38 char* name; 39 int bank; 40 int prog; 41 double pitch[128]; /* the pitch of every key, in cents */ 42}; 43 44fluid_tuning_t* new_fluid_tuning(char* name, int bank, int prog); 45void delete_fluid_tuning(fluid_tuning_t* tuning); 46 47void fluid_tuning_set_name(fluid_tuning_t* tuning, char* name); 48char* fluid_tuning_get_name(fluid_tuning_t* tuning); 49 50#define fluid_tuning_get_bank(_t) ((_t)->bank) 51#define fluid_tuning_get_prog(_t) ((_t)->prog) 52 53void fluid_tuning_set_pitch(fluid_tuning_t* tuning, int key, double pitch); 54#define fluid_tuning_get_pitch(_t, _key) ((_t)->pitch[_key]) 55 56void fluid_tuning_set_octave(fluid_tuning_t* tuning, double* pitch_deriv); 57 58void fluid_tuning_set_all(fluid_tuning_t* tuning, double* pitch); 59#define fluid_tuning_get_all(_t) (&(_t)->pitch[0]) 60 61 62 63 64#endif /* _FLUID_TUNING_H */ 65