denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Melodic Dictation


From: Richard Shann
Subject: Re: [Denemo-devel] Melodic Dictation
Date: Sat, 13 Aug 2011 12:24:26 +0100

On Thu, 2011-08-11 at 17:41 -0500, Jeremiah Benham wrote:
> On 07/23/2011 08:05 AM, Richard Shann wrote:
> > On Thu, 2011-07-21 at 15:54 -0500, Jeremiah Benham wrote:
> >> I created a new version of this. Unfortunately the staff does not show
> >> because of the loop to listen for input.
> > This is because the script is executed too early - before the file open
> > dialog has finished. This didn't matter for previous uses of scripts
> > embedded in .denemo files as they were not interactive. I have changed
> > the behavior now so that embedded scheme is executed after the file
> > dialog has finished.
> > The script didn't seem to be working as intended however, but I guess it
> > is work-in-progress as it loops forever getting input.
> 
> The script worked for me. The loop you are talking about was the loop 
> that listens for keyboard input. I am not sure how I am able to allow 
> users to go back and forth between listen to portions of the score and 
> entering notes.
If you are looping with the d-GetCommand then you would see the user's
keyboard activated commands as d-InsertA or d-Play or whatever and could
take the action you wished. If you are intercepting keypresses then you
could give them fixed meanings. Or you could provide buttons for the
notes, and even a button to play the music from the bar before the
current bar up to the end of the current bar.
A nice feature would be a new window/frame with a graphical image of a
keyboard which returned the note name when you clicked on the right bit
of the keyboard - there will be free code for this already, it would
just need slotting in.

There is a proposal to provide a scheme hook that would be called on
every keypress; with that in place you would just be filling up a table
of actions.

>  Would the user select a range and hit f5 or whatever is 
> bound to playback. What will I do when they want to enter the note or 
> notes that they have heard in the playback. How do I tell denemo to 
> start this listening (listen for specific keys "a,b,c,d,e,f,g") loop? 
> Should maybe a quit button stop the loop?
> 
> I just thought of another music education idea. The user could see 
> fakechords like Fis7, Emaj7, Amin7, Gmin7 then the user would have to 
> enter the third,5th, or seventh of each chord on each change. This could 
> be timed also.

> This would require the user to enter in accidentals though.
We do have a "pending accidental" feature built-in to Denemo (that is
you can press sharp before you press C to get C#). This may need some
glue in view.c for scheme to get access to it.
Richard


> 
> Jeremiah
> 
> > Fix is in git now.
> > Richard
> >
> >
> >>   I am not sure where to precede
> >> from here. Check it out if you have time. It all works if I were to put
> >> in the melody and then run the script but if I allow the script to run
> >> with the .denemo file it causes denemo to not show the staff at all.
> >> Denemo does not hang however.
> >>
> >> Jeremiah
> >>
> >>
> >> On 07/14/2011 03:27 AM, Richard Shann wrote:
> >>> On Wed, 2011-07-13 at 22:52 -0500, Jeremiah Benham wrote:
> >>>> On 07/05/2011 08:37 AM, 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.
> >>>> Perhaps then I should create another script to generate the above based
> >>>> on a denemo score?
> >>> That is easy - load the score then move the cursor to each CHORD and
> >>> execute the directive put commands - I think Nils may have a one-liner
> >>> to apply a given procedure to every chord in a movement. My recent
> >>> scripts (e.g. fix slurs called by CheckScore) do this sort of traversal
> >>> of a score.
> >>>
> >>>>    How would this approach deal with accidentals. Sure
> >>>> the key signature would accommodate changes in name (like value (d-C)
> >>>> really meaning cis,,) I haven't tested that.
> >>> accidentals are ok, it just hides the chord.
> >>>>> 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)
> >>>> I like that idea. I am attaching an implementation of your idea above. I
> >>>> can see writing in the (c-D)(c-D) would get tedious. Should I write a
> >>>> script to export this list from a denemo score? Could I possibly do
> >>>> something like (d-Open "filename") go through the file and
> >>> yes - see above - you would create a procedure to be executed on each
> >>> CHORD, as I say Nils probably has one, perhaps also with a test
> >>> procedure (ie for-each-object-in-score test dothunk) which does dothunk
> >>> if test is true until there are no more objects, and then returns to the
> >>> original position.
> >>>>    put this on
> >>>> each note:
> >>>>
> >>>> (d-DirectivePut-chord-graphic "test" "CrossSign")
> >>>> (d-DirectivePut-chord-override "test" DENEMO_OVERRIDE_GRAPHIC)
> >>> Richard
> >>>
> >>>
> >>>> Jeremiah
> >>>>
> >>>>> Richard
> >>>>>
> >
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]