23 #ifndef _FLUID_DEFSFONT_H 24 #define _FLUID_DEFSFONT_H 70 void read_listchunk(
SFChunk* chunk);
71 void process_info(
int size);
72 void process_sdta(
unsigned int size);
73 void pdtahelper(
unsigned int expid,
unsigned int reclen,
SFChunk* chunk,
int* size);
75 void process_pdta(
int size);
76 void load_phdr(
int size);
77 void load_pbag(
int size);
78 void load_pmod(
int size);
79 void load_pgen(
int size);
80 void load_ihdr(
int size);
81 void load_ibag(
int size);
82 void load_imod(
int size);
83 void load_igen(
int size);
84 void load_shdr(
int size);
91 unsigned short READW();
92 void READD(
unsigned int& var);
93 void FSKIP(
int size) {
return safe_fseek(size); }
95 unsigned char READB();
99 void safe_fread(
void *buf,
int count);
100 void safe_fseek(
long ofs);
108 Preset* get_preset(
int bank,
int prenum);
110 bool read(
const QString& file);
112 int load_sampledata();
114 int id()
const {
return _id; }
162 bool valid()
const {
return _valid; }
165 bool decompressOggVorbis(
char* p,
int size);
193 bool inside_range(
int key,
int vel)
const;
236 bool noteon(
Fluid*,
unsigned id,
int chan,
int key,
int vel,
double nt);
317 #define Gen_MaxValid Gen_Dummy - 1 335 #define CHNKIDSTR(id) &idlist[(id - 1) * 4] 338 #define SFPHDRSIZE 38 342 #define SFIHDRSIZE 22 343 #define SFSHDRSIZE 46 348 unsigned char name[20];
369 #define GUINT16_SWAP_LE_BE_CONSTANT(val) ((unsigned short) ( \ 370 (((unsigned short) (val) & (unsigned short) 0x00ffU) << 8) | \ 371 (((unsigned short) (val) & (unsigned short) 0xff00U) >> 8))) 372 #define GUINT32_SWAP_LE_BE_CONSTANT(val) ((unsigned int) ( \ 373 (((unsigned int) (val) & (unsigned int) 0x000000ffU) << 24) | \ 374 (((unsigned int) (val) & (unsigned int) 0x0000ff00U) << 8) | \ 375 (((unsigned int) (val) & (unsigned int) 0x00ff0000U) >> 8) | \ 376 (((unsigned int) (val) & (unsigned int) 0xff000000U) >> 24))) 378 #define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val)) 379 #define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val)) 381 #define GINT16_TO_LE(val) ((signed short) (val)) 382 #define GUINT16_TO_LE(val) ((unsigned short) (val)) 383 #define GINT16_TO_BE(val) ((signed short) GUINT16_SWAP_LE_BE (val)) 384 #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) 385 #define GINT32_TO_LE(val) ((signed int) (val)) 386 #define GUINT32_TO_LE(val) ((unsigned int) (val)) 387 #define GINT32_TO_BE(val) ((signed int) GUINT32_SWAP_LE_BE (val)) 388 #define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) 393 #define GINT16_FROM_LE(val) (GINT16_TO_LE (val)) 394 #define GUINT16_FROM_LE(val) (GUINT16_TO_LE (val)) 395 #define GINT16_FROM_BE(val) (GINT16_TO_BE (val)) 396 #define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val)) 397 #define GINT32_FROM_LE(val) (GINT32_TO_LE (val)) 398 #define GUINT32_FROM_LE(val) (GUINT32_TO_LE (val)) 399 #define GINT32_FROM_BE(val) (GINT32_TO_BE (val)) 400 #define GUINT32_FROM_BE(val) (GUINT32_TO_BE (val))
unsigned short bank
Definition: sfont.h:350
const QList< Preset * > getPresets() const
Definition: sfont.h:119
unsigned short minor
Definition: sfont.h:44
unsigned short major
Definition: sfont.h:44
SFGenAmount amount
Definition: sfont.h:274
Instrument * get_inst() const
Definition: sfont.h:194
unsigned short id
Definition: sfont.h:273
unsigned short ibagndx
Definition: sfont.h:364
unsigned int size
Definition: sfont.h:252
Sample * get_sample() const
Definition: sfont.h:195
SFont * sfont
Definition: sfont.h:222
Zone * get_global_zone() const
Definition: sfont.h:210
Instrument * instrument
Definition: sfont.h:178
int sampletype
Definition: sfont.h:144
unsigned samplepos
Definition: sfont.h:55
int id() const
Definition: sfont.h:114
int pitchadj
Definition: sfont.h:143
void setId(int i)
Definition: sfont.h:115
unsigned short amtsrc
Definition: sfont.h:259
short * data
Definition: sfont.h:146
int bank
Definition: sfont.h:223
QString get_name() const
Definition: sfont.h:233
unsigned short modndx
Definition: sfont.h:359
unsigned short dest
Definition: sfont.h:257
int bankOffset() const
Definition: sfont.h:121
QString get_name() const
Definition: sfont.h:107
QList< unsigned char * > infos
Definition: sfont.h:68
unsigned int library
Definition: sfont.h:352
unsigned int morphology
Definition: sfont.h:354
signed short sword
Definition: sfont.h:264
signed short amount
Definition: sfont.h:258
unsigned samplesize
Definition: sfont.h:56
unsigned int samplerate
Definition: sfont.h:141
void setValid(bool v)
Definition: sfont.h:163
unsigned int genre
Definition: sfont.h:353
int get_banknum() const
Definition: sfont.h:234
Fluid * synth
Definition: sfont.h:53
bool _valid
Definition: sfont.h:133
QList< Mod * > modlist
Definition: sfont.h:187
unsigned short genndx
Definition: sfont.h:358
QList< SFMod * > mod
Definition: sfont.h:183
QList< Zone * > getZones()
Definition: sfont.h:243
int get_num() const
Definition: sfont.h:235
unsigned short uword
Definition: sfont.h:265
void setBankOffset(int val)
Definition: sfont.h:122
QString fontName() const
Definition: sfont.h:123
Value defines the count of generators (fluid_gen_type)
Definition: fluid.h:209
unsigned int end
Definition: sfont.h:138
QList< Sample * > sample
Definition: sfont.h:60
int _id
Definition: sfont.h:62
unsigned getSamplesize() const
Definition: sfont.h:118
unsigned int samplePos() const
Definition: sfont.h:113
unsigned int loopend
Definition: sfont.h:140
int num
Definition: sfont.h:224
Gen_Unit
Definition: sfont.h:320
unsigned int start
Definition: sfont.h:137
Zone * _global_zone
Definition: sfont.h:226
QString name
Definition: sfont.h:221
bool valid() const
Definition: sfont.h:162
void FSKIP(int size)
Definition: sfont.h:93
void setSamplesize(unsigned v)
Definition: sfont.h:117
QList< Zone * > get_zone()
Definition: sfont.h:211
SFVersion _version
Definition: sfont.h:65
QList< SFGen * > gen
Definition: sfont.h:182
double amplitude_that_reaches_noise_floor
Definition: sfont.h:154
int instIdx
Definition: sfont.h:179
void setGlobalZone(Zone *z)
Definition: sfont.h:238
int _bankOffset
Definition: sfont.h:63
bool amplitude_that_reaches_noise_floor_is_valid
The amplitude, that will lower the level of the sample's loop to the noise floor. ...
Definition: sfont.h:153
unsigned char lo
Definition: sfont.h:267
unsigned short preset
Definition: sfont.h:349
unsigned short pbagndx
Definition: sfont.h:351
QString _fontName
Definition: sfont.h:67
int vello
Definition: sfont.h:185
QFile f
Definition: sfont.h:54
unsigned short trans
Definition: sfont.h:260
SFVersion()
Definition: sfont.cpp:40
SoundFont generator structure.
Definition: fluid.h:498
SFVersion romver
Definition: sfont.h:66
int sampIdx
Definition: sfont.h:177
QList< Zone * > zones
Definition: sfont.h:227
SFVersion version() const
Definition: sfont.h:120
int origpitch
Definition: sfont.h:142
Gen_Type
Definition: sfont.h:296
void setSamplepos(unsigned v)
Definition: sfont.h:116
Zone * global_zone()
Definition: sfont.h:241
Sample * sample
Definition: sfont.h:176
QList< Instrument * > instruments
Definition: sfont.h:58
unsigned int loopstart
Definition: sfont.h:139
unsigned int id
Definition: sfont.h:251
QList< Preset * > presets
Definition: sfont.h:59
SFont * sf
Definition: sfont.h:136
unsigned char hi
Definition: sfont.h:268
QList< Zone * > zones
Definition: sfont.h:205
Zone * global_zone
Definition: sfont.h:204
unsigned short src
Definition: sfont.h:256