ramsfont.h
上传用户:tjmskj2
上传日期:2020-08-17
资源大小:577k
文件大小:3k
- /* FluidSynth - A Software Synthesizer
- *
- * Copyright (C) 2003 Peter Hanappe and others.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License
- * as published by the Free Software Foundation; either version 2 of
- * 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- */
- /* RAM SoundFonts: October 2002 - Antoine Schmitt */
- #ifndef _FLUIDSYNTH_RAMSFONT_H
- #define _FLUIDSYNTH_RAMSFONT_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- /**
- * @file ramsfont.h
- * @brief API for creating and managing SoundFont instruments in RAM.
- *
- * RAM SoundFonts live in ram. The samples are loaded from files
- * or from RAM. A minimal API manages a soundFont structure,
- * with presets, each preset having only one preset-zone, which
- * instrument has potentially many instrument-zones. No global
- * zones, and nor generator nor modulator other than the default
- * ones are permitted. This may be extensible in the future.
- */
- FLUIDSYNTH_API fluid_sfont_t* fluid_ramsfont_create_sfont(void);
- FLUIDSYNTH_API int fluid_ramsfont_set_name(fluid_ramsfont_t* sfont, const char *name);
- FLUIDSYNTH_API
- int fluid_ramsfont_add_izone(fluid_ramsfont_t* sfont,
- unsigned int bank, unsigned int num, fluid_sample_t* sample,
- int lokey, int hikey);
- FLUIDSYNTH_API
- int fluid_ramsfont_remove_izone(fluid_ramsfont_t* sfont,
- unsigned int bank, unsigned int num, fluid_sample_t* sample);
- FLUIDSYNTH_API
- int fluid_ramsfont_izone_set_gen(fluid_ramsfont_t* sfont,
- unsigned int bank, unsigned int num, fluid_sample_t* sample,
- int gen_type, float value);
- FLUIDSYNTH_API
- int fluid_ramsfont_izone_set_loop(fluid_ramsfont_t* sfont,
- unsigned int bank, unsigned int num, fluid_sample_t* sample,
- int on, float loopstart, float loopend);
- FLUIDSYNTH_API fluid_sample_t* new_fluid_ramsample(void);
- FLUIDSYNTH_API int delete_fluid_ramsample(fluid_sample_t* sample);
- FLUIDSYNTH_API int fluid_sample_set_name(fluid_sample_t* sample, const char *name);
- FLUIDSYNTH_API
- int fluid_sample_set_sound_data(fluid_sample_t* sample, short *data,
- unsigned int nbframes, short copy_data, int rootkey);
- #ifdef __cplusplus
- }
- #endif
- #endif /* _FLUIDSYNTH_RAMSFONT_H */