static void ctl_reset(void) { int i; if(!ctl.trace_playing) return; indicator_last_update = get_current_calender_time(); for (i=0; i<MAX_XAW_MIDI_CHANNELS; i++) { if(ISDRUMCHANNEL(i)) { ctl_program(i, channel[i].bank, channel_instrum_name(i)); if (opt_reverb_control) set_otherinfo(i, get_reverb_level(i), 'r'); } else { ToneBank *bank; int b; ctl_program(i, channel[i].program, channel_instrum_name(i)); b = channel[i].bank; if((bank = tonebank[b]) == NULL || bank->tone[channel[i].program].instrument == NULL) { b = 0; bank = tonebank[0]; } set_otherinfo(i, channel[i].bank, 'b'); if (opt_reverb_control) set_otherinfo(i, get_reverb_level(i), 'r'); if(opt_chorus_control) set_otherinfo(i, get_chorus_level(i), 'c'); } ctl_volume(i, channel[i].volume); ctl_expression(i, channel[i].expression); ctl_panning(i, channel[i].panning); ctl_sustain(i, channel[i].sustain); if(channel[i].pitchbend == 0x2000 && channel[i].mod.val > 0) ctl_pitch_bend(i, -1); else ctl_pitch_bend(i, channel[i].pitchbend); } sprintf(local_buf, "R"); a_pipe_write(local_buf); }
static void reset_indicator(void) { int i; memset(comment_indicator_buffer, ' ', indicator_width - 1); comment_indicator_buffer[indicator_width - 1] = '\0'; next_indicator_chan = -1; indicator_last_update = get_current_calender_time(); indicator_mode = INDICATOR_DEFAULT; indicator_msgptr = NULL; for(i = 0; i < MAX_CHANNELS; i++) { instr_comment[i].last_note_on = 0.0; instr_comment[i].comm = channel_instrum_name(i); } }
void mac_ctl_program(int ch, int val, void *comm) { int pr; if(ch >= 16) return; if(!ctl->trace_playing) return; if(IS_CURRENT_MOD_FILE) pr = val; else pr = val + progbase; //if(ctl_ncurs_mode == NCURS_MODE_TRACE) { if(ch == selected_channel) init_trace_window_chan(ch); else { //wmove(dftwin, NOTE_LINE+ch, COLS-21); if(ISDRUMCHANNEL(ch)) { //wattron(dftwin, A_BOLD); //wprintw(dftwin, " %03d", pr); //wattroff(dftwin, A_BOLD); } else //wprintw(dftwin, " %03d", pr); ; } } //if(comm != NULL) indicator_set_prog(ch, val, (char *)comm); //scr_modified_flag = 1; instr_comment[ch].last_note_on = 0.0; instr_comment[ch].comm = channel_instrum_name(ch); DrawInstrumentName(ch, instr_comment[ch].comm); }