rndrnd

Members
  • Content count

    36
  • Joined

  • Last visited

  • Days Won

    4

rndrnd last won the day on April 18

rndrnd had the most liked content!

About rndrnd

  • Rank
    Junior Member

Profile Information

  • Gender
    Not Telling
  1. Now it is fixed
  2. This is a simple piano piece by Patrick Mimran . SimpleSpringPianoPiece - - Output - Stereo Out.mp3 SimpleSpringPianoPiece.opmo
  3. 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
  4. Sorry i cannot find it
  5. 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) )))
  6. Merci Super Patrick
  7. 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
  8. Super cool Patrick Mimran
  9. 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
  10. 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
  11. Comment peut on voir les notes ou intervalles, la structure d'une tonalité. Ex. (integer-to-pitch raga-yashranjani) ou autres Merci, Patrick