diff options
author | Nils Gey <denemo@nilsgey.de> | 2011-02-12 22:54:57 +0100 |
---|---|---|
committer | Nils Gey <denemo@nilsgey.de> | 2011-02-12 22:54:57 +0100 |
commit | 7ee60c2ff03fb3b4ce84736ecbc41d6d5cdae05b (patch) | |
tree | 0d994c04be3c1ad6eb47ea651901d05714881ea9 | |
parent | 664af39979aa80db2da40f68643742e4e218d5dd (diff) |
Create user commands for converting strings into binary encoded ascii rhythms.
6 files changed, 110 insertions, 4 deletions
diff --git a/actions/Default.commands b/actions/Default.commands index 250c77ce..b443698f 100644 --- a/actions/Default.commands +++ b/actions/Default.commands @@ -4371,6 +4371,37 @@ for second and subsequent systems</tooltip> <menupath>/MainMenu/EditMenu/Select</menupath> <label>Select Left</label> <tooltip>Create a selection, move cursor left.</tooltip> + </row> + <row> + <action>InsertStringAsBinaryRhythm</action> + <scheme></scheme> + <menupath>/ObjectMenu/NotationMagick/GenerateRhythmFromString</menupath> + <label>Insert string as binary rhythm</label> + <tooltip>Give a string to generate a rhythm out of its ascii chars in binary encoding</tooltip> + </row> + <row> + <action>InsertReversedStringAsBinaryRhythm</action> + <after>InsertStringAsBinaryRhythm</after> + <scheme></scheme> + <menupath>/ObjectMenu/NotationMagick/GenerateRhythmFromString</menupath> + <label>Insert reversed string as binary rhythm</label> + <tooltip>Give a string to generate a rhythm out of its ascii chars in binary encoding. The string gets reversed before converting.</tooltip> + </row> + <row> + <action>InsertStringAsReversedBinaryRhythm</action> + <after>InsertReversedStringAsBinaryRhythm</after> + <scheme></scheme> + <menupath>/ObjectMenu/NotationMagick/GenerateRhythmFromString</menupath> + <label>Insert string as reversed binary rhythm</label> + <tooltip>Give a string to generate a rhythm out of its ascii chars in binary encoding. The rhythm for each letter gets reversed before inserting.</tooltip> + </row> + <row> + <action>InsertReversedStringAsReversedBinaryRhythm</action> + <after>InsertStringAsReversedBinaryRhythm</after> + <scheme></scheme> + <menupath>/ObjectMenu/NotationMagick/GenerateRhythmFromString</menupath> + <label>Insert reversed string as reversed binary rhythm</label> + <tooltip>Give a string to generate a rhythm out of its ascii chars in binary encoding. The string gets reversed before converting. The rhythm for each letter gets reversed before inserting.</tooltip> </row> </map> </merge> diff --git a/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertReversedStringAsBinaryRhythm b/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertReversedStringAsBinaryRhythm new file mode 100644 index 00000000..f52b315e --- /dev/null +++ b/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertReversedStringAsBinaryRhythm @@ -0,0 +1,19 @@ +<?xml version="1.0"?> +<Denemo> + <merge> + <title>A Denemo Keymap</title> + <author>AT, JRR, RTS</author> + <map> + <row> + <after>InsertStringAsBinaryRhythm</after> + <action>InsertReversedStringAsBinaryRhythm</action> + <scheme>(let ((return (NotationMagick::AskNewAsciistring))) + (if return + (NotationMagick::PutBinaryStringList (reverse (NotationMagick::String->CharsAsBinary return))) + #f))</scheme> + <label>Insert reversed string as binary rhythm</label> + <tooltip>Give a string to generate a rhythm out of its ascii chars in binary encoding. The string gets reversed before converting.</tooltip> + </row> + </map> + </merge> +</Denemo> diff --git a/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertReversedStringAsReversedBinaryRhythm b/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertReversedStringAsReversedBinaryRhythm new file mode 100644 index 00000000..fe977c04 --- /dev/null +++ b/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertReversedStringAsReversedBinaryRhythm @@ -0,0 +1,19 @@ +<?xml version="1.0"?> +<Denemo> + <merge> + <title>A Denemo Keymap</title> + <author>AT, JRR, RTS</author> + <map> + <row> + <after>InsertStringAsReversedBinaryRhythm</after> + <action>InsertReversedStringAsReversedBinaryRhythm</action> + <scheme>(let ((return (NotationMagick::AskNewAsciistring))) + (if return + (NotationMagick::PutBinaryStringList (reverse (NotationMagick::ReverseStringsInList (NotationMagick::String->CharsAsBinary return)))) + #f))</scheme> + <label>Insert reversed string as reversed binary rhythm</label> + <tooltip>Give a string to generate a rhythm out of its ascii chars in binary encoding. The string gets reversed before converting. The rhythm for each letter gets reversed before inserting.</tooltip> + </row> + </map> + </merge> +</Denemo> diff --git a/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertStringAsBinaryRhythm b/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertStringAsBinaryRhythm new file mode 100644 index 00000000..d2d8d6da --- /dev/null +++ b/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertStringAsBinaryRhythm @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<Denemo> + <merge> + <title>A Denemo Keymap</title> + <author>AT, JRR, RTS</author> + <map> + <row> + <action>InsertStringAsBinaryRhythm</action> + <scheme>(let ((return (NotationMagick::AskNewAsciistring))) + (if return + (NotationMagick::PutBinaryStringList (NotationMagick::String->CharsAsBinary return)) + #f))</scheme> + <label>Insert string as binary rhythm</label> + <tooltip>Give a string to generate a rhythm out of its ascii chars in binary encoding</tooltip> + </row> + </map> + </merge> +</Denemo> diff --git a/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertStringAsReversedBinaryRhythm b/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertStringAsReversedBinaryRhythm new file mode 100644 index 00000000..dab61fbc --- /dev/null +++ b/actions/menus/ObjectMenu/NotationMagick/GenerateRhythmFromString/InsertStringAsReversedBinaryRhythm @@ -0,0 +1,19 @@ +<?xml version="1.0"?> +<Denemo> + <merge> + <title>A Denemo Keymap</title> + <author>AT, JRR, RTS</author> + <map> + <row> + <after>InsertReversedStringAsBinaryRhythm</after> + <action>InsertStringAsReversedBinaryRhythm</action> + <scheme>(let ((return (NotationMagick::AskNewAsciistring))) + (if return + (NotationMagick::PutBinaryStringList (NotationMagick::ReverseStringsInList (NotationMagick::String->CharsAsBinary return))) + #f))</scheme> + <label>Insert string as reversed binary rhythm</label> + <tooltip>Give a string to generate a rhythm out of its ascii chars in binary encoding. The rhythm for each letter gets reversed before inserting.</tooltip> + </row> + </map> + </merge> +</Denemo> diff --git a/actions/notationmagick.scm b/actions/notationmagick.scm index 730c02b9..d8ecc118 100644 --- a/actions/notationmagick.scm +++ b/actions/notationmagick.scm @@ -11,14 +11,14 @@ (define (NotationMagick::AskNewNotationstring) (define new (d-GetUserInput "Enter Lilypond notes" "Please insert a list of lilypond notes, separated by Space." NotationMagick::NOTATIONSTRING)) (if new - (set! NotationMagick::NOTATIONSTRING new)) - (map string->symbol (string-tokenize NotationMagick::NOTATIONSTRING))) + (begin (set! NotationMagick::NOTATIONSTRING new) (map string->symbol (string-tokenize NotationMagick::NOTATIONSTRING))) + #f)) (define (NotationMagick::AskNewAsciistring) (define new (d-GetUserInput "Enter ASCII chars" "Please insert any kind and number of ASCII chars " NotationMagick::ASCIISTRING)) (if new - (set! NotationMagick::ASCIISTRING new)) - NotationMagick::ASCIISTRING) + (begin (set! NotationMagick::ASCIISTRING new) NotationMagick::ASCIISTRING) + #f)) ; Lilypond wrappers for ANS functions |