Download and installation
- MacOS: just run the installer
- Windows (works also on MacOS prior to Big Sur): double-click (or right-click + open) on
- Command line run:
java -jar HexaChord.jar
- Compile and run from source code: see the GitLab repository
You might be asked to install Java first if it is not installed yet on your computer.
What is it ?
HexaChord is a computer-aided music analysis/composition software based on spatial representations of musical pitches generalizing the Tonnetz. Chord spaces related to a T/I class grouping 3-note chords in diatonic and chromatic scales are displayed as infinite 2D triangular tessellations. HexaChord also includes other representation spaces as the chromatic and fifths circles and a voice-leading intervallic content space.
- Input musical content from any MIDI file or streamed from a connected MIDI device (typically a MIDI keyboard)
- Visualize musical content in different generalized Tonnetze with real time audio playback
- Compare the compactness of the trajectories representing a MIDI stream within different space
- Transform MIDI streams by applying spatial transformations on trajectories (translation, rotation, change of the support space)
- Output transformed streams as MIDI files, analysis diagrams as PNG files.
When HexaChord starts you'll be asked to load a MIDI file. You can choose either one of the example files accompanying the software, or any MIDI file on your disk. Note that you have to load a default file even if you want to use the software to stream MIDI from an external device. In this case loading any random MIDI file will do the job.
The interface is divided into four parts respectively dedicated to MIDI input/playback, visualization, trajectory analysis and trajectory transformation.
This area enables to select the two possible MIDI input modes of the software
midi file: any MIDI file can be loaded from the disk and played with play/pause/stop buttons. Horizontal cursors enable to edit the tempo and jump at any time point of the file.
ext keyboard: this will streams MIDI from any connected MIDI device. Once some MIDI has been recorded, it can be manipulated in the same way than a loaded MIDI file. To stream MIDI from an external USB keyboard, just plug your keyboard, launch HexaChord, select any MIDI file in the default list (this is necessary for HexaChord to start properly), then just hit
p. A list of available MIDI device should appear, just double-click on your device.
Intervallic structure menu enables to select a pitch class space in which the loaded stream is visualized. Pitch class spaces are labelled by the intervallic content of their composite chord (it can be also viewed as the number of semitones associated with the different interval axis). For instance,
[3,4,5] includes intervals of minor third, major third and perfect fourth. It corresponds to the traditionnal Tonnetz.
The menu includes 12 possible intervallic contents in the chromatic scale (from
[4,4,4]) and 4 possible intervallic contents in diatonic scale (
[2,2,3]). Note that intervallic structures allways sum up to 12 in case of chromatic scales and to 7 in case of diatonic scales. When a diatonic intervallic content is selected, the user needs additionally to specify a scale on which this intervallic content is applied.
Selecting a pitch-class space will generally open it in a separate window, which enables to open multiple spaces in the same time to compare trajectories. The buttons
hide all will help to control the visibility of the different spaces.
Pitch class spaces can be zoomed-in/out by scrolling over the different windows. Zooming out shows how pitch-class infinitely repeat along interval axis. Due to this property, a played note/chord is lightened multiple times within a space during the playback. In order to get a more clear representation of the harmonic progression, the
Trace mode button enables to switch in a mode where pitch-classes are activated only once (a proximity algorithm is used to find closest pitch-classes at each consecutive step during the playback) and regions lightened in the past stay in dark yellow. This functionality strongly helps the visualization of trajectories.
Harmonization button enables to visualize (in green) unplayed pitch-classes that have the highest number of played pitch-classes in their neighbor. This can be used to experiments harmonization based on proximity criterion.
circle 5 and
VL space ON will respectively display the chromatic circle, the fifth circle and a 3-notes chord type voice-leading space.
Compactness of trajectories
compute compactness button will display an histogram showing the compactness of the trajectories in a set of spaces. The set of spaces is selected with the menu
complex dimension. The number indicates the dimension of the spaces. To stay with the 2-dimensional spaces available for visualization (from
[4,4,4]), just let it at 2. The
compactness dimension menu enables to select different methods for the computation of the compactness. 1-compactness will focus on dyads, 2-compactness will focus on triads, etc. Details on the computation of the compactness can be found on this article.
HexaChord enables to apply various transformations to a MIDI stream that was loaded from a MIDI file or recorded from a connected MIDI device.
- change of space: the menus below
destination complexenables to hear how sounds a trajectory in that is "pasted" into an other space than its original one. This transformation results in the application of a mapping to the intervals of the original piece (but not necessarily a mapping on pitch-classes). For example, when selecting
[3,4,5]as the origin space and
[2,3,7]as a destination space, minor thirds become major seconds, major thirds become minor thirds, perfect fourth become perfect fifth. Note that origin and destination spaces can also be diatonic spaces, in this case it is necessary to specify tonalities as well (right menus).
- rotation: a value between 0 and 5 specifying the number of steps for the rotation of the trajectory. Note that spaces being hexagonal, a rotation of 6 steps puts back the trajectory in its original orientation. It is the equivalent to 0. Specifying number 3 results in applying an inversion on the pitch-classes (as every interval is switched to its opposite value).
- translation: any translation vector within an hexagonal lattice can be formulated as a combination of two component vectors, one for vertical direction (
North translation), one for one of the diagonals (
Compute transformation will systematically take into account all the specified values (change of spaces menus, rotation and translation fields) and cumulate the associated transformations. If the user wants to apply a unique transformation at a timo (most of the cases) he will need to leave the other fields to default value to disable the corresponding transformations :
- change of space: keep the same values in menus
Destination complexto not apply any change of space.
- rotation and translation: keep value 0 for respectively no rotation and no translations.
Output transformed stream as a MIDI file: pressing key
s will output at any time the loaded (and possibly transformed) stream in the folder
Examples of transformation
Chromatic inversion. A 180° rotation in any chromatic space will result in a chromatic inversion.
Destination complexto any chromatic space (but they need to be the same !) for example
- set the rotation field to 3 and both translation fields to 0.
- press compute transformation
major <-> minor switch. You first need to choose the tonality in which you want to apply the transformation (this should be the tonality of the piece). In the
origin complexdrop-down lists, select one diatonic complex (the ones whose intervals sum up to 7) and the chosen tonality. For instance
[2,2,3] - [F:M]if the sequence is in F major. You can then specify the same items in
destination complexand apply a translation that will result in a diatonic transposition. In order to choose the values specifying the correct translation vector, the easiest way is to open the visualization of the selected diatonic space and take one pitch-class as a reference. For instance, in the tonality of F Major, the vector that sends pitch-class F to pitch-class D (and the 6 other pitch-classes in the same way) will produces a [F major -> D minor] transformation. Note that the 5 other possible translations will each one specify a transformation in the possible modes (Ionian, Dorian, etc.). Once the sequence is in D:minor, it can be transposed in F:minor with a chromatic transposition (therefore a translation in any chromatic space).
What about audio ?
Putthing audio data as input in HexaChord for pitch-class analysis after a chroma extraction might be possible in the futur but it still belongs to futur works. In the mean time, a possible approach is to input a midi file built from the chord sequence extracted with dedicated tools like Chordino which works well in Sonic Visualiser. The following video has been made in this way.
HexaChord is developed by Louis Bigo and Antoine Spicher.
To cite HexaChord in your work:
Bigo, L., Ghisi, D., Spicher, A., & Andreatta, M. (2015). Representation of musical structures and processes in simplicial chord spaces. Computer Music Journal, 39(3), 9-24.