2003-03-11 16:56:45 +00:00
|
|
|
/* FluidSynth - A Software Synthesizer
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Peter Hanappe and others.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2017-07-12 15:45:23 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public License
|
2017-07-12 15:53:03 +00:00
|
|
|
* as published by the Free Software Foundation; either version 2.1 of
|
2003-03-11 16:56:45 +00:00
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2017-07-12 15:45:23 +00:00
|
|
|
* Lesser General Public License for more details.
|
2007-03-04 16:45:05 +00:00
|
|
|
*
|
2017-07-12 15:54:54 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2003-03-11 16:56:45 +00:00
|
|
|
* License along with this library; if not, write to the Free
|
2011-08-15 12:57:10 +00:00
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
* 02110-1301, USA
|
2003-03-11 16:56:45 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
More information about micro tuning can be found at:
|
|
|
|
|
|
|
|
http://www.midi.org/about-midi/tuning.htm
|
|
|
|
http://www.midi.org/about-midi/tuning-scale.htm
|
|
|
|
http://www.midi.org/about-midi/tuning_extens.htm
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FLUID_TUNING_H
|
|
|
|
#define _FLUID_TUNING_H
|
|
|
|
|
|
|
|
#include "fluidsynth_priv.h"
|
|
|
|
|
|
|
|
struct _fluid_tuning_t {
|
|
|
|
char* name;
|
|
|
|
int bank;
|
|
|
|
int prog;
|
|
|
|
double pitch[128]; /* the pitch of every key, in cents */
|
2009-09-25 00:56:48 +00:00
|
|
|
int refcount; /* Tuning reference count */
|
2003-03-11 16:56:45 +00:00
|
|
|
};
|
|
|
|
|
2009-10-28 19:38:10 +00:00
|
|
|
fluid_tuning_t* new_fluid_tuning(const char* name, int bank, int prog);
|
2009-09-25 00:56:48 +00:00
|
|
|
void delete_fluid_tuning (fluid_tuning_t *tuning);
|
|
|
|
fluid_tuning_t *fluid_tuning_duplicate (fluid_tuning_t *tuning);
|
|
|
|
void fluid_tuning_ref (fluid_tuning_t *tuning);
|
|
|
|
int fluid_tuning_unref (fluid_tuning_t *tuning, int count);
|
2003-03-11 16:56:45 +00:00
|
|
|
|
|
|
|
void fluid_tuning_set_name(fluid_tuning_t* tuning, char* name);
|
|
|
|
char* fluid_tuning_get_name(fluid_tuning_t* tuning);
|
|
|
|
|
|
|
|
#define fluid_tuning_get_bank(_t) ((_t)->bank)
|
|
|
|
#define fluid_tuning_get_prog(_t) ((_t)->prog)
|
|
|
|
|
|
|
|
void fluid_tuning_set_pitch(fluid_tuning_t* tuning, int key, double pitch);
|
|
|
|
#define fluid_tuning_get_pitch(_t, _key) ((_t)->pitch[_key])
|
|
|
|
|
2009-10-28 19:38:10 +00:00
|
|
|
void fluid_tuning_set_octave(fluid_tuning_t* tuning, const double* pitch_deriv);
|
2003-03-11 16:56:45 +00:00
|
|
|
|
2009-10-28 19:38:10 +00:00
|
|
|
void fluid_tuning_set_all(fluid_tuning_t* tuning, const double* pitch);
|
2003-03-11 16:56:45 +00:00
|
|
|
#define fluid_tuning_get_all(_t) (&(_t)->pitch[0])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _FLUID_TUNING_H */
|