AM Posted August 3, 2018 Share Posted August 3, 2018 i would like to number a pitch sequence, so that every pitch has a number which is written in the score (above the pitch). how can i do that...? any idea? thanx for help a. Quote Link to comment Share on other sites More sharing options...
opmo Posted August 3, 2018 Share Posted August 3, 2018 (q c4 num0 cs4 num1 d4 num2) or create you own articulations, do check the docs. Quote Link to comment Share on other sites More sharing options...
AM Posted August 3, 2018 Author Share Posted August 3, 2018 (edited) i know, but i would like to code it and not to write it by hand here is the solution: ;;; THE NUM-FUCTION for ARTICULATION (defun gen-num (n &key (start 0)) (loop for i from start to n append (list (compress (list 'num i))))) ;;; (setf pitches (loop repeat 20 collect (rnd-pick '(c4 d4 e4 f4)))) (setf articulation (gen-num (length pitches))) (make-omn :pitch pitches :articulation articulation :length '(t) :span :pitch) => (t f4 num0 e4 num1 c4 num2 d4 num3 e4 num4 f4 num5 d4 num6 d4 num7 f4 num8 f4 num9 c4 num10 d4 num11 e4 num12 d4 num13 f4 num14 f4 num15 e4 num16 d4 num17 e4 num18 c4 num19) @janusz: it works like that... but num0, num1... stops at num100, higher numbers seems not to be possible... but i would need about 1000 Edited August 3, 2018 by AM Quote Link to comment Share on other sites More sharing options...
opmo Posted August 4, 2018 Share Posted August 4, 2018 create you own text articulations: (add-text-attributes '(nr0 "0") '(nr1 "1") ) JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
AM Posted August 4, 2018 Author Share Posted August 4, 2018 (edited) thanks, so i have to code an algorithm to write such a library (till 1000) - or do it by hand any idea to code such a format? - i don't know how to code/write such a format with single lists (and not lists in lists) inside a function... thanx for help andré Edited August 4, 2018 by AM JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
AM Posted October 19, 2018 Author Share Posted October 19, 2018 this is the simple solution... (defun add-numbers-to-text-attributes (a b) (loop for i from a to b append (add-text-attributes (list (compress (list 'nr i)) (write-to-string i))))) (add-numbers-to-text-attributes 12 23) => (nr12 nr13 nr14 nr15 nr16 nr17 nr18 nr19 nr20 nr21 nr22 nr23) JulioHerrlein and lviklund 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.