Jump to content

PatrickMimran

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by PatrickMimran

  1. This is a simple piano piece by Patrick Mimran . SimpleSpringPianoPiece - - Output - Stereo Out.mp3 SimpleSpringPianoPiece.opmo
  2. Yes it does the work very well but no for lists when i do: (position-insert 2 '(g8 g3 g6 ) '(c4 c4 c4 c4 c4) :type list) or (position-insert 2 '(g8 g3 g6 ) '(c4 c4 c4 c4 c4) :type 'list) Thanks Patrick
  3. Désolé mais je n'arrive pas à le faire marcher en suivant vos instructions (defun consxp (rang item lis &key (option1 a) (option2 a) ) (setq oldlist lis) (setq newlist ( nthcdr rang oldlist )) (setq litem (list item)) (cond ( ( and ( listp item ) (hassublistp oldlist )) (if (equal option1 a)) (append (list-diff oldlist newlist ) (list item) (nthcdr rang oldlist )) (append (list-diff oldlist newlist ) item (nthcdr rang oldlist ))) (( and ( atom item ) (hassublistp oldlist )) (if (equal option2 a) (append (list-diff oldlist newlist ) (cons (list item) (nthcdr rang oldlist )))) (append (list-diff oldlist newlist ) (cons item (nthcdr rang oldlist )))) (( listp item ) (append (list-diff oldlist newlist ) item (nthcdr rang oldlist ))) (( atom item ) (append (list-diff oldlist newlist ) (cons item (nthcdr rang oldlist )))))) ( consxp 2 '(a d a) '(a (d) c) )))
  4. Hello i tried to have a function who could move one atom or a list anyplace in another list , but now i would like to have the options to move this atom or list with or without parenthesis , see option a option b option a2 option b2 . I have no idea how i can implement several result options in a function , could you please explain me how to do that Thank you Patrick her are the functions i'd use as helping functions (defun list-diff (L1 L2) (cond ((null L1) nil) ((null (member (first L1) L2)) (cons (first L1) (list-diff (rest L1) L2))) (t (list-diff (rest L1) L2)) ) ) (defun hasSublistp (lst) (cond ((null lst) nil) ((listp (first lst)) t) (t (hasSublistp (rest lst))))) This is the final one (defun consxp (rang item lis ) (setq oldlist lis) (setq newlist ( nthcdr rang oldlist )) (setq litem (list item)) (cond ( ( and ( listp item ) (hassublistp oldlist )) ; OPTION A (append (list-diff oldlist newlist ) (list item) (nthcdr rang oldlist ))) ; OPTION B (append (list-diff oldlist newlist ) item (nthcdr rang oldlist ))) (( and ( atom item ) (hassublistp oldlist )) ; OPTION A2 (append (list-diff oldlist newlist ) (cons (list item) (nthcdr rang oldlist )))) ; OPTION B2 (append (list-diff oldlist newlist ) (cons item (nthcdr rang oldlist )))) (( listp item ) (append (list-diff oldlist newlist ) item (nthcdr rang oldlist ))) (( atom item ) (append (list-diff oldlist newlist ) (cons item (nthcdr rang oldlist )))))) ; ( consxp 2 '( a d a) '(a (d) c )) option a ) for example
  5. Hi Stephane Based on your example i tried to apply a transposition list based on your functions but with an exotic scale Ex ;; degree selection (setf degr '(1 4 2 5 1 6 4 2 5)) ;; remove 1 from each degree for use as transposition ;; inside tonality for diatonic transposition (setf trsp (mapcar (lambda(x) (- x 1)) degr)) ;;; some material (setf arps1 (gen-repeat (length degr) '((s c4 e4 g4 c5 e5 g5 c6 g5 e5 c5 g4 e4)))) ;; apply diatonic transposition (inside tonality) (setf arps.map (tonality-map '(hyojo :root c4) (pitch-transpose trsp arps1))) This is the start of the result i gat with pitches not belonging to the scale (s c4 f4 g4 c5 eb5 g5 c6 g5 f5 c5 g4 f4) (s eb4 g4 bb4 eb5 g5 bb5 eb6 bb5 g5 eb5 bb4 g4) i think the trsp function doesn't work with the Hyojo scale . Is there a way to make a algorithm which would work with any type of exotic scales ? Thanks Patrick
  6. Is there a way or a function to check the structure of a tonality for example: (integer-to-pitch Arabic) -> 1 3 1 ETC. Or with pitches or intervals
  7. Here is the score Very often when rnd repeat of Rhyt is too high i gat this error message when i want to export last score to midi ,maybe a mistake on my part which i do no pinpoint Thanks Patrick (setf pitch (rnd-repeat '(60) '(c5 d5 e5 f5 e5 bb5 g5 a5 b5 c6))) (setf color (tonality-map '(heptonia-seconda :root c3 :remove 1) (rnd-repeat '(60) '(c5 d5 e5 f5 e5 bb5 g5 a5 b5 c6)))) (setf rhyt (rnd-repeat '(1000) '(s -s -e e))) (setf rhyt2 (rnd-repeat '(50) '(h q))) (setf main-span (get-span rhyt)) (setf rhyt2-span (length-span main-span rhyt2)) (setf piano-righthand (make-omn :length rhyt :pitch color :velocity '(mp))) (setf piano-lefthand (make-omn :length rhyt2-span :pitch color :velocity '(f))) (setf timesigs (get-time-signature piano-righthand)) (def-score Stage-4 (:key-signature 'atonal :time-signature timesigs :tempo 80 :layout (piano-layout 'piano-rh 'piano-lh)) (piano-rh :omn piano-righthand :channel 1 :sound 'gm :program 'acoustic-grand-piano) (piano-lh :omn piano-lefthand))
  8. Hello I try to use the library by trying to retrieve a scale (setf row (integer-to-pitch (apply-eval (library 'modes 'iran 'dastgah-mahur))))but i can't access it , i gat a message saying Error: Undefined function scale1 called with arguments (dastgah-mahur) . > While executing: ccl::toplevel-eval, in process Listener-1(8). > Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts. > If continued: Retry applying scale1 to (dastgah-mahur). > Type :? for other options. Mystery ... could you help thanks. Patrick
  9. Hello i try to tranlate pattest into list of pitches from library how may i achieve this , could you help thanks (setq pattest (library 'modes 'minor nil :random 3 )) (setq pattestpitches (mapcar 'integer-to-pitch pattest ))
  10. And if i want to see the mode in pitch how do i convert 'metrons-middle-easten to '( cs4 etch ....pitch list Thanks
  11. How may i retrieve modes from libraries as a pitch list like (c4 d4 etc....) Thanks Patrick
  12. Hello if i do It gives me the folowing result, this i understand (setf chords '((c4 maj) (f4 m) (f4 m) (g4 maj) (c4 maj))) (setf rows (gen-repeat 5 (list '(q c4 cs4 d4 ds4 e4 f4 fs4 g4 gs4 a4 as4 b4)))) (setf tonality1 (tonality-series chords :root '(c4 f4 f4 g4 c4))) (tonality-map tonality1 rows) => ((q c4 c4 c4 e4 e4 e4 g4 g4 g4 g4 c5 c5) (q f4 f4 gs4 gs4 gs4 gs4 c5 c5 c5 c5 f5 f5) (q f4 f4 gs4 gs4 gs4 gs4 c5 c5 c5 c5 f5 f5) (q g4 g4 b4 b4 b4 b4 d5 d5 d5 d5 g5 g5) (q c4 c4 c4 e4 e4 e4 g4 g4 g4 g4 c5 c5))but if i do (setf tonality1 (tonality-series chords :root '(c4 f4 f4 g4 c4) :add '(2) :closest '(up)))it gives => ((q c4 d4 d4 e4 e4 e4 g4 g4 g4 g4 c5 c5) (q f4 f4 gs4 gs4 gs4 b4 b4 b4 eb5 eb5 eb5 f5) (q f4 f4 gs4 gs4 gs4 b4 b4 b4 eb5 eb5 eb5 f5) (q g4 g4 g4 c5 c5 c5 c5 e5 e5 e5 e5 g5) (q c4 d4 d4 e4 e4 e4 g4 g4 g4 g4 c5 c5))what i do not understand if :add '(2) adds an interval of two semitones from the root why do i get (q f4 f4 gs4 gs4 gs4 b4 b4 b4 eb5 eb5 eb5 f5)and not (q f4 f4 g4 g4 gs4 b4 b4 b4 eb5 eb5 eb5 f5)There probably something i miss could you explain this to me Thanks Patrick
  13. Hello, Could you let me know how i can record a live coding session . I tried using save but without success. Thanks, Patrick
  14. I am just looking to have 12 different repeats or draws from (rnd-sample 3 (c4 cs4 e4 f4 g4 gs4 a4 b4))with at each repeat sample 3 new pitches from the list . Or if you prefer 12 different evaluations of rnd-sample 3 . It is in SCOM (g-eval nil 9 '(gen-random nil 3 '(a b c d e)))This is what i am trying to do. Thanks Patrick
  15. Sorry but i think it does the same thing (setf chords (gen-chord2 12 3 (gen-repeat 12 (rnd-sample 3 '(c4 cs4 e4 f4 g4 gs4 a4 b4))) :offset '(2) :transpose '(3 8 -3))) => (bb4d5d5 g5eb5g5 gs4gs4e4 bb4d5d5 g5eb5g5 gs4gs4e4 bb4d5d5 g5eb5g5 gs4gs4e4 bb4d5d5 g5eb5g5 gs4gs4e4) It repeats several times the same set of three chords . What i am looking for is to have 12 different chords
  16. Hello i would like to have this function to repeat 12 times different random repeats of 3 pitches at each draw and not as it does right now 12 times the same choice . I know it is easy but i can't recall how i can achieve this (setf chords (gen-chord2 12 3 (gen-repeat 12 (rnd-repeat '(3) '(c4 cs4 e4 f4 g4 gs4 a4 b4))) :offset '(2) :transpose '(3 8 -3)))Thanks Patrick
  17. So the solution is to place it before the function as a variable isn't it ?
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy