Fix issue with adding octave over line and disable dynamic roll not disabling the octave line
This commit is contained in:
parent
29c8a8a4ad
commit
f97e50612f
14
src/main.cpp
14
src/main.cpp
|
@ -624,10 +624,10 @@ void displayNoteRoll(xmp_module_info *mi, xmp_frame_info *fi) {
|
||||||
if (dynamicRoll) {
|
if (dynamicRoll) {
|
||||||
for (int l = 1; l <= 8; l++) {
|
for (int l = 1; l <= 8; l++) {
|
||||||
int cnote = (l*12);
|
int cnote = (l*12);
|
||||||
if (cnote < prMin && l == (prMin / 12)) {
|
if (cnote <= prMin && l == (prMin / 12)) {
|
||||||
wmove(dis, 0, 0);
|
wmove(dis, 0, 0);
|
||||||
wprintw(dis, "<%i", l);
|
wprintw(dis, "<%i", l);
|
||||||
} else if (cnote <= prMax && cnote >= prMin) {
|
} else if (cnote < prMax && cnote > prMin) {
|
||||||
wmove(dis, 0, (((cnote - prMin) * (COLS - 5)) / (prMax - prMin))+3);
|
wmove(dis, 0, (((cnote - prMin) * (COLS - 5)) / (prMax - prMin))+3);
|
||||||
wprintw(dis, "%i", l);
|
wprintw(dis, "%i", l);
|
||||||
}
|
}
|
||||||
|
@ -635,8 +635,8 @@ void displayNoteRoll(xmp_module_info *mi, xmp_frame_info *fi) {
|
||||||
}
|
}
|
||||||
for (int y = vOffset; y < ins; y++) {
|
for (int y = vOffset; y < ins; y++) {
|
||||||
if (!dynamicRoll) { prMin = 0; prMax = 144; }
|
if (!dynamicRoll) { prMin = 0; prMax = 144; }
|
||||||
if (y > (LINES - 6)+vOffset || y < 0) continue;
|
if (y > (LINES - (5+dynamicRoll))+vOffset || y < 0) continue;
|
||||||
wmove(dis, (y-vOffset)+1, 0);
|
wmove(dis, (y-vOffset)+dynamicRoll, 0);
|
||||||
wattron(dis, no_pair);
|
wattron(dis, no_pair);
|
||||||
wprintw(dis, "%02X", y+1);
|
wprintw(dis, "%02X", y+1);
|
||||||
wattroff(dis, no_pair);
|
wattroff(dis, no_pair);
|
||||||
|
@ -654,12 +654,12 @@ void displayNoteRoll(xmp_module_info *mi, xmp_frame_info *fi) {
|
||||||
int note = ((cinfo.note - prMin) * (COLS - 5)) / (dynamicRoll?(prMax - prMin):96);
|
int note = ((cinfo.note - prMin) * (COLS - 5)) / (dynamicRoll?(prMax - prMin):96);
|
||||||
if (cinfo.instrument != y) continue;
|
if (cinfo.instrument != y) continue;
|
||||||
|
|
||||||
wmove(dis, (y-vOffset)+1, note+3);
|
wmove(dis, (y-vOffset)+dynamicRoll, note+3);
|
||||||
if (cinfo.volume >= 32)
|
if (cinfo.volume >= 32)
|
||||||
waddstr(dis, "#");
|
waddstr(dis, "#");
|
||||||
else if (cinfo.volume >= 16 && (char)mvwinch(dis, (y-vOffset)+1, note+3) != '#')
|
else if (cinfo.volume >= 16 && (char)mvwinch(dis, (y-vOffset)+dynamicRoll, note+3) != '#')
|
||||||
waddstr(dis, "=");
|
waddstr(dis, "=");
|
||||||
else if (cinfo.volume > 0 && ((char)mvwinch(dis, (y-vOffset)+1, note+3) != '-' || (char)mvwinch(dis, (y-vOffset)+1, note+3) != '#'))
|
else if (cinfo.volume > 0 && ((char)mvwinch(dis, (y-vOffset)+dynamicRoll, note+3) != '-' || (char)mvwinch(dis, (y-vOffset)+dynamicRoll, note+3) != '#'))
|
||||||
waddstr(dis, "-");
|
waddstr(dis, "-");
|
||||||
}
|
}
|
||||||
wmove(dis, y, COLS-4);
|
wmove(dis, y, COLS-4);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user