Exemple #1
0
static void *Undo_Do_MainTempo(
	struct Tracker_Windows *window,
	struct WBlocks *wblock,
	struct WTracks *wtrack,
	int realline,
	void *pointer
){
	struct Undo_MainTempo *u_rt=(struct Undo_MainTempo *)pointer;
	Ratio signature = root->signature;
        int lpb=root->lpb;
	int tempo=root->tempo;
        quantitize_options_t quantitize_options = root->quantitize_options;

	root->signature=u_rt->signature;
        root->lpb=u_rt->lpb;
	root->tempo=u_rt->tempo;
        root->quantitize_options = u_rt->quantitize_options;

        GFX_OS_update_bottombar();
        
	UpdateAllSTimes();
        UpdateAllBeats();

	u_rt->signature=signature;
        u_rt->lpb=lpb;
	u_rt->tempo=tempo;
        u_rt->quantitize_options = quantitize_options;

	return u_rt;
}
Exemple #2
0
void setMainBPM(int bpm_value){
  if (bpm_value <=1)
    return;
  if (bpm_value == root->tempo)
    return;

  struct Tracker_Windows *window = root->song->tracker_windows;
  struct WBlocks *wblock = window->wblock;
  
  ADD_UNDO(MainTempo(window,wblock));

  PC_Pause();{
    root->tempo=bpm_value;
    UpdateAllSTimes();
  }PC_StopPause(window);
}
Exemple #3
0
void setBPM(int bpm_value){
  if (bpm_value <=1)
    return;
  if (bpm_value == root->tempo)
    return;

  PlayStop();

  struct Tracker_Windows *window = root->song->tracker_windows;
  struct WBlocks *wblock = window->wblock;
  
  Undo_MainTempo(window,wblock);
  
  root->tempo=bpm_value;
  UpdateAllSTimes();
}
Exemple #4
0
void setMainLPB(int lpb_value){
  if (lpb_value <=1)
    return;
  if (lpb_value == root->lpb)
    return;
  
  struct Tracker_Windows *window = root->song->tracker_windows;
  struct WBlocks *wblock = window->wblock;

  printf("Undo MainTempo lpb: %d\n",lpb_value);
  ADD_UNDO(MainTempo(window,wblock));

  PC_Pause();{
    root->lpb=lpb_value;
    UpdateAllSTimes();
    UpdateAllBeats();
  }PC_StopPause(window);
  
  //UpdateAllWLPBs(window);
  window->must_redraw = true;
}
Exemple #5
0
void setLPB(int lpb_value){
  if (lpb_value <=1)
    return;
  if (lpb_value == root->lpb)
    return;
  
  PlayStop();

  struct Tracker_Windows *window = root->song->tracker_windows;
  struct WBlocks *wblock = window->wblock;

  printf("Undo MainTempo lpb: %d\n",lpb_value);
  Undo_MainTempo(window,wblock);
  
  root->lpb=lpb_value;
  UpdateAllSTimes();
  UpdateAllBeats();
  
  //UpdateAllWLPBs(window);
  window->must_redraw = true;
}