Tuner / Player screens: allow octave 0
This commit is contained in:
parent
48afd68d06
commit
91403124b2
3 changed files with 9 additions and 7 deletions
|
@ -113,7 +113,7 @@ Item {
|
||||||
onReleased: {
|
onReleased: {
|
||||||
note = tuner.note = index % 12
|
note = tuner.note = index % 12
|
||||||
octave = tuner.octave = index / 12
|
octave = tuner.octave = index / 12
|
||||||
toise_octave.index = tuner.octave - 1
|
toise_octave.index = tuner.octave
|
||||||
toise_octave.updateFlickable()
|
toise_octave.updateFlickable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ Item {
|
||||||
|
|
||||||
theme: main.theme
|
theme: main.theme
|
||||||
|
|
||||||
marks: [1, 2, 3, 4, 5, 6, 7, 8]
|
marks: [0, 1, 2, 3, 4, 5, 6, 7, 8]
|
||||||
min: 0
|
min: 0
|
||||||
max: marks.length - 1
|
max: marks.length - 1
|
||||||
//nb_marks_displayed: is_portrait ? 4 : 3
|
//nb_marks_displayed: is_portrait ? 4 : 3
|
||||||
|
@ -152,7 +152,7 @@ Item {
|
||||||
|
|
||||||
//index: tuner.octave - 1
|
//index: tuner.octave - 1
|
||||||
onReleased: {
|
onReleased: {
|
||||||
tuner.octave = index + 1
|
tuner.octave = index
|
||||||
toise.octave = tuner.octave
|
toise.octave = tuner.octave
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,9 +169,11 @@ Item {
|
||||||
|
|
||||||
/// update toise indexes if tuner note and octave changed from exterior
|
/// update toise indexes if tuner note and octave changed from exterior
|
||||||
function update() {
|
function update() {
|
||||||
|
toise.flik_enable = false
|
||||||
toise.note = tuner.note
|
toise.note = tuner.note
|
||||||
toise.octave = tuner.octave
|
toise.octave = tuner.octave
|
||||||
toise_octave.index = tuner.octave - 1
|
toise_octave.index = tuner.octave
|
||||||
|
toise.flik_enable = true
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: update()
|
Component.onCompleted: update()
|
||||||
|
|
|
@ -59,7 +59,7 @@ ToiseFlickable {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToiseFlikcable parameters
|
// ToiseFlikcable parameters
|
||||||
min: notes_en.length * 1 // ut 1
|
min: notes_en.length * 0 // ut 0
|
||||||
max: notes_en.length * 9 - 1 // si 8
|
max: notes_en.length * 9 - 1 // si 8
|
||||||
|
|
||||||
onOctaveChanged: {
|
onOctaveChanged: {
|
||||||
|
|
|
@ -145,13 +145,13 @@ Item {
|
||||||
anchors.rightMargin: is_portrait ? (parent.width - width) / 2 : parent.width / 20
|
anchors.rightMargin: is_portrait ? (parent.width - width) / 2 : parent.width / 20
|
||||||
theme: main.theme
|
theme: main.theme
|
||||||
|
|
||||||
marks: [1, 2, 3, 4, 5, 6, 7, 8]
|
marks: [0, 1, 2, 3, 4, 5, 6, 7, 8]
|
||||||
nb_marks_displayed: is_portrait ? 4 : 3
|
nb_marks_displayed: is_portrait ? 4 : 3
|
||||||
|
|
||||||
width: is_portrait ? meter.width / 2 : parent.width / 6
|
width: is_portrait ? meter.width / 2 : parent.width / 6
|
||||||
height: parent.toise_h
|
height: parent.toise_h
|
||||||
|
|
||||||
index: tuner.octave - 1
|
index: tuner.octave
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue