vp->v.resonance = vp->resonance; 
static void set_init_info(SFInfo *sf, SampleList *vp, LayerTable *tbl){    int val, pan, i;    SFSampleInfo *sample;    sample = &sf->sample[tbl->val[SF_sampleId]];    /* key range */    if(tbl->set[SF_keyRange])    {	vp->low = LOWNUM(tbl->val[SF_keyRange]);	vp->high = HIGHNUM(tbl->val[SF_keyRange]);    }    else    {	vp->low = 0;	vp->high = 127;    }    vp->v.low_freq = freq_table[(int)vp->low];    vp->v.high_freq = freq_table[(int)vp->high];    /* velocity range */    if(tbl->set[SF_velRange]) {		vp->v.low_vel = LOWNUM(tbl->val[SF_velRange]);		vp->v.high_vel = HIGHNUM(tbl->val[SF_velRange]);    } else {		vp->v.low_vel = 0;		vp->v.high_vel = 127;	}    /* fixed key & velocity */    if(tbl->set[SF_keynum])		vp->v.note_to_use = (int)tbl->val[SF_keynum];	if(tbl->set[SF_velocity] && (int)tbl->val[SF_velocity] != 0) {		ctl->cmsg(CMSG_INFO,VERB_DEBUG,"error: fixed-velocity is not supported.");	}	vp->v.sample_type = sample->sampletype;	vp->v.sf_sample_index = tbl->val[SF_sampleId];	if (sample->sampletype == SF_SAMPLETYPE_MONO) {		vp->v.sf_sample_link = -1;	} else {		vp->v.sf_sample_link = sample->samplelink;	}	/* panning position: 0 to 127 */	val = (int)tbl->val[SF_panEffectsSend];    if(sample->sampletype == SF_SAMPLETYPE_MONO || val != 0) {	/* monoSample = 1 */		if(val < -500)		vp->v.panning = 0;		else if(val > 500)		vp->v.panning = 127;		else		vp->v.panning = (int8)((val + 500) * 127 / 1000);	} else if(sample->sampletype == SF_SAMPLETYPE_RIGHT) {	/* rightSample = 2 */		vp->v.panning = 127;	} else if(sample->sampletype == SF_SAMPLETYPE_LEFT) {	/* leftSample = 4 */		vp->v.panning = 0;	} else if(sample->sampletype == SF_SAMPLETYPE_LINKED) {	/* linkedSample = 8 */		ctl->cmsg(CMSG_ERROR,VERB_NOISY,"error: linkedSample is not supported.");	}	memset(vp->v.envelope_keyf, 0, sizeof(vp->v.envelope_keyf));	memset(vp->v.modenv_keyf, 0, sizeof(vp->v.modenv_keyf));	if(tbl->set[SF_autoHoldEnv2]) {		vp->v.envelope_keyf[1] = (int16)tbl->val[SF_autoHoldEnv2];	}	if(tbl->set[SF_autoDecayEnv2]) {		vp->v.envelope_keyf[2] = (int16)tbl->val[SF_autoDecayEnv2];	}	if(tbl->set[SF_autoHoldEnv1]) {		vp->v.modenv_keyf[1] = (int16)tbl->val[SF_autoHoldEnv1];	}	if(tbl->set[SF_autoDecayEnv1]) {		vp->v.modenv_keyf[2] = (int16)tbl->val[SF_autoDecayEnv1];	}#ifndef CFG_FOR_SF	if(opt_lpf_def) {		current_sfrec->def_cutoff_allowed = 1;		current_sfrec->def_resonance_allowed = 1;	}#endif    /* initial cutoff & resonance */    vp->cutoff_freq = 0;    if((int)tbl->val[SF_initialFilterFc] < 0)	tbl->set[SF_initialFilterFc] = tbl->val[SF_initialFilterFc] = 0;    if(current_sfrec->def_cutoff_allowed &&       (tbl->set[SF_initialFilterFc] && (int)tbl->val[SF_initialFilterFc] <= 13500 && (int)tbl->val[SF_initialFilterFc] >= 1500))    {	if(!tbl->set[SF_initialFilterFc])	    val = 13500;	else	    val = (int)tbl->val[SF_initialFilterFc];	val = abscent_to_Hz(val);#ifndef CFG_FOR_SF	if(!opt_modulation_envelope) {		if(tbl->set[SF_env1ToFilterFc] && (int)tbl->val[SF_env1ToFilterFc] > 0)		{			val *= pow(2.0,(double)tbl->val[SF_env1ToFilterFc] / 1200.0f);			if(val > 20000) {val = 20000;}		}	}#endif	vp->cutoff_freq = val;    }    if(current_sfrec->def_resonance_allowed && tbl->set[SF_initialFilterQ])    {	val = (int)tbl->val[SF_initialFilterQ];	vp->resonance = val;	}#if 0 /* Not supported */    /* exclusive class key */    vp->exclusiveClass = tbl->val[SF_keyExclusiveClass];#endif}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/6158fd5fefa958969b8c6a163c85781e3fd80559/sndfont.c/clean/timidity/sndfont.c