Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
m6502 committed Dec 28, 2017
1 parent 007df5d commit 8ac9e4c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Program behavior changes:

- The first 16 instruments get that MIDI channel assigned instead of defaulting to 0.

- BPM/TPB changes are now applied in real-time while playing a song or pattern.

- Song play view shows more information per note.

- Starts in "Tracker Mode" by default.
Expand Down
21 changes: 12 additions & 9 deletions src/CUI_Patterneditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ void set_effect_data_msg(char *str, unsigned char effect, unsigned short int eff

case 'A':
if (effect_data == 2 ||
effect_data == 4 ||
effect_data == 6 ||
effect_data == 8 ||
effect_data == 12 ||
effect_data == 24 ||
effect_data == 48
)
effect_data == 4 ||
effect_data == 6 ||
effect_data == 8 ||
effect_data == 12 ||
effect_data == 24 ||
effect_data == 48
)
sprintf(str,"Effect: Set TPB to %d",effect_data);
else
sprintf(str,"Effect: Set TPB (invalid TPB: %d) ",effect_data);
Expand Down Expand Up @@ -893,8 +893,11 @@ void CUI_Patterneditor::update()
// need_refresh++ ;
//}

#define _ACTIVAR_CAMBIO_TAMANYO_COLUMNAS
#ifdef _ACTIVAR_CAMBIO_TAMANYO_COLUMNAS
//#define _ACTIVAR_CAMBIO_TAMANYO_COLUMNAS

#ifndef _ACTIVAR_CAMBIO_TAMANYO_COLUMNAS
zt_config_globals.cur_edit_mode = VIEW_BIG ;
#else

if (Keys.size()) {

Expand Down
12 changes: 12 additions & 0 deletions src/playback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@ void player::set_speed() {
//int t,int b) {
__int64 a;
// tpb = t; bpm = b;

// <Manu> Apply changes in real-time :-)
this->bpm = song->bpm ;
this->tpb = song->tpb ;

a = 1000000 / wTimerRes;
subtick_len_ms = (int)(60 * a /(96*this->bpm));
subtick_len_mms = subtick_len_ms % 1000;
Expand All @@ -351,6 +356,13 @@ void player::set_speed() {
clock_len_ms = 4;
tick_len_ms = 96 / this->tpb;
}




// ------------------------------------------------------------------------------------------------
//
//
int player::seek_order(int pattern) {
int o;
for (o=0;o<256;o++)
Expand Down

0 comments on commit 8ac9e4c

Please sign in to comment.