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? 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.
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 put this on each note:

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

Jeremiah

Richard


(use-modules (ice-9 optargs))

(define TwinkleDictation::acceptable_input (list "a" "b" "c" "d" "e" "f" "g"))

(define (EducationGames::GetAcceptableKeyInput acceptable_list)
  (let (
        (input 0)
        (getinput 0))

  (set! getinput
        (lambda ()
          (set! input (d-GetKeypress))
          (if (not (or (boolean? input) (member input acceptable_list)))
                (getinput))))
  (getinput)
  input))

(define (PlaceNote note)
    (eval-string (string-append "(d-" note ")"))
    (d-DirectivePut-chord-graphic "test" "CrossSign")
    (d-DirectivePut-chord-override "test" DENEMO_OVERRIDE_GRAPHIC))
 
(define (Bread)
   (map PlaceNote '("G" "G"))
   (PlaceNote "D")
   (d-OctaveUp) 
   (map PlaceNote '("D" "E" "E" "D"))
   (d-Change1) 
   (map PlaceNote '("C" "C" "B" "B" "A" "A" "G"))
   (d-Change1))
 
 (define (Cheese)
   (PlaceNote "D")
   (d-OctaveUp) 
   (map PlaceNote '("D" "C" "C" "B" "B" "A"))
   (d-Change1)
   (map PlaceNote '("D" "D" "C" "C" "B" "B" "A"))
   (d-Change1))
   
(Bread)
(Cheese)
(Bread)
 
(d-MoveToBeginning)

(if (string=? (d-GetNoteName) (EducationGames::GetAcceptableKeyInput TwinkleDictation::acceptable_input))
  (d-DirectiveDelete-chord "test"))

(define (Next)
  (if (d-NextObject)
    (begin
      (if (string=? (d-GetNoteName) (EducationGames::GetAcceptableKeyInput TwinkleDictation::acceptable_input))
      (d-DirectiveDelete-chord "test"))
      (Next))))
  
  (Next)


_______________________________________________
Denemo-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel

Reply via email to