summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Gey <denemo@nilsgey.de>2011-02-12 21:43:32 +0100
committerNils Gey <denemo@nilsgey.de>2011-02-12 21:43:32 +0100
commit3c85b1b8436f59041fe63720912907652c9a8558 (patch)
tree814c994c92c5865dd21e93b00d013e7ed52ee3b8
parent76a701e95bc49fa030313f10472c04cecfa64b0a (diff)
notationmagick: Add new var to hold an ascii string for several functions and a function for the user to change that
-rw-r--r--actions/notationmagick.scm20
1 files changed, 14 insertions, 6 deletions
diff --git a/actions/notationmagick.scm b/actions/notationmagick.scm
index 30850e4f..e9257927 100644
--- a/actions/notationmagick.scm
+++ b/actions/notationmagick.scm
@@ -2,8 +2,21 @@
;; By Nils Gey 2010
;; Needs loaded ans.scm
-;; A global var, used by several NotationMagick functions to remember the last value used
+;; Global vars, used by several NotationMagick functions to remember the last value used
(define NotationMagick::NOTATIONSTRING "c' e' g'")
+(define NotationMagick::ASCIISTRING "bach")
+
+
+;; Ask for a new NOTATIONSTRING with an input-window, remember the value and return it as list of symbols for ANS
+(define (NotationMagick::AskNewNotationstring)
+ (define new (d-GetUserInput "Enter Lilypond notes" "Please insert a list of lilypond notes, separated by Space." NotationMagick::NOTATIONSTRING))
+ (set! NotationMagick::NOTATIONSTRING new)
+ (map string->symbol (string-tokenize NotationMagick::NOTATIONSTRING)))
+
+(define (NotationMagick::AskNewAsciistring)
+ (define new (d-GetUserInput "Enter ASCII chars" "Please insert any kind and number of ASCII chars " NotationMagick::ASCIISTRING))
+ (set! NotationMagick::ASCIISTRING new)
+ NotationMagick::ASCIISTRING)
; Lilypond wrappers for ANS functions
@@ -25,11 +38,6 @@
(define (NotationMagick::InsertMemberRandomlyLy lylist)
(ANS::InsertMemberRandomly (map ANS::Ly2Ans lylist)))
-;; Ask for a new NOTATIONSTRING with an input-window, remember the value and return it as list of symbols for ANS
-(define (NotationMagick::AskNewNotationstring)
-(define new (d-GetUserInput "Enter Lilypond notes" "Please insert a list of lilypond notes, separated by Space." NotationMagick::NOTATIONSTRING))
-(set! NotationMagick::NOTATIONSTRING new)
-(map string->symbol (string-tokenize NotationMagick::NOTATIONSTRING)))
;; Insert a random note which is in a reasonable range according to the prevailing clef. Up to one step above/under the first Ledger line.
;; First the prototype, then one derived version for chromatic, one for diatonic.