# 12 tone issue

## Recommended Posts

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

##### Share on other sites

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

##### Share on other sites

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

##### Share on other sites

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

##### Share on other sites

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...

##### Share on other sites

Quote

Just for testing. When the octave changes, the function give wrong result.

No wrong result, just wrong use of the function.

##### Share on other sites

Is this a  wrong use ?

(twelve-tonep '(c3 eb3 d3 f3 e3 g3 fs3 a3 gs3 b3 bb3 cs4))

why ?

##### Share on other sites

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```

##### Share on other sites

Thanks.

It have to be constrained in one octave.

I´ll remember to put modus before any octave independent use of tone-row.

##### Share on other sites

This function is only for tests.

Yes. Thank you.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
• #### Browser

• Video Gallery

• Lessons