Jump to content
Sign in to follow this  
JulioHerrlein

Context Sensitive (uppercase) Substitute Map -

Recommended Posts

Dear All, 

 

I´m creating some permutations and I´d like to assign a text under each note to make clear the use of certain intervals.

substitute-map '(T 2M 3M 4J 5J 6M 7M) '(c3 d3 e3 f3 g3 a3 b3) '(c3 d3 e3 f3 g3 c3 c3 c3 g3 c3 c3 d3))

But in the evaluation, I get this:

(t 2m 3m 4j 5j t t t 5j t t 2m)

With lowercase letters, I get 2m , 3m and 5J instead of 2M, 3M and 5J (uppercase names of intervals).

 

Since I want it for pedagogical reasons, can it be generated with the corresponding UPPERCASE letters ?

 

Thanks in advance.

 

All the best,

Julio

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Topics

    • By JulioHerrlein
      Dear All,
       
      I have a little suggestion for workflow.
       
      1) A simple context menu button (or some way) to open the XML snippet in other software.
      Like right-clicking on the snippet and have an option (OS based option) like "open with" (musescore, finale, sibelius, etc)
       
      This could be useful for collecting material for a piece to be edited outside Opusmodus.
      I personally use Musescore with my students. It's free, open and runs windows and mac.
      I also use Finale for myself.
      This simple options could solve the problem of the audition of many different snippets.
       
      2) Another (much more complex) idea would be  when click over each snippet to have a play panel, similar to the
       live coding panel (with play/stop button, tempo, volume, maybe sound and channel assigment , according
       to the number of staves, etc...
       
      This could be handy.
       
      Best,
      Julio
      added 2 minutes later Like this (when clicking over the snipett inside Opusmodus:
       

    • By AM
      ;;; little program to change markov-weight for a specific value ;;; to give markov a "rule-tendency" (setq transitions '((a (b 1) (c 3) (d 2) (e 1)) (b (a 2) (d 3)) (c (a 2) (e 1) (b 3)) (d (c 2) (b 1) (a 3)) (e (a 2) (b 2) (d 1)))) (defun substitute-transition-weight (transition-list value new-weight) (loop for j in transition-list collect (append (list (first j)) (loop repeat (1- (length j)) for cnt = 1 then (incf cnt) when (equal (first (nth cnt j)) value) collect (list (first (nth cnt j)) new-weight) else collect (nth cnt j))))) (substitute-transition-weight transitions 'a 100) ;;; example for "concrete use" (loop repeat 20 with transitions = '((a (b 3) (c 3) (a 2)) (b (a 2) (b 3) (c 5)) (c (a 2) (c 1))) with weight = 1 do (setq transitions (substitute-transition-weight transitions 'a weight)) do (incf weight 2) collect (gen-markov-from-transitions transitions :size 20 :start 'a)) best wishes 
      andré
    • By AM
      i'm working on a program including "markov"...
      so i coded this small FUNCTION to SUBSTITUTE markov-rules-values (because in my "project" i'm generating a feedback on the markov-rules (after a pattern-match)). i know it could be coded a lot smarter but it works.
      have fun! andré
       
      ;;;;FUNCTION (defun substitute-transition-value (transition-list value-old value-new) (loop for j in transition-list collect (loop for i in j when (numberp i) append (substitute value-new value-old (list i)) when (listp i) collect (append (substitute value-new value-old (list (first i))) (list (second i)))))) ;;;;;EXAMPLE (setq transitions '((1 (2 1) (3 3) (5 2) (8 1)) (2 (1 2) (5 3)) (3 (1 2) (8 1) (2 3)) (5 (3 2) (2 1) (1 3)) (8 (1 2) (2 2) (3 1)))) (substitute-transition-value transitions 1 -1) => ((-1 (2 1) (3 3) (5 2) (8 1)) (2 (-1 2) (5 3)) (3 (-1 2) (8 1) (2 3)) (5 (3 2) (2 1) (-1 3)) (8 (-1 2) (2 2) (3 1)))  
×
×
  • Create New...