(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)