Posted May 16May 16 Hello,using pitch-transpose i sometimes get unexpected results with pitches as transpose value. the results are one octave lower than expected. Here are examples:(pitch-transpose 'd3 '(c3 d3 e3 f3))-> (d2 e2 fs2 g2)(pitch-transpose 'd2 '(c3 d3 e3 f3))-> (d1 e1 fs1 g1)(pitch-transpose 'd4 '(c3 d3 e3 f3))-> (d3 e3 fs3 g3)interestingly, this one works as expected:(pitch-transpose 'd5 '(c4 d4 e4 f4))-> (d5 e5 fs5 g5)What am i missing?
May 16May 16 I think when using a pitch for the transpose argument, OM uses pitch-to-integer, so your first example(pitch-transpose 'd3 '(c3 d3 e3 f3)) is actually (pitch-transpose (pitch-to-integer 'd3) '(c3 d3 e3 f3)) ) = (pitch-transpose -10 '(c3 d3 e3 f3))You are better off writing (pitch-transpose 2 '(c3 d3 e3 f3)) if you want to transpose a second (two steps) up.JesperYou could also create a function that will give you the result you expected.(defun pitch-transp (transpose pitches)(pitch-transpose (first (pitch-to-interval (list (first pitches) transpose))) pitches))(pitch-transp 'd3 '(c3 d3 e3 f3))=>(d3 e3 fs3 g3)(pitch-transp 'd5 '(c4 d4 e4 f4))=>(d5 e5 fs5 g5)
May 16May 16 Author hello jesper,ah! thanks for pointing me to pitch-to-integer and for the function.i will use this!m.
Create an account or sign in to comment