Exemplo n.º 1
0
static void ctl_reset(void)
{
  int i,j;
  if (!ctl.trace_playing)
    return;
  for (i=0; i<16; i++)
    {
      SLsmg_gotorc(8+i, 3);
      for (j=0; j<SLtt_Screen_Cols-24; j++)
	  SLsmg_write_char('.');
      if(ISDRUMCHANNEL(i))
	  ctl_program(i, channel[i].bank);
      else
	  ctl_program(i, channel[i].program);
      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);
    }
  _ctl_refresh();
}
Exemplo n.º 2
0
Arquivo: tk_c.c Projeto: avm/timidity
static void ctl_reset(void)
{
	int i;

	if (!ctl.trace_playing)
	{
	    k_pipe_printf("RSET %d", ctl.trace_playing);
	    return;
	}

	Panel->wait_reset = 1;
	k_pipe_printf("RSET %d", ctl.trace_playing);

	while(Panel->wait_reset)
	    VOLATILE_TOUCH(Panel->wait_reset);

	if (!ctl.trace_playing)
		return;
	for (i = 0; i < MAX_TK_MIDI_CHANNELS; i++) {
		if(ISDRUMCHANNEL(i))
		    ctl_program(i, channel[i].bank);
		else
		    ctl_program(i, channel[i].program);
		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);
		ctl_channel_note(i, Panel->cnote[i], 0);
	}
}
Exemplo n.º 3
0
static void ctl_reset(void)
{
    int i;

    if(!ctl.trace_playing)
        return;

    PanelReset();
    CanvasReadPanelInfo(0);
    CanvasUpdate(0);
    CanvasPaint();

    for(i = 0; i < MAX_W32G_MIDI_CHANNELS; i++)
    {
        if(ISDRUMCHANNEL(i))
            ctl_program(i, channel[i].bank);
        else
            ctl_program(i, channel[i].program);
        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);
        ctl_channel_note(i, Panel->cnote[i], 0);
    }
    Panel->changed = 1;
}
Exemplo n.º 4
0
Arquivo: xaw_c.c Projeto: 1c0n/xbmc
static void ctl_program(int ch, int val, void *comm)
{
  if(ch >= MAX_XAW_MIDI_CHANNELS) return;
  if(!ctl.trace_playing) return;

  if(!IS_CURRENT_MOD_FILE)
    val += progbase;
  sprintf(local_buf, "PP%c%d", ch+'A', val);
  a_pipe_write(local_buf);
  if (comm != NULL) {
    sprintf(local_buf, "I%c%s", ch+'A', (char *)comm);
    if (ISDRUMCHANNEL(ch))
      sprintf(local_buf, "I%c%s", ch+'A',
              (!strlen((char *)comm))? "<drum>":(char *)comm);
    a_pipe_write(local_buf);
  }
}
Exemplo n.º 5
0
Arquivo: xaw_c.c Projeto: 1c0n/xbmc
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);  
}
Exemplo n.º 6
0
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);
}
Exemplo n.º 7
0
static void ctl_program(int ch, int val)
{
  if(ch >= 16)
    return;
  if (!ctl.trace_playing)
    return;
  if(channel[ch].special_sample)
      val = channel[ch].special_sample;
  else
      val += progbase;
  SLsmg_gotorc(8+ch, SLtt_Screen_Cols-20);
  if (ISDRUMCHANNEL(ch))
    {
        SLsmg_bold();
      SLsmg_printf("%03d", val);
        SLsmg_normal();
    }
  else
    SLsmg_printf("%03d", val);
}
Exemplo n.º 8
0
Arquivo: tk_c.c Projeto: avm/timidity
/*ARGSUSED*/
static int TraceCreate(ClientData clientData, Tcl_Interp *interp,
		       int argc, char *argv[])
{
	int i;
	v_eval("frame %s -bg black", FRAME_WIN);
	v_eval("canvas %s -width %d -height %d -bd 0 -bg black "
	       "-highlightthickness 0",
	       CANVAS_WIN, WIN_WID, WIN_HGT);
	v_eval("pack %s -side top -fill x", CANVAS_WIN);
	for (i = 0; i < 32; i++) {
		char *color;
		v_eval("%s create text 0 0 -anchor n -fill white -text 00 "
		       "-tags prog%d", CANVAS_WIN, i);
		v_eval("%s create poly 0 0 0 0 0 0 -fill yellow -tags pos%d",
		       CANVAS_WIN, i);
		color = (ISDRUMCHANNEL(i) || i == 25) ? "red" : "green";
		v_eval("%s create rect 0 0 0 0 -fill %s -tags bar%d "
		       "-outline \"\"", CANVAS_WIN, color, i);
	}
	v_eval("set Stat(TimerId) -1");
	v_eval("TraceReset");
	return TCL_OK;
}