Skip to main content

A package with functionality for atonal music theory

Project description

1. Introduction

pctheory is a Python module for working with atonal theory. It has classes that model chromatic pitch-classes, microtonal pitch-classes, pitches, and transformations. To make collections, you use standard Python objects, including list, set, and tuple types.

To distinguish chromatic and microtonal pitches and pitch-classes, the term “chromatic system” is used to refer to aspects of atonal theory that apply to twelve‐note equal‐temperament. The term “microtonal system” refers to aspects of atonal theory that apply to twenty‐four‐note equal‐temperament. The term “twelve‐tone system” refers specifically to Arnold Schoenberg's technique of using ordered twelve‐note aggregates; a completely different concept.

Any scale, chord, or other collection of pitches or pitch-classes can be modeled as a mathematical set, called a pitch-class set (pcset) or pitch set (pset). An ordered succession of pitches or pitch-classes is called a pitch-class segment (pcseg) or pitch segment (pseg). A partially-ordered set (poset) is (for the purposes of this module) an ordered succession of sets, lists, and/or individual pitches/pitch-classes. Any melody or musical line can be modeled as a pseg, or more abstractly as a pcseg, while chords can be modeled as either psegs, pcsegs, psets, or pcsets depending on which makes the most sense in any given situation.

2. Uses of pctheory

pctheory is a general-purpose platform for the use of atonal theory. There is, of course, no requirement that the music be atonal. Many of the features implemented in pctheory can be readily used in a tonal or quasi-tonal context. pctheory makes it easy to manipulate complex chords (whether “tonal”‐sounding or not), determine relationships between different kinds of chords or pitch-class collections, and perform many calculations quickly and accurately. For example, pctheory allows you to easily create and use rotational arrays (as used in Stravinsky's music). This could be useful for both composition and analysis. One interesting feature of pctheory is its inclusion of tools for working with pitch directly, rather than through the abstraction of pitch-class. This is applicable to music that uses fixed-pitch formations.

Because pctheory is a Python module, it is easy to write simple programs in Python to investigate pitch, pitch-class, and operator relations. If you want to generate all pentachordal set-classes and select only those that contain ic3, you can write a short program that uses pctheory to do this for you. If you want to study all of the subset-classes of a set-class, it is easy to generate them with pctheory. If you want to generate several different invariance matrices, this can be easily done. There is no need to work it out on paper. If you want to transform an array, pctheory can do that with a single method call. Perhaps you want to study all of the pcsets in a set-class. They can be generated with a single method call as well. If you need to know Elliott Carter's number for a particular chromatic chord, that functionality is part of the SetClass12 class, so there is no need to open a reference book. The same goes for standard properties like Forte names and ic vectors.

3. Prerequisites

pctheory requires Python 3.0 or newer, as well as the additional modules networkx, numpy, pandas, and pyvis.

4. Documentation

Documentation is available at fleximeter's github website.

5. Copyright and license

pctheory is copyright © 2022 by Jeffrey Martin. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To view the GNU General Public License v.3.0, visit https://www.gnu.org/licenses/gpl-3.0.en.html.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pctheory-0.0.28.tar.gz (180.3 kB view details)

Uploaded Source

Built Distribution

pctheory-0.0.28-py3-none-any.whl (185.4 kB view details)

Uploaded Python 3

File details

Details for the file pctheory-0.0.28.tar.gz.

File metadata

  • Download URL: pctheory-0.0.28.tar.gz
  • Upload date:
  • Size: 180.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for pctheory-0.0.28.tar.gz
Algorithm Hash digest
SHA256 b1ca806140612e8dcf8d1fbdfbd1f7c30578ae5859ff592dbc167a051fb8453b
MD5 0da1b7cea708301af1a661b6db7ef9ff
BLAKE2b-256 446e05b7f5f2a179319eacbff552c9fae471579b9713ed45e589046152c3d086

See more details on using hashes here.

File details

Details for the file pctheory-0.0.28-py3-none-any.whl.

File metadata

  • Download URL: pctheory-0.0.28-py3-none-any.whl
  • Upload date:
  • Size: 185.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for pctheory-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 afaab6939e6a494f30292bbc925e3bbe330ab8388d76b16b7cd52b522d4e643a
MD5 8aa56faf882a4f65cfe6c6f37bed7b2d
BLAKE2b-256 0f2b49d468c278c52bbf0b01355d2542724ac54131027e57b85b99b8c14b4643

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page