JulioHerrlein Posted January 3, 2023 Share Posted January 3, 2023 Dear Friends, I was revisiting some 12-tone theory today and I found something strange: This returns NIL (twelve-tonep '(c3 eb3 d3 f3 e3 g3 fs3 a3 gs3 b3 bb3 cs4)) but this returns TRUE (twelve-tonep '(c4 eb4 d4 f4 e4 g4 fs4 a4 gs4 b4 bb4 cs4)) It´s the SAME tone-row NIL for this (twelve-tonep (pitch-transpose -12 '(c4 eb4 d4 f4 e4 g4 fs4 a4 gs4 b4 bb4 cs4))) TRUE for this (twelve-tonep (pitch-transpose 0 '(c4 eb4 d4 f4 e4 g4 fs4 a4 gs4 b4 bb4 cs4))) Maybe the algorithm to find the row is based in the c4 octave... I don´t know... Best Quote Link to comment Share on other sites More sharing options...
LdBeth Posted January 5, 2023 Share Posted January 5, 2023 Despite the documentation says Return true if sequence is a twelve-tone row, from what I observed it seems the algorithm used is: (defun twleve-tone-p (omn) (equal (sort (pitch-to-integer omn) #'<) (range 0 11))) JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
LdBeth Posted January 5, 2023 Share Posted January 5, 2023 I think you might want this: (defun tw-p (omn) (equal (let ((x (sort (pitch-to-integer omn) #'<))) (x-b x (apply #'min x))) (range 0 11))) And in you example it seems should be '(c3 eb3 d3 f3 e3 g3 fs3 a3 gs3 b3 bb3 cs3) instead of cs4. (let ((x (pitch-to-integer '(c3 eb3 d3 f3 e3 g3 fs3 a3 gs3 b3 bb3 cs3)))) (x-b x (apply #'min x))) (0 3 2 5 4 7 6 9 8 11 10 13) Quote Link to comment Share on other sites More sharing options...
opmo Posted January 5, 2023 Share Posted January 5, 2023 row is from 0 to 11 with 12 intervals. what is the reason to do this: (twelve-tonep (pitch-transpose -12 '(c4 eb4 d4 f4 e4 g4 fs4 a4 gs4 b4 bb4 cs4))) JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted January 5, 2023 Author Share Posted January 5, 2023 Dear Janusz, Just for testing. When the octave changes, the function give wrong result. I´m doing a workaround putting before an (ambitus-octave c4 1 Best, Julio Maybe it´s better to embed the ambitus constraint in the function or something similar in order to get right results in any octave. Since the concept of "pitch class" is octave independent... Quote Link to comment Share on other sites More sharing options...
opmo Posted January 5, 2023 Share Posted January 5, 2023 Quote Just for testing. When the octave changes, the function give wrong result. No wrong result, just wrong use of the function. Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted January 5, 2023 Author Share Posted January 5, 2023 Is this a wrong use ? (twelve-tonep '(c3 eb3 d3 f3 e3 g3 fs3 a3 gs3 b3 bb3 cs4)) why ? Quote Link to comment Share on other sites More sharing options...
opmo Posted January 5, 2023 Share Posted January 5, 2023 Quote Since the concept of "pitch class" is octave independent... Use modus first and than the twelve-tonep This is correct: (twelve-tonep '(c3 eb3 d3 f3 e3 g3 fs3 a3 gs3 b3 bb3 cs4)) => nil is not 12 tone row. With modus: (twelve-tonep (modus '(c3 eb3 d3 f3 e3 g3 fs3 a3 gs3 b3 bb3 cs4))) => t Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted January 5, 2023 Author Share Posted January 5, 2023 Thanks. It have to be constrained in one octave. I´ll remember to put modus before any octave independent use of tone-row. Quote Link to comment Share on other sites More sharing options...
opmo Posted January 5, 2023 Share Posted January 5, 2023 This function is only for tests. Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted January 5, 2023 Author Share Posted January 5, 2023 Yes. Thank you. 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.