GUI: improve note input timing
during playback, it rounds to nearest cell now this greatly enhances the recording experience to-do: test on higher latencies and see if we have to compensate somehow...
This commit is contained in:
parent
6deee95d87
commit
ad8d1b5060
3 changed files with 24 additions and 1 deletions
|
|
@ -1257,11 +1257,24 @@ void FurnaceGUI::noteInput(int num, int key, int vol) {
|
|||
int ch=cursor.xCoarse;
|
||||
int ord=curOrder;
|
||||
int y=cursor.y;
|
||||
int tick=0;
|
||||
int speed=0;
|
||||
|
||||
if (e->isPlaying()) {
|
||||
e->getPlayPos(ord,y);
|
||||
e->getPlayPosTick(ord,y,tick,speed);
|
||||
if (tick<=(speed/2)) { // round
|
||||
// TODO: detect 0Dxx/0Bxx?
|
||||
if (++y>=e->curSubSong->patLen) {
|
||||
y=0;
|
||||
if (++ord>=e->curSubSong->ordersLen) {
|
||||
ord=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logV("chan %d, %d:%d %d/%d",ch,ord,y,tick,speed);
|
||||
|
||||
DivPattern* pat=e->curPat[ch].getPattern(e->curOrders->ord[ch][ord],true);
|
||||
bool removeIns=false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue