Skip to content

Commit

Permalink
Fix note-selection octave range (10 octaves: -1..9)
Browse files Browse the repository at this point in the history
  • Loading branch information
x42 committed Oct 30, 2019
1 parent 07bba70 commit 66bf92f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion gui/tuna.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,9 @@ static bool cb_set_mode (RobWidget* handle, void *data) {
mode = -1
- rintf(robtk_spin_get_value(ui->spb_octave)+1) * 12.
- robtk_select_get_value(ui->sel_note);
if (mode < -128) {
mode = -128;
}
break;
}
if (!ui->disable_signals) {
Expand Down Expand Up @@ -864,7 +867,7 @@ static RobWidget * toplevel(TunaUI* ui, void * const top)
robtk_sep_set_linewidth(ui->sep[2], 1);

ui->spb_tuning = robtk_spin_new(220, 880, .5);
ui->spb_octave = robtk_spin_new(-1, 10, 1);
ui->spb_octave = robtk_spin_new(-1, 9, 1);
ui->spb_freq = robtk_spin_new(20, 1000, .5); // TODO log-map
ui->sel_mode = robtk_select_new();
ui->sel_note = robtk_select_new();
Expand Down
2 changes: 1 addition & 1 deletion lv2ttl/tuna.lv2.ttl.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
lv2:symbol "mode" ;
lv2:name "Mode" ;
lv2:default 0 ;
lv2:minimum 0 ;
lv2:minimum -128 ;
lv2:maximum 8000 ;
lv2:portProperty lv2:integer;
lv2:scalePoint [ rdfs:label "auto"; rdf:value 0 ; ] ;
Expand Down
2 changes: 1 addition & 1 deletion lv2ttl/tuna1.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static const RtkLv2Description _plugin_tuna_one = {
{ "sysex", MIDI_OUT, nan, nan, nan, "MTS/SysEx output and Plugin to GUI communication"},
{ "in", AUDIO_IN, nan, nan, nan, "Audio Input"},
{ "out", AUDIO_OUT, nan, nan, nan, "Audio output"},
{ "mode", CONTROL_IN, 0.000000, 0.000000, 8000.000000, "Mode"},
{ "mode", CONTROL_IN, 0.000000, -128.000000, 8000.000000, "Mode"},
{ "tuning", CONTROL_IN, 440.000000, 220.000000, 880.000000, "Tuning A440"},
{ "rms", CONTROL_OUT, nan, -100.000000, -0.000000, "Signal Level (RMS)"},
{ "freq_out", CONTROL_OUT, nan, 0.000000, 10000.000000, "Detected Frequency"},
Expand Down
2 changes: 1 addition & 1 deletion lv2ttl/tuna2.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static const RtkLv2Description _plugin_tuna_two = {
{ "sysex", MIDI_OUT, nan, nan, nan, "MTS/SysEx output and Plugin to GUI communication"},
{ "in", AUDIO_IN, nan, nan, nan, "Audio Input"},
{ "out", AUDIO_OUT, nan, nan, nan, "Audio output"},
{ "mode", CONTROL_IN, 0.000000, 0.000000, 8000.000000, "Mode"},
{ "mode", CONTROL_IN, 0.000000, -128.000000, 8000.000000, "Mode"},
{ "tuning", CONTROL_IN, 440.000000, 220.000000, 880.000000, "Tuning A440"},
{ "rms", CONTROL_OUT, nan, -100.000000, -0.000000, "Signal Level (RMS)"},
{ "freq_out", CONTROL_OUT, nan, 0.000000, 10000.000000, "Detected Frequency"},
Expand Down

0 comments on commit 66bf92f

Please sign in to comment.