Changed TICKS_PER_BEAT from 128 to 288.
This allows for exact triplets in some basic cases. Also TICKS_PER_BEAT can now be changed to any reasonable value. Values less than 128 will probably fry epichord's brain, and values greater than 65535 will cause the midi file saver to fail.
This commit is contained in:
parent
58b8d1ad46
commit
186d94c80e
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <inttypes.h>
|
||||
|
||||
#define TICKS_PER_BEAT 128
|
||||
#define TICKS_PER_BEAT 288
|
||||
|
||||
int init_backend(int* argc, char*** argv);
|
||||
int shutdown_backend();
|
||||
|
|
|
@ -66,7 +66,7 @@ static int playing = 0;
|
|||
static int looping = 0;
|
||||
static int recording=0;
|
||||
static int loop_start = 0;
|
||||
static int loop_end = 512;
|
||||
static int loop_end = TICKS_PER_BEAT*4;
|
||||
static int passthru = 1;
|
||||
static int rec_port = 0;
|
||||
static int trackinit = 1;
|
||||
|
|
|
@ -200,7 +200,8 @@ void Timeline::draw(){
|
|||
|
||||
void Timeline::update(int ticks){
|
||||
//printf("%d\n",ticks);
|
||||
pointer_x = (ticks/16 - ticks_offset/16) * zoom / 8;
|
||||
int T = TICKS_PER_BEAT / 8; /* value was 16 when TICKS_PER_BEAT was 128 */
|
||||
pointer_x = (ticks/T - ticks_offset/T) * zoom / 8;
|
||||
if(pointer_x != px_last && ticks != get_loop_end()){
|
||||
px_last = pointer_x;
|
||||
redraw();
|
||||
|
|
|
@ -881,7 +881,6 @@ void init_gui(){
|
|||
ui->pattern_vscroll->slider_size(50);
|
||||
ui->pattern_hscroll->value(0);
|
||||
|
||||
ui->track_info->relayout();
|
||||
}
|
||||
|
||||
void shutdown_gui(){
|
||||
|
|
Loading…
Reference in New Issue