iiwusynth-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iiwusynth-devel] API changes : ramsfont


From: Antoine Schmitt
Subject: [iiwusynth-devel] API changes : ramsfont
Date: Sun, 9 Mar 2003 20:11:59 +0100


Ok,
so here are the API changes that I wanted to make before API freeze. They only concern the ramsfont.h file.

The idea was to enable more access to the soundfont data structure, in termes of looppoints and generators.

After discussion with Peter, here what it now looks like.
Basically, I have changed the names and API of the following function:
        iiwu_ramsfont_add_izone

And I've added the following functions:
        iiwu_ramsfont_remove_izone
        iiwu_ramsfont_izone_set_gen
        iiwu_ramsfont_izone_set_loop

I think I was the only one to use this API (in the Xtra), so I dont think I have broken anything.

I have committed the changes.

Cheers,

        Antoine


/***********************
 * ramsfont specific API
 ***********************/
IIWUSYNTH_API int iiwu_ramsfont_set_name(iiwu_ramsfont_t* sfont, char * name);

/* Creates one instrument zone for the sample inside the preset defined
 *     by bank/num
 *     \returns 0 if success
 */
IIWUSYNTH_API
int iiwu_ramsfont_add_izone(iiwu_ramsfont_t* sfont,
unsigned int bank, unsigned int num, iiwu_sample_t* sample,
                                int lokey, int hikey);

/* Removes the instrument zone corresponding to bank/num and to the sample
 *     \returns 0 if success
 */
IIWUSYNTH_API
int iiwu_ramsfont_remove_izone(iiwu_ramsfont_t* sfont,
unsigned int bank, unsigned int num, iiwu_sample_t* sample);

/* Sets a generator on an instrument zone
 *     \returns 0 if success
 */
IIWUSYNTH_API
int iiwu_ramsfont_izone_set_gen(iiwu_ramsfont_t* sfont,
unsigned int bank, unsigned int num, iiwu_sample_t* sample,
                                int gen_type, float value);

/* Utility : sets the loop start/end values
 *     \loopstart and loopend are floats, in frames
 *     \loopstart is counted from frame 0
 *     \loopend is counted from the last frame, thus is < 0
 *     \returns 0 if success
 */
IIWUSYNTH_API
int iiwu_ramsfont_izone_set_loop(iiwu_ramsfont_t* sfont,
unsigned int bank, unsigned int num, iiwu_sample_t* sample,
                                float loopstart, float loopend);

/***************************************
 * sample_t specific API for ramsfont
 ***************************************/
IIWUSYNTH_API iiwu_sample_t* new_iiwu_ramsample(void);
IIWUSYNTH_API int delete_iiwu_ramsample(iiwu_sample_t* sample);
IIWUSYNTH_API int iiwu_sample_set_name(iiwu_sample_t* sample, char * name);

/* Sets the sound data of the sample
* Warning : if copy_data is FALSE, data should have 8 unused frames at start
 *     and 8 unused frames at the end.
 */
IIWUSYNTH_API
int iiwu_sample_set_sound_data(iiwu_sample_t* sample, short *data,
unsigned int nbframes, short copy_data, int rootkey);








reply via email to

[Prev in Thread] Current Thread [Next in Thread]