Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Minuet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
Minuet
Commits
994c7b67
Commit
994c7b67
authored
Jul 01, 2016
by
Sandro Andrade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear pianoview note marks when starting/changing exercises
parent
8a0bd2fc
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
38 additions
and
29 deletions
+38
-29
data/definitions/chords-root-position-definitions.json
data/definitions/chords-root-position-definitions.json
+0
-5
src/interfaces/iexercisecontroller.cpp
src/interfaces/iexercisecontroller.cpp
+5
-0
src/interfaces/iexercisecontroller.h
src/interfaces/iexercisecontroller.h
+7
-2
src/plugins/drumsticksoundbackend/midisequenceroutputthread.cpp
...ugins/drumsticksoundbackend/midisequenceroutputthread.cpp
+2
-2
src/plugins/drumsticksoundbackend/midisequenceroutputthread.h
...plugins/drumsticksoundbackend/midisequenceroutputthread.h
+1
-1
src/shell/exercisecontroller.cpp
src/shell/exercisecontroller.cpp
+1
-0
src/shell/qml/ExerciseView.qml
src/shell/qml/ExerciseView.qml
+0
-1
src/shell/qml/Main.qml
src/shell/qml/Main.qml
+19
-14
src/shell/qml/MinuetMenu.qml
src/shell/qml/MinuetMenu.qml
+2
-3
src/shell/qml/pianoview/PianoView.qml
src/shell/qml/pianoview/PianoView.qml
+1
-1
No files found.
data/definitions/chords-root-position-definitions.json
View file @
994c7b67
...
...
@@ -94,11 +94,6 @@
"name"
:
"Major 7(#5)"
,
"sequence"
:
"4 8 10"
},
{
"tags"
:
[
"chord"
,
"root-position"
,
"major"
,
"7"
,
"9"
,
"altered"
],
"name"
:
"Major 9"
,
"sequence"
:
"4 7 10 14"
},
{
"tags"
:
[
"chord"
,
"root-position"
,
"major"
,
"7"
,
"9"
,
"altered"
],
"name"
:
"Major 7(#9)"
,
...
...
src/interfaces/iexercisecontroller.cpp
View file @
994c7b67
...
...
@@ -40,5 +40,10 @@ IExerciseController::~IExerciseController()
{
}
QJsonArray
IExerciseController
::
selectedOptions
()
const
{
return
m_selectedOptions
;
}
}
src/interfaces/iexercisecontroller.h
View file @
994c7b67
...
...
@@ -38,18 +38,23 @@ class MINUETINTERFACES_EXPORT IExerciseController : public QObject
Q_PROPERTY
(
quint8
minRootNote
MEMBER
m_minRootNote
)
Q_PROPERTY
(
quint8
maxRootNote
MEMBER
m_maxRootNote
)
Q_PROPERTY
(
QJsonArray
exercises
READ
exercises
)
Q_PROPERTY
(
QJsonObject
currentExercise
MEMBER
m_currentExercise
)
Q_PROPERTY
(
QJsonObject
currentExercise
MEMBER
m_currentExercise
NOTIFY
currentExerciseChanged
)
Q_PROPERTY
(
quint8
answerLength
MEMBER
m_answerLength
)
Q_PROPERTY
(
QJsonArray
selectedOptions
MEMBER
m_selectedOptions
)
Q_PROPERTY
(
QJsonArray
selectedOptions
READ
selectedOptions
NOTIFY
selectedOptionsChanged
)
public:
virtual
~
IExerciseController
()
override
;
virtual
QJsonArray
exercises
()
const
=
0
;
QJsonArray
selectedOptions
()
const
;
public
Q_SLOTS
:
virtual
void
randomlySelectOptions
()
=
0
;
Q_SIGNALS:
void
currentExerciseChanged
(
QJsonObject
newCurrentExercise
);
void
selectedOptionsChanged
(
QJsonArray
newSelectedOptions
);
protected:
explicit
IExerciseController
(
QObject
*
parent
=
0
);
...
...
src/plugins/drumsticksoundbackend/midisequenceroutputthread.cpp
View file @
994c7b67
...
...
@@ -129,7 +129,7 @@ void MidiSequencerOutputThread::setPitch(qint8 value)
stop
();
unsigned
int
pos
=
m_Queue
->
getStatus
().
getTickTime
();
m_Queue
->
clear
();
allNotesOff
();
mute
();
setPosition
(
pos
);
}
m_pitchShift
=
value
;
...
...
@@ -164,7 +164,7 @@ void MidiSequencerOutputThread::resetPosition()
}
}
void
MidiSequencerOutputThread
::
allNotesOff
()
void
MidiSequencerOutputThread
::
mute
()
{
for
(
int
chan
=
0
;
chan
<
MIDI_CHANNELS
;
++
chan
)
{
sendControllerEvent
(
chan
,
MIDI_CTL_ALL_NOTES_OFF
,
0
);
...
...
src/plugins/drumsticksoundbackend/midisequenceroutputthread.h
View file @
994c7b67
...
...
@@ -54,7 +54,7 @@ public:
void
resetPosition
();
private:
void
allNotesOff
();
void
mute
();
void
sendControllerEvent
(
int
chan
,
int
control
,
int
value
);
private:
...
...
src/shell/exercisecontroller.cpp
View file @
994c7b67
...
...
@@ -91,6 +91,7 @@ void ExerciseController::randomlySelectOptions()
exerciseOptions
[
chosenExerciseOption
]
=
jsonObject
;
m_selectedOptions
.
append
(
exerciseOptions
[
chosenExerciseOption
]);
}
emit
selectedOptionsChanged
(
m_selectedOptions
);
}
unsigned
int
ExerciseController
::
chosenRootNote
()
...
...
src/shell/qml/ExerciseView.qml
View file @
994c7b67
...
...
@@ -258,7 +258,6 @@ Item {
name
:
"
waitingForAnswer
"
StateChangeScript
{
script
:
{
// sequencer.allNotesOff()
for
(
var
i
=
0
;
i
<
answerGrid
.
children
.
length
;
++
i
)
{
answerGrid
.
children
[
i
].
opacity
=
1
answerGrid
.
children
[
i
].
enabled
=
true
...
...
src/shell/qml/Main.qml
View file @
994c7b67
...
...
@@ -45,9 +45,20 @@ Item {
width
:
menuBarWidth
;
height
:
parent
.
height
-
midiPlayer
.
height
anchors
{
left
:
parent
.
left
;
top
:
parent
.
top
}
onCurrentExerciseChanged
:
{
exerciseView
.
setCurrentExercise
(
currentExercise
);
rhythmAnswerView
.
resetAnswers
()
}
onBackPressed
:
{
core
.
soundBackend
.
stop
();
exerciseView
.
clearExerciseGrid
()
}
onUserMessageChanged
:
{
exerciseView
.
changeUserMessage
(
message
);
mainItem
.
userMessageChanged
(
message
)
}
onCurrentExerciseChanged
:
{
exerciseView
.
setCurrentExercise
(
currentExercise
)
rhythmAnswerView
.
resetAnswers
()
core
.
exerciseController
.
currentExercise
=
currentExercise
}
onBackPressed
:
{
core
.
soundBackend
.
stop
()
exerciseView
.
clearExerciseGrid
()
pianoView
.
clearAllMarks
()
}
onUserMessageChanged
:
{
exerciseView
.
changeUserMessage
(
message
)
mainItem
.
userMessageChanged
(
message
)
}
}
MidiPlayer
{
id
:
midiPlayer
...
...
@@ -98,11 +109,6 @@ Item {
onChosenExercisesChanged
:
rhythmAnswerView
.
fillCorrectAnswerGrid
()
}
}
Binding
{
target
:
core
.
exerciseController
property
:
"
currentExercise
"
value
:
minuetMenu
.
currentExercise
}
Binding
{
target
:
core
.
soundBackend
property
:
"
pitch
"
...
...
@@ -118,10 +124,9 @@ Item {
property
:
"
tempo
"
value
:
midiPlayer
.
tempo
}
// Connections {
// target: sequencer
// onNoteOn: pianoView.noteOn(chan, pitch, vel)
// onNoteOff: pianoView.noteOff(chan, pitch, vel)
// onAllNotesOff: pianoView.allNotesOff()
// }
Connections
{
target
:
core
.
exerciseController
onSelectedOptionsChanged
:
pianoView
.
clearAllMarks
()
onCurrentExerciseChanged
:
pianoView
.
clearAllMarks
()
}
}
src/shell/qml/MinuetMenu.qml
View file @
994c7b67
...
...
@@ -30,7 +30,7 @@ Item {
id
:
minuetMenu
property
string
message
readonly
property
alias
currentExercise
:
stackView
.
currentExercise
property
var
currentExercise
signal
backPressed
signal
userMessageChanged
(
string
message
)
...
...
@@ -52,7 +52,6 @@ Item {
StackView
{
id
:
stackView
property
var
currentExercise
property
Item
currentExerciseMenuItem
width
:
parent
.
width
-
breadcrumb
.
width
;
height
:
parent
.
height
...
...
@@ -77,7 +76,7 @@ Item {
if
(
!
children
)
{
if
(
stackView
.
currentExerciseMenuItem
!=
undefined
)
stackView
.
currentExerciseMenuItem
.
checked
=
false
userMessageChanged
(
message
)
stackView
.
currentExercise
=
delegateRect
.
ListView
.
view
.
model
[
index
]
currentExercise
=
delegateRect
.
ListView
.
view
.
model
[
index
]
stackView
.
currentExerciseMenuItem
=
delegateRect
}
else
{
...
...
src/shell/qml/pianoview/PianoView.qml
View file @
994c7b67
...
...
@@ -43,7 +43,7 @@ Rectangle {
if
(
item
!=
undefined
)
item
.
destroy
()
}
function
allNotesOff
()
{
function
clearAllMarks
()
{
for
(
var
index
=
21
;
index
<=
108
;
++
index
)
{
noteOff
(
0
,
index
,
0
)
var
markItem
=
itemForPitch
(
index
).
children
[
1
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment