Jeremiah Benham | 2 Jul 2011 21:53

Melodic Dictation

I am beginning to write a Melodic Dictation app in denemo. You can test it out and give me some feedback. I will be adding more features to it as time goes on. I also want to create a design notes page on denemo.org but have never done that before. I was going to see if I received some feedback first.

To modify the script to accept different scales, edit the first line:
(define MelodicDictation::Scale (cons "F# G# A# B C#" "fis' gis' ais' b' cis''"))

The F# G# etc.. are just button names. I have not decided if I am going to have notename buttons or not. If I do I think they will just play that note perhaps. The lilypond fis' gis' ais' are the scale notes that you are tested on. It plays  

Jeremiah

Attachment (MelodicDictation.scm): text/x-scheme, 4381 bytes
_______________________________________________
Denemo-devel mailing list
Denemo-devel@...
https://lists.gnu.org/mailman/listinfo/denemo-devel
Jeremiah Benham | 2 Jul 2011 22:05

Re: Melodic Dictation

Sorry. Email sent accidentally somehow. 

The second line in the script sets how many notes are in the sudo melody. Later I want to add rhythms into this.
I am considering creating a list of verbose lilypond like fis'4 and comparing it to what gets notated by
created a similar list based off of what is notated then compare the lists. The list perhaps could return a
list of the notenumbers (2nd note, 4th note). This returned list perhaps could mark the incorrect notes
somehow. If the list is empty then the dictation is perfect. I am not sure if there is a better way or not.

Jeremiah

Sent from my Samsung smartphone on AT&T

Jeremiah Benham <jjbenham@...> wrote:

>I am beginning to write a Melodic Dictation app in denemo. You can test it
>out and give me some feedback. I will be adding more features to it as time
>goes on. I also want to create a design notes page on denemo.org but have
>never done that before. I was going to see if I received some feedback
>first.
>
>To modify the script to accept different scales, edit the first line:
>(define MelodicDictation::Scale (cons "F# G# A# B C#" "fis' gis' ais' b'
>cis''"))
>
>The F# G# etc.. are just button names. I have not decided if I am going to
>have notename buttons or not. If I do I think they will just play that note
>perhaps. The lilypond fis' gis' ais' are the scale notes that you are tested
>on. It plays
>
>Jeremiah
>
>_______________________________________________
>Denemo-devel mailing list
>Denemo-devel@...
>https://lists.gnu.org/mailman/listinfo/denemo-devel
Richard Shann | 5 Jul 2011 10:19
Favicon

Re: Melodic Dictation

This is a really good direction to be going in.

On Sat, 2011-07-02 at 15:05 -0500, Jeremiah Benham wrote:
> The second line in the script sets how many notes are in the sudo
> melody.
As well as pseudo-melodies it will be possible to extract short
sequences of notes from a library of .denemo, .midi, ... files. This
would give musical dictations that had a better relationship with actual
music (more natural sequences).

>  Later I want to add rhythms into this. I am considering creating a
> list of verbose lilypond like fis'4 and comparing it to what gets
> notated by created a similar list based off of what is notated then
> compare the lists. The list perhaps could return a list of the
> notenumbers (2nd note, 4th note). This returned list perhaps could
> mark the incorrect notes somehow. If the list is empty then the
> dictation is perfect. I am not sure if there is a better way or not.

We have quite nice scheme procedures for moving the cursor to the start
and doing NextChord and GetNoteName for comparison with the next note in
the melody. Mismatches can then be marked with an X, and so on. (Those
command names are off the top of my head, so probably wrong - but real
examples abound in the d-CreateChordsOverBass script, where the cursor
is moved along the bass line and the MIDI-in is monitored for notes
which are compared with the bass note. Nils may have even more
sophisticated routines available).

Richard
Richard Shann | 5 Jul 2011 11:34
Favicon

Re: Melodic Dictation

Looking at your example, I wonder if a somewhat different approach to
storing the melody might be good. It could be  stored as a normal denemo
score, but with each note having a directive that alters its display so
it doesn't show the pitch or accidental. There would be several
different ways of doing this I suspect, e.g. with a chord-override
directive the whole display of the chord (ie note) could be replaced
with a marker. Perhaps we could do with reviving that read-only flag
which is still lurking in the code, so that the user cannot alter the
score except in ways controlled by the script.
Richard

On Tue, 2011-07-05 at 09:19 +0100, Richard Shann wrote:
> This is a really good direction to be going in.
> 
> On Sat, 2011-07-02 at 15:05 -0500, Jeremiah Benham wrote:
> > The second line in the script sets how many notes are in the sudo
> > melody.
> As well as pseudo-melodies it will be possible to extract short
> sequences of notes from a library of .denemo, .midi, ... files. This
> would give musical dictations that had a better relationship with actual
> music (more natural sequences).
> 
> >  Later I want to add rhythms into this. I am considering creating a
> > list of verbose lilypond like fis'4 and comparing it to what gets
> > notated by created a similar list based off of what is notated then
> > compare the lists. The list perhaps could return a list of the
> > notenumbers (2nd note, 4th note). This returned list perhaps could
> > mark the incorrect notes somehow. If the list is empty then the
> > dictation is perfect. I am not sure if there is a better way or not.
> 
> We have quite nice scheme procedures for moving the cursor to the start
> and doing NextChord and GetNoteName for comparison with the next note in
> the melody. Mismatches can then be marked with an X, and so on. (Those
> command names are off the top of my head, so probably wrong - but real
> examples abound in the d-CreateChordsOverBass script, where the cursor
> is moved along the bass line and the MIDI-in is monitored for notes
> which are compared with the bass note. Nils may have even more
> sophisticated routines available).
> 
> Richard
> 
> 
> 
> _______________________________________________
> Denemo-devel mailing list
> Denemo-devel@...
> https://lists.gnu.org/mailman/listinfo/denemo-devel
Richard Shann | 5 Jul 2011 15:37
Favicon

Re: Melodic Dictation

On Tue, 2011-07-05 at 10:34 +0100, Richard Shann wrote:
> 
> Looking at your example, I wonder if a somewhat different approach to
> storing the melody might be good. It could be  stored as a normal
> denemo
> score, but with each note having a directive that alters its display
> so
> it doesn't show the pitch or accidental. 
I have just been playing around with this:
If you execute this:

(d-C)
(d-DirectivePut-chord-graphic "test" "CrossSign")
(d-DirectivePut-chord-override "test" DENEMO_OVERRIDE_GRAPHIC)
(d-D)
(d-DirectivePut-chord-graphic "test" "CrossSign")
(d-DirectivePut-chord-override "test" DENEMO_OVERRIDE_GRAPHIC)
(d-E)
(d-DirectivePut-chord-graphic "test" "CrossSign")
(d-DirectivePut-chord-override "test" DENEMO_OVERRIDE_GRAPHIC)

You get hidden notes C, D, E which still play but cannot be seen.
If you put the cursor on the first note and hold down the Control key
while playing in on a MIDI keyboard the cursor will advance only when
you play the right note. (This is the Checking mode for MIDI in)

Richard
Richard Shann | 6 Jul 2011 18:13
Picon

[bug #33327] DENEMO_OVERRIDE_DURATION needed

Follow-up Comment #2, bug #33327 (project denemo):

I have just implemented DENEMO_OVERRIDE_DURATION for Denemo Directives. Only
tested with 0 so far.
Looking at the CHORD case, I can confirm that it would be a different thing to
shorten the sounding part of notes (as opposed to shortening the notes,
thereby bringing succeeding music forward), the attempt to do this in the code
was failing and is not compiled in.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33327>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
Jeremiah Benham | 6 Jul 2011 21:13

Re: Melodic Dictation

Sorry this default email app only allows top posting.
I like the idea of extracting from denemo and midi or other files. It would take me a great deal of effort to
create these dictation files. Thats why I thought maybe I would implement a computer generated midi. The
pedagogy would follow a pattern something like this.
Level 1 = so,me quarter notes/rests
Level 2 = so,me quarter and eigth notes/quarter rests
Level 3 = so,me,la "

I have a growing database of songs that conform to these progressive levels.

Jeremiah

Sent from my Samsung smartphone on AT&T

Richard Shann <richard.shann@...> wrote:

>This is a really good direction to be going in.
>
>On Sat, 2011-07-02 at 15:05 -0500, Jeremiah Benham wrote:
>> The second line in the script sets how many notes are in the sudo
>> melody.
>As well as pseudo-melodies it will be possible to extract short
>sequences of notes from a library of .denemo, .midi, ... files. This
>would give musical dictations that had a better relationship with actual
>music (more natural sequences).
>
>>  Later I want to add rhythms into this. I am considering creating a
>> list of verbose lilypond like fis'4 and comparing it to what gets
>> notated by created a similar list based off of what is notated then
>> compare the lists. The list perhaps could return a list of the
>> notenumbers (2nd note, 4th note). This returned list perhaps could
>> mark the incorrect notes somehow. If the list is empty then the
>> dictation is perfect. I am not sure if there is a better way or not.
>
>We have quite nice scheme procedures for moving the cursor to the start
>and doing NextChord and GetNoteName for comparison with the next note in
>the melody. Mismatches can then be marked with an X, and so on. (Those
>command names are off the top of my head, so probably wrong - but real
>examples abound in the d-CreateChordsOverBass script, where the cursor
>is moved along the bass line and the MIDI-in is monitored for notes
>which are compared with the bass note. Nils may have even more
>sophisticated routines available).
>
>Richard
>
>
Richard Shann | 6 Jul 2011 21:38
Favicon

Re: Melodic Dictation

On Wed, 2011-07-06 at 14:23 -0500, Jeremiah Benham wrote:
> Could this approach be used without a midi keyboard.
Absolutely. The script Input->MIDI->Create Chords Over Bass Line steps
through the current staff waiting for the Bass note to be played for
each step. If instead of the d-GetMidi you had any other input routine
it would do the same, that is, step on once the right note was input.
(Of course that script is enormous, as it takes other input, (the chord
notes) some of which may be sounded just before the bass note concerned,
and then distributes the results onto a staff it has created above
within the note-duration of the bass note, but you don't need anything
like that complexity).
All you would need is a loop getting notes from the user, comparing them
with the current note (which because of the override the user sees only
as a marker) and goes on when correct. It could reveal the note once it
has been correctly sounded (by deleting the Denemo chord-directive that
is hiding it), score wrong notes etc.

Richard
Jeremiah Benham | 6 Jul 2011 21:23

Re: Melodic Dictation

Could this approach be used without a midi keyboard. I like your idea. Perhaps this approach will allow the
student to focus only on melody and not rhythm. Can this method be used to dictate the rhythm also? About a
year ago you mentioned having what is played back to student be in another tab. Perhaps on some examples the
rhythm can be copied over to the.first tab but the pitch remain middle c. Then the student corrects the notes.

Jeremiah

Sent from my Samsung smartphone on AT&T

Richard Shann <richard.shann@...> wrote:

>On Tue, 2011-07-05 at 10:34 +0100, Richard Shann wrote:
>> 
>> Looking at your example, I wonder if a somewhat different approach to
>> storing the melody might be good. It could be  stored as a normal
>> denemo
>> score, but with each note having a directive that alters its display
>> so
>> it doesn't show the pitch or accidental. 
>I have just been playing around with this:
>If you execute this:
>
>(d-C)
>(d-DirectivePut-chord-graphic "test" "CrossSign")
>(d-DirectivePut-chord-override "test" DENEMO_OVERRIDE_GRAPHIC)
>(d-D)
>(d-DirectivePut-chord-graphic "test" "CrossSign")
>(d-DirectivePut-chord-override "test" DENEMO_OVERRIDE_GRAPHIC)
>(d-E)
>(d-DirectivePut-chord-graphic "test" "CrossSign")
>(d-DirectivePut-chord-override "test" DENEMO_OVERRIDE_GRAPHIC)
> 
>You get hidden notes C, D, E which still play but cannot be seen.
>If you put the cursor on the first note and hold down the Control key
>while playing in on a MIDI keyboard the cursor will advance only when
>you play the right note. (This is the Checking mode for MIDI in)
>
>Richard
>
>
>
Richard Shann | 6 Jul 2011 21:27
Favicon

Re: Melodic Dictation

On Wed, 2011-07-06 at 14:13 -0500, Jeremiah Benham wrote:
> It would take me a great deal of effort to create these dictation
> files. Thats why I thought maybe I would implement a computer
> generated midi.
Jeremiah - I am not sure if you are saying that you *can* see how to
generate sample melodies quickly now (by taking random selections from a
list of .denemo files) or the opposite.
That is, can you see how to get your melody for dictation with just a
few lines of Denemo scheme, or is this the step you are not sure of?
Richard

Gmane