Skip to content

matiasnm/voiceCipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voiceCipher

Harmonic voice-leading cipher notation for music21 scores

This Python package takes a multi-voice score and annotates each part with lyrics showing the harmonic interval and motion type between adjacent parts. Useful for counterpoint analysis, teaching, and checking student work.

Built on music21 — a toolkit for computer-aided musical analysis.

Example

Bach BWV 66.6:

voiceCipher example on Bach BWV 66.6

Cipher symbols

Symbol Motion
(none) Oblique motion
= Parallel motion
< Contrary motion (outward)
> Contrary motion (inward)
Direct motion (ascending)
Direct motion (descending)

In the example above the notation on the Soprano refers to the relation between Soprano and Alto; at the Alto part, the cipher corresponds to the relation Alto-Tenor and so on. The Bass part cipher reflects Soprano-Bass relation.

Installation

pip install git+https://github.com/matiasnm/voiceCipher.git

Or for development:

git clone https://github.com/matiasnm/voiceCipher.git
cd voiceCipher
pip install -e .

Usage

As a Python library

from voiceCipher import voiceCipher
from music21 import corpus

score = corpus.parse("bwv66.6")
result = voiceCipher(score, measureBreak=4)
result.show()

From the command line

# Run demo with Bach BWV 66.6
python -m voiceCipher

# Cipher your own MusicXML file
python -m voiceCipher my_score.xml

After pip install -e ., you also get a voicecipher command:

voicecipher my_score.xml

Render to PNG

If you have MuseScore 4 installed:

python render_to_png.py
python render_to_png.py my_score.xml

Requirements

  • Python ≥ 3.10
  • music21 ≥ 10.5.0
  • (optional) MuseScore 4 for PNG rendering

About

Ciphers voice leading (armonic intervals and motions) among parts on a music21 score Object

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages