if(opt_resonance) { 
/*	if(opt_resonance) {*/ 
static void update_rpn_map(int ch, int addr, int update_now){    int note, val, drumflag;    val = channel[ch].rpnmap[addr];    drumflag = 0;    switch(addr)    {      case NRPN_ADDR_0108: /* Vibrato Rate *//*	channel[ch].vibrato_ratio = midi_cnv_vib_rate(val);*/	channel[ch].vibrato_ratio =  1.0 / midi_time_table[val];	if(update_now)	    update_channel_freq(ch);	break;      case NRPN_ADDR_0109: /* Vibrato Depth *//*	channel[ch].vibrato_depth = midi_cnv_vib_depth(val);*/	channel[ch].vibrato_depth =  midi_time_table[val];	if(update_now)	    update_channel_freq(ch);	break;      case NRPN_ADDR_010A: /* Vibrato Delay */	channel[ch].vibrato_delay = midi_cnv_vib_delay(val);	if(update_now)	    update_channel_freq(ch);	break;      case NRPN_ADDR_0120:	/* Filter cutoff frequency */	if(opt_resonance) {		channel[ch].param_cutoff_freq = val - 64;		ctl->cmsg(CMSG_INFO,VERB_NOISY,"NRPN Cutoff Freq (CH:%d VAL:%d)",ch,channel[ch].param_cutoff_freq);	}	break;      case NRPN_ADDR_0121:	/* Filter Resonance */	if(opt_resonance) {		channel[ch].param_resonance = val - 64;		ctl->cmsg(CMSG_INFO,VERB_NOISY,"NRPN Resonance (CH:%d VAL:%d)",ch,channel[ch].param_resonance);	}	break;      case NRPN_ADDR_0163:	/* Attack Time */	if(!opt_tva_attack) {break;}	set_envelope_time(ch,val,0);	break;      case NRPN_ADDR_0164:	/* EG Decay Time */	if(!opt_tva_decay) { break; }	set_envelope_time(ch,val,1);	break;      case NRPN_ADDR_0166:	/* EG Release Time */	if(!opt_tva_release) { break; }	set_envelope_time(ch,val,3);	break;      case NRPN_ADDR_1400:	/* Drum Filter Cutoff (XG) */	if(play_system_mode != GS_SYSTEM_MODE)	drumflag = 1;	break;      case NRPN_ADDR_1500:	/* Drum Filter Resonance (XG) */	if(play_system_mode != GS_SYSTEM_MODE)	drumflag = 1;	break;      case NRPN_ADDR_1600:	/* Drum EG Attack Time (XG) */	if(play_system_mode != GS_SYSTEM_MODE)	drumflag = 1;	if(!opt_tva_attack) { break; }	val = val & 0x7F;	note = channel[ch].lastlrpn;	if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	val	-= 64;	ctl->cmsg(CMSG_INFO,VERB_NOISY,"XG Drum Attack Time (CH:%d NOTE:%d VALUE:%d)",ch,note,val);	channel[ch].drums[note]->drum_envelope_rate[0] = val;	break;      case NRPN_ADDR_1700:	/* Drum EG Decay Time (XG) */	if(play_system_mode != GS_SYSTEM_MODE)    drumflag = 1;	if(!opt_tva_decay) { break; }	val = val & 0x7F;	note = channel[ch].lastlrpn;	if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	val	-= 64;	ctl->cmsg(CMSG_INFO,VERB_NOISY,"XG Drum Decay Time (CH:%d NOTE:%d VALUE:%d)",ch,note,val);	channel[ch].drums[note]->drum_envelope_rate[1] = val;	break;      case NRPN_ADDR_1800:	/* Coarse Pitch of Drum (GS) */	drumflag = 1;	note = channel[ch].lastlrpn;		if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	if(current_event->b == 0x1) {		channel[ch].drums[note]->play_note = val;		ctl->cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument Play Note (CH:%d NOTE:%d VALUE:%d)",ch,note,channel[ch].drums[note]->play_note);	} else {		channel[ch].drums[note]->coarse = val - 64;		ctl->cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument Pitch Coarse (CH:%d NOTE:%d VALUE:%d)",ch,note,channel[ch].drums[note]->coarse);	}	break;      case NRPN_ADDR_1900:	/* Fine Pitch of Drum (XG) */	drumflag = 1;	note = channel[ch].lastlrpn;	if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	channel[ch].drums[note]->fine = val - 64; 	ctl->cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument Pitch Fine (CH:%d NOTE:%d VALUE:%d)",ch,note,channel[ch].drums[note]->fine);	break;      case NRPN_ADDR_1A00:	/* Level of Drum */	 	drumflag = 1;	note = channel[ch].lastlrpn;	if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	ctl->cmsg(CMSG_INFO,VERB_NOISY,"Drum Instrument TVA Level (CH:%d NOTE:%d VALUE:%d)",ch,note,val);	channel[ch].drums[note]->drum_level = calc_drum_tva_level(ch,note,val);	break;      case NRPN_ADDR_1C00:	/* Panpot of Drum */	drumflag = 1;	note = channel[ch].lastlrpn;	if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	if(val == 0) {	    val = int_rand(128);	    channel[ch].drums[note]->pan_random = 1;	}	else {	    channel[ch].drums[note]->pan_random = 0;	}	channel[ch].drums[note]->drum_panning = val;	if(update_now && adjust_panning_immediately && !channel[ch].pan_random) {	    adjust_drum_panning(ch, note);	}	break;      case NRPN_ADDR_1D00:	/* Reverb Send Level of Drum */	drumflag = 1;	note = channel[ch].lastlrpn;	if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	ctl->cmsg(CMSG_INFO,VERB_NOISY,"Reverb Send Level of Drum (CH:%d NOTE:%d VALUE:%d)",ch,note,val);	channel[ch].drums[note]->reverb_level = val;	break;      case NRPN_ADDR_1E00:	/* Chorus Send Level of Drum */	drumflag = 1;	note = channel[ch].lastlrpn;			if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	ctl->cmsg(CMSG_INFO,VERB_NOISY,"Chorus Send Level of Drum (CH:%d NOTE:%d VALUE:%d)",ch,note,val);	channel[ch].drums[note]->chorus_level = val;	break;      case NRPN_ADDR_1F00:	/* Variation Send Level of Drum */	drumflag = 1;	note = channel[ch].lastlrpn;	if(channel[ch].drums[note] == NULL) {play_midi_setup_drums(ch, note);}	ctl->cmsg(CMSG_INFO,VERB_NOISY,"Delay Send Level of Drum (CH:%d NOTE:%d VALUE:%d)",ch,note,val);	channel[ch].drums[note]->delay_level = val;	break;      case NRPN_ADDR_3000:	/* EQ ON/OFF */	if(!opt_eq_control) {break;}	if(channel[ch].eq_on != val) {		if(val) {			ctl->cmsg(CMSG_INFO,VERB_NOISY,"EQ ON (CH:%d)",ch);		} else {			ctl->cmsg(CMSG_INFO,VERB_NOISY,"EQ OFF (CH:%d)",ch);		}	}	channel[ch].eq_on = val;	break;      case NRPN_ADDR_3001:	/* Insertion Effect ON/OFF */	if(!opt_insertion_effect) {break;}	if(channel[ch].insertion_effect != val) {		if(val) {			ctl->cmsg(CMSG_INFO,VERB_NOISY,"EFX ON (CH:%d)",ch);		} else {			ctl->cmsg(CMSG_INFO,VERB_NOISY,"EFX OFF (CH:%d)",ch);		}	}	channel[ch].insertion_effect = val;	break;      case RPN_ADDR_0000: /* Pitch bend sensitivity */	ctl->cmsg(CMSG_INFO,VERB_DEBUG,"Pitch Bend Sensitivity (CH:%d VALUE:%d)",ch,val);	channel[ch].pitchfactor = 0;	break;      case RPN_ADDR_0001: /* Master Fine Tuning */	ctl->cmsg(CMSG_INFO,VERB_DEBUG,"Master Fine Tuning (CH:%d VALUE:%d)",ch,val);	channel[ch].pitchfactor = 0;	break;      case RPN_ADDR_0002: /* Master Coarse Tuning */	ctl->cmsg(CMSG_INFO,VERB_DEBUG,"Master Coarse Tuning (CH:%d VALUE:%d)",ch,val);	channel[ch].pitchfactor = 0;	break;      case RPN_ADDR_7F7F: /* RPN reset */	channel[ch].rpn_7f7f_flag = 1;	break;      case RPN_ADDR_FFFF: /* RPN initialize */	/* All reset to defaults */	channel[ch].rpn_7f7f_flag = 0;	memset(channel[ch].rpnmap, 0, sizeof(channel[ch].rpnmap));	channel[ch].lastlrpn = channel[ch].lastmrpn = 0;	channel[ch].nrpn = 0;	channel[ch].rpnmap[RPN_ADDR_0000] = 2;	channel[ch].rpnmap[RPN_ADDR_0001] = 0x40;	channel[ch].rpnmap[RPN_ADDR_0002] = 0x40;	channel[ch].pitchfactor = 0;	break;    }    if(drumflag && midi_drumpart_change(ch, 1))    {	midi_program_change(ch, channel[ch].program);	if(update_now)	    ctl_prog_event(ch);    }}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/39cea11b7c6417ccf07084809ea6060eab026595/playmidi.c/clean/timidity/playmidi.c