Jump to content

Featured Replies

Posted

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?

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.

Jesper

You 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)

  • 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


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy