Martin McBride, 2021-09-11
Tags python open source github pysound const musical note
Categories pysound pysound reference

Pysound const module

The const module stores useful constants.

Currently it only contains the Notes class.

Notes class

The Notes class contains the frequencies of all notes in the audible range.

The notes are indicated by tne note name and octave number. For example:

from pysound import const


Will print the frequency of the note middle C (conventionally the 4th octave).

Sharps are marked with a lower case s, so Cs4 is the C sharp above middle C.

Notice octave numbering starts on a C, so the first 12 notes starting from middle C are:

C4 Cs4 D4 Ds4 E4 F4 Fs4 G4 Gs4 A4 As4 B4

This is slightly odd because A4 is a higher note that C4, but it is how notes are conventionally named.

Join me on substack to keep up to date with this blog