/* Ignore */ channel[ch].nrpn = -1; 
if((i = last_rpn_addr(ch)) >= 0) { channel[ch].rpnmap_lsb[i] = current_event->a; } 
static void seek_forward(int32 until_time){    int32 i;    int j, k, ch, orig_ch, port_ch, offset, layered;    playmidi_seek_flag = 1;    wrd_midi_event(WRD_START_SKIP, WRD_NOARG);	while (MIDI_EVENT_TIME(current_event) < until_time) {#ifndef SUPPRESS_CHANNEL_LAYER		orig_ch = current_event->channel;		layered = ! IS_SYSEX_EVENT_TYPE(current_event);		for (j = 0; j < MAX_CHANNELS; j += 16) {			port_ch = (orig_ch + j) % MAX_CHANNELS;			offset = (port_ch < 16) ? 0 : 16;			for (k = offset; k < offset + 16; k++) {				if (! layered && (j || k != offset))					continue;				if (layered) {					if (! IS_SET_CHANNELMASK(							channel[k].channel_layer, port_ch)							|| channel[k].port_select ^ (orig_ch >=16))						continue;					current_event->channel = k;				}#endif	ch = current_event->channel;		switch(current_event->type)	{	  case ME_PITCHWHEEL:	    channel[ch].pitchbend = current_event->a + current_event->b * 128;	    channel[ch].pitchfactor=0;	    break;	  case ME_MAINVOLUME:	    channel[ch].volume = current_event->a;	    break;	  case ME_MASTER_VOLUME:	    master_volume_ratio =		(int32)current_event->a + 256 * (int32)current_event->b;	    break;	  case ME_PAN:	    channel[ch].panning = current_event->a;	    channel[ch].pan_random = 0;	    break;	  case ME_EXPRESSION:	    channel[ch].expression=current_event->a;	    break;	  case ME_PROGRAM:	    midi_program_change(ch, current_event->a);	    break;	  case ME_SUSTAIN:	    channel[ch].sustain = (current_event->a >= 64);	    break;	  case ME_SOSTENUTO:	    break;	  case ME_LEGATO_FOOTSWITCH:        channel[ch].legato = (current_event->a >= 64);	    break;      case ME_HOLD2:        break;	  case ME_FOOT:	    break;	  case ME_BREATH:	    break;	  case ME_BALANCE:	    break;	  case ME_RESET_CONTROLLERS:	    reset_controllers(ch);	    break;	  case ME_TONE_BANK_MSB:	    channel[ch].bank_msb = current_event->a;	    break;	  case ME_TONE_BANK_LSB:	    channel[ch].bank_lsb = current_event->a;	    break;	  case ME_MODULATION_WHEEL:	    channel[ch].mod.val = current_event->a;	    break;	  case ME_PORTAMENTO_TIME_MSB:	    channel[ch].portamento_time_msb = current_event->a;	    break;	  case ME_PORTAMENTO_TIME_LSB:	    channel[ch].portamento_time_lsb = current_event->a;	    break;	  case ME_PORTAMENTO:	    channel[ch].portamento = (current_event->a >= 64);	    break;	  case ME_MONO:	    channel[ch].mono = 1;	    break;	  case ME_POLY:	    channel[ch].mono = 0;	    break;	  case ME_SOFT_PEDAL:		  if(opt_lpf_def) {			  channel[ch].soft_pedal = current_event->a;			  ctl->cmsg(CMSG_INFO,VERB_NOISY,"Soft Pedal (CH:%d VAL:%d)",ch,channel[ch].soft_pedal);		  }		  break;	  case ME_HARMONIC_CONTENT:		  if(opt_lpf_def) {			  channel[ch].param_resonance = current_event->a - 64;			  ctl->cmsg(CMSG_INFO,VERB_NOISY,"Harmonic Content (CH:%d VAL:%d)",ch,channel[ch].param_resonance);		  }		  break;	  case ME_BRIGHTNESS:		  if(opt_lpf_def) {			  channel[ch].param_cutoff_freq = current_event->a - 64;			  ctl->cmsg(CMSG_INFO,VERB_NOISY,"Brightness (CH:%d VAL:%d)",ch,channel[ch].param_cutoff_freq);		  }		  break;	    /* RPNs */	  case ME_NRPN_LSB:	    channel[ch].lastlrpn = current_event->a;	    channel[ch].nrpn = 1;	    break;	  case ME_NRPN_MSB:	    channel[ch].lastmrpn = current_event->a;	    channel[ch].nrpn = 1;	    break;	  case ME_RPN_LSB:	    channel[ch].lastlrpn = current_event->a;	    channel[ch].nrpn = 0;	    break;	  case ME_RPN_MSB:	    channel[ch].lastmrpn = current_event->a;	    channel[ch].nrpn = 0;	    break;	  case ME_RPN_INC:	    if(channel[ch].rpn_7f7f_flag) /* disable */		break;	    if((i = last_rpn_addr(ch)) >= 0)	    {		if(channel[ch].rpnmap[i] < 127)		    channel[ch].rpnmap[i]++;		update_rpn_map(ch, i, 0);	    }	    break;	case ME_RPN_DEC:	    if(channel[ch].rpn_7f7f_flag) /* disable */		break;	    if((i = last_rpn_addr(ch)) >= 0)	    {		if(channel[ch].rpnmap[i] > 0)		    channel[ch].rpnmap[i]--;		update_rpn_map(ch, i, 0);	    }	    break;	  case ME_DATA_ENTRY_MSB:	    if(channel[ch].rpn_7f7f_flag) /* disable */		break;	    if((i = last_rpn_addr(ch)) >= 0)	    {		channel[ch].rpnmap[i] = current_event->a;		update_rpn_map(ch, i, 0);	    }	    break;	  case ME_DATA_ENTRY_LSB:	    if(channel[ch].rpn_7f7f_flag) /* disable */		break;	    /* Ignore */	    channel[ch].nrpn = -1;	    break;	  case ME_REVERB_EFFECT:	    set_reverb_level(ch, current_event->a);	    break;	  case ME_CHORUS_EFFECT:	    if(opt_chorus_control == 1)		channel[ch].chorus_level = current_event->a;	    else		channel[ch].chorus_level = -opt_chorus_control;		if(current_event->a) {			ctl->cmsg(CMSG_INFO,VERB_NOISY,"Chorus Send (CH:%d LEVEL:%d)",ch,current_event->a);		}		break;	  case ME_TREMOLO_EFFECT:		ctl->cmsg(CMSG_INFO,VERB_NOISY,"Tremolo Send (CH:%d LEVEL:%d)",ch,current_event->a);		break;	  case ME_CELESTE_EFFECT:		if(opt_delay_control) {			channel[ch].delay_level = current_event->a;			ctl->cmsg(CMSG_INFO,VERB_NOISY,"Delay Send (CH:%d LEVEL:%d)",ch,current_event->a);		}	    break;	  case ME_ATTACK_TIME:	  	if(!opt_tva_attack) { break; }		set_envelope_time(ch, current_event->a, EG_ATTACK);		break;	  case ME_RELEASE_TIME:	  	if(!opt_tva_release) { break; }		set_envelope_time(ch, current_event->a, EG_RELEASE);		break;	  case ME_PHASER_EFFECT:		ctl->cmsg(CMSG_INFO,VERB_NOISY,"Phaser Send (CH:%d LEVEL:%d)",ch,current_event->a);		break;	  case ME_RANDOM_PAN:	    channel[ch].panning = int_rand(128);	    channel[ch].pan_random = 1;	    break;	  case ME_SET_PATCH:	    i = channel[ch].special_sample = current_event->a;	    if(special_patch[i] != NULL)		special_patch[i]->sample_offset = 0;	    break;	  case ME_TEMPO:	    current_play_tempo = ch +		current_event->b * 256 + current_event->a * 65536;	    break;	  case ME_RESET:	    change_system_mode(current_event->a);	    reset_midi(0);	    break;	  case ME_PATCH_OFFS:	    i = channel[ch].special_sample;	    if(special_patch[i] != NULL)		special_patch[i]->sample_offset =		    (current_event->a | 256 * current_event->b);	    break;	  case ME_WRD:	    wrd_midi_event(ch, current_event->a | 256 * current_event->b);	    break;	  case ME_SHERRY:	    wrd_sherry_event(ch |			     (current_event->a<<8) |			     (current_event->b<<16));	    break;	  case ME_DRUMPART:	    if(midi_drumpart_change(ch, current_event->a))		midi_program_change(ch, channel[ch].program);	    break;	  case ME_KEYSHIFT:	    channel[ch].key_shift = (int)current_event->a - 0x40;	    break;	case ME_KEYSIG:		current_keysig = current_event->a + current_event->b * 16;		break;	case ME_SCALE_TUNING:		channel[ch].scale_tuning[current_event->a] = current_event->b;		break;	case ME_BULK_TUNING_DUMP:		set_single_note_tuning(ch, current_event->a, current_event->b, 0);		break;	case ME_SINGLE_NOTE_TUNING:		set_single_note_tuning(ch, current_event->a, current_event->b, 0);		break;	case ME_TEMPER_KEYSIG:		current_temper_keysig = (current_event->a + 8) % 32 - 8;		temper_adj = (current_event->a + 8 & 0x20) ? 1 : 0;		break;	case ME_TEMPER_TYPE:		channel[ch].temper_type = current_event->a;		break;	case ME_MASTER_TEMPER_TYPE:		for (i = 0; i < MAX_CHANNELS; i++)			channel[i].temper_type = current_event->a;		break;	case ME_USER_TEMPER_ENTRY:		set_user_temper_entry(ch, current_event->a, current_event->b);		break;	  case ME_SYSEX_LSB:	    process_sysex_event(ME_SYSEX_LSB,ch,current_event->a,current_event->b);	    break;	  case ME_SYSEX_MSB:	    process_sysex_event(ME_SYSEX_MSB,ch,current_event->a,current_event->b);	    break;	  case ME_SYSEX_GS_LSB:	    process_sysex_event(ME_SYSEX_GS_LSB,ch,current_event->a,current_event->b);	    break;	  case ME_SYSEX_GS_MSB:	    process_sysex_event(ME_SYSEX_GS_MSB,ch,current_event->a,current_event->b);	    break;	  case ME_SYSEX_XG_LSB:	    process_sysex_event(ME_SYSEX_XG_LSB,ch,current_event->a,current_event->b);	    break;	  case ME_SYSEX_XG_MSB:	    process_sysex_event(ME_SYSEX_XG_MSB,ch,current_event->a,current_event->b);	    break;	  case ME_EOT:	    current_sample = current_event->time;	    playmidi_seek_flag = 0;	    return;	}#ifndef SUPPRESS_CHANNEL_LAYER			}		}		current_event->channel = orig_ch;#endif	current_event++;    }    wrd_midi_event(WRD_END_SKIP, WRD_NOARG);    playmidi_seek_flag = 0;    if(current_event != event_list)	current_event--;    current_sample = until_time;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/7bb395a30d9314cfac8462208978ad9a9fbcb68a/playmidi.c/clean/timidity/playmidi.c