Polymeter is a free, open source MIDI sequencer for music that's in multiple prime meters (1, 2, 3, 5, 7, 11, etc.) simultaneously. Each track has its own loop length, and when the lengths differ, the tracks "slip" (or shift phase) relative to each other. I post development notes about it here.
Thursday, January 25, 2024
The latest version of Polymeter adds a long-overdue feature: the Modulations bar now optionally shows targets as well as sources. This can be very useful for complex modulation networks. Until now, the only way to see the modulation targets of a track was via the Graph bar, with the graph’s Scope set to Targets or Bidirectional. The Graph bar requires installing Graphviz, so users who didn’t do that had no way of viewing modulation targets at all. But even if they did have Graphviz installed, the Modulations bar is easier to use, and it’s also the obvious place to look for this information.
To use this new feature, select Show Targets in the Modulation bar’s context menu. This command toggles the visibility of the Targets pane, in other words it shows the pane if it’s hidden, or hides it if it’s showing. When the Targets pane is shown, the Modulations bar is split into two panes, separated by a draggable splitter. The window is split horizontally by default, but if you prefer a vertical split, right-click the splitter to show its context menu, and select Vertical.
You might wonder why this feature wasn’t added sooner. It’s actually a challenge to implement, because the application’s architecture has a fundamental asymmetry between modulation sources and targets. Basically the issue is that modulations are singly- rather than doubly-linked. Each track keeps a list of the tracks that modulate it, i.e. its sources, but a track does NOT keep a list of tracks that it modulates. It could, but it doesn’t, and that’s because the sequencer engine—the part of the app that actually sequences MIDI, as opposed to mere user interface code—doesn’t care about modulation targets.
When the sequencer processes a track, it asks the question: “do any other tracks modulate this track?” In other words, it looks at the track’s modulation sources, also known as modulators. The sequencer never asks the question: “what tracks does this track modulate?” The sequencer’s top-level loop completely ignores modulator tracks, because they don’t output MIDI events, by definition. Modulator tracks are only accessed while processing a non-modulator track. More formally, the sequencer iterates modulation sources, but never iterates modulation “sinks”, and this is the reason for the architectural asymmetry.
The primary constraint on the design of the Polymeter application is optimizing the sequencer to maximize speed and throughput. Doubly-linked modulations would not help the sequencer at all. A few aspects of the user interface might benefit from doubly-linked modulations, but this is outweighed by much more complicated code, and the risk of many new bugs, particularly in the area of undoing edits.
So how do we answer the question, “what tracks does this track modulate”? We need that information in order to show the modulations graph, and we also need it to show targets in the Modulations bar. It’s done by creating a special type of lookup table called a cross-reference. To build the cross-reference, we iterate all of the tracks, and for each track, iterate its modulators, if any. While doing that, we put the modulators in “buckets” that correspond to target tracks. That might sound slow, but it’s the kind of thing computers are good at. Also, that process has been greatly optimized in this version, by storing the cross-reference in a “flat” one-dimensional array. Previous versions stored the cross-reference in an array of dynamic arrays, but this incurs significant performance costs, due to the potentially large number of arrays that must be reallocated and copied as they grow.
Stress testing was done to verify that the new modulation targets cross-reference consistently improves performance (it does). The second image in this post shows the stress test in the Graph bar, rendered by Graphviz, which after many years of faithful service continues to be one of my favorite open-source software projects ever.
Thursday, December 14, 2023
Chris Korda scores available
Scores are now FREELY available for many of my compositions! Please read the foreword. The scores were created using LilyPond, with a homegrown software to convert the MIDI files to Lily format.
Admirers of my classical music occasionally ask me for scores, and until now I've been hard-pressed for a solution. The proprietary vendors—Finale, Sibelius, Dorico—not only have big learning curves, they're also painfully expensive and likely to colonize my hard drive. I tried MuseScore, but found it lacking, and its more recent versions behave suspiciously like malware. So instead I opted for the hard road: LilyPond. The issue with LilyPond is that its MIDI import is so flawed that I deemed it necessary to write my own software to convert from MIDI file format to LilyPond format. This DIY approach probably would have been necessary anyway, due to the unique challenges that complex polymeter creates for musical notation.
Essentially LilyPond offloads much of the scoring process onto the user, so that it can focus primarily on engraving, which it does very well. For example, the user is responsible for ties, dots, tuplets, and so forth, and it took me several days to get all that sorted. In the process it became clear that certain aspects of my music defy notation. I will endeavor to explain these aspects, in the hope that the information is useful or at least entertaining.
The biggest problem is that my compositions often contain long arpeggios in which the notes overlap. I do this in order to maintain a consistent harmonic density. In other words, by extending note durations, I ensure that there are always the same number of notes sounding at once, typically four notes. In effect, the arpeggio produces a varying tetrachord, the pitches of which are constantly changing as new notes are added and older notes are removed.
This is a very different effect from merely pressing the sustain pedal. I rarely use the sustain pedal, because doing so juxtaposes too many notes at once, which is particularly problematic in atonal compositions due the potential for excessive dissonance. Also, in the virtual piano I use, the sustain pedal emulates opening the damper, producing complex and unpredictable acoustic effects, whereas merely increasing note durations so that notes overlap has a comparatively simple and predictable effect.
Arpeggios with overlapping notes are not only difficult to play, they’re also very difficult to score, because the score will be so full of ties that it’s nearly impossible to read. My impression is that the notation system doesn't handle this case very well. In any case, I decided to sacrifice verisimilitude in favor of readability, by eliminating all overlaps within each part, so that each part becomes a single-line melody. As is customary, I also removed all offset and swing from the composition prior to conversion. The biggest remaining challenge was detecting and correctly handling tuplets. It sounds easier than it is.
LilyPond includes two life-saving features. It has a bar check, which validates your LilyPond file to ensure that each bar's worth of notes, ties, tuplets, dots etc. actually add up to a bar. And, it can output a MIDI file that matches the engraved score. I built custom tools to compare the LilyPond MIDI file to my original MIDI file, and thus obtained "round-trip" verification that my compositions passed through the whole process undamaged. Whether the scores are to everyone's taste is another question, but at least they're "correct".
Sunday, December 3, 2023
Pitch class histograms
Behold pitch class histograms for my post-2018 music HERE.
I undertook to analyze the pitch class content of my compositions, and in doing so, to clarify which of them are the most *atonal*, in the sense of using all of the twelve pitch classes approximately equally. The term "pitch class" is from musical set theory, and basically refers to one of the twelve pitches of the equal-tempered chromatic scale, disregarding octaves; for example, the pitch class C consists of the Cs in all octaves.
My method of choice was the pitch class histogram, specifically its "folded fifths" variant which orders the histogram bins according to the cycle of fifths. This ordering "is useful for measuring dominant-tonic relationships and for looking at types of transpositions" according to the documentation for a popular music analysis library called jSymbolic. A modal composition--one that confines itself to a single key--will occupy seven consecutive bins of the folded fifths histogram, making it easy to identify.
A perfectly atonal composition would produce a histogram in which all twelve bars have exactly the same height. This would indicate that the composition's notes are distributed equally among the twelve pitch set classes, or put another way, that each pitch class comprises one twelfth (8.33%) of the composition's notes. This situation is unlikely in practice, but the more closely a composition resembles this idealized case, the more atonal it is.
I had long suspected that "Atunwi" and "Ero Ayo" are my most atonal compositions, and the histograms confirm this. But there were surprises too, for example the "Apologize to the Future" album is more atonal than I realized, particularly the tracks "Overshoot" and "Singularity." The chronological ordering of the albums reveals my gradual cultivation of atonality, starting with "Fazo Kanto" on "Akojo Ajeji."
I looked into using jSymbolic, but decided to roll my own code, in part because I was reluctant to risk installing the Java framework, but also because the primary goal was learning. The chart drawing was done via the Plotly Javascript library, which is free and open source and heartily recommended.
Thursday, April 27, 2023
Odd time and polymeter influences
Friday, March 31, 2023
PotterDraw synesthesia: LCM
This video visualizes polymeter music using an object that periodically changes shape in multiple ways at once. The music features six percussion instruments, each in a different time signature, with each instrument mapped to a different type of shape modulation. The mappings in order of appearance are: Bass Drum in 2/4 to Radius, Clave in 3/4 to Scallop Depth, Conga in 7/4 to Bend Depth, Snare in 11/4 to Helix Amplitude, Closed Hat in 5/4 to Twist, and Clap in 6/4 to Polygon Roundness. The music is an excerpt of "LCM" from my "More Than Four" album, available on Chapelle XIV. The shape morphing was done in PotterDraw, a software I created for designing virtual pottery and hyperobjects. The object's color is proportional to its radius. I have previously visualized polymeter using phase diagrams in which the different loop lengths are mapped to orbiting planets, but shape-morphing is closer to how I imagine dancing in polymeter would look. PotterDraw is limited to cylindical solids, so I expect better results could be obtained using a general-purpose 3D animation software. I had to hack at PotterDraw a bit to make it read the Polymeter track data, and one useful thing I learned is that Polymeter PLM files are very easy to work with, because they're text in INI format. This is good news for anyone seeking to replicate my results.
Wednesday, March 22, 2023
Method Ringing changed my life!
In the 21st century, method ringing isn’t just for bells anymore. By virtualizing the bells, we avoid tempo limits that physical bells would otherwise impose, and more importantly, we’re no longer obliged to use a fixed palette of notes. “Ring in the Odd” uses the seven tones of the harmonic minor scale, with method ringing determining the order in which they're played. However the range of scale tones used is periodically varied by transposing notes up or down an octave. Specifically the notes are clamped to a movable one-octave range, the position of which is controlled by a set of polymeter loops (in 5 and 70). This is accomplished using a feature of the Polymeter MIDI Sequencer called Range Modulation.
The ringing method used here is an ancient one named Plain Bob, and it yields 84 permutations before returning to rounds. A full extent for seven bells would entail 5040 permutations (seven factorial), but the shorter course provides an identifiable repeating structure, around which the modal and bass changes are organized. Method ringing produces stimulating reversals of melodic direction, similar to turnarounds in jazz. The subtleties of the turnarounds become increasingly apparent during the dramatic ritardando towards the end of this composition.
"Ring in the Odd" is from my album “Indirect Methods,” which was released on Kevorkian Records in December 2022. The visual was generated using a visualizer called Piano VFX.
Here are the courses of Plain Bob for seven bells.
And the album “Indirect Methods” is HERE.
And here is Piano VFX.
Sunday, March 19, 2023
Polymeter instructional video: Forgive Yourself
For years it's been on my "to do" list to make instructional videos for the Polymeter MIDI Sequencer, and after some prodding from Yoyaku, I finally made one. This video shows me setting up a bass line, using note modulation and position modulation. It's short, so there are countless things it doesn't cover, but it's a start. The track in question is "Forgive Yourself" which I made in collaboration with André Baum. I will try to find time to make more videos, and better demo files too. Meanwhile there's a slide show that may be helpful, the sequencer is HERE, and the track is HERE.
Correct offset modulation for non-modulator tracks
In previous versions offset modulation was signed for modulators and unsigned for non-modulators, because the latter case was implemented v...
-
Which heptatonic scales consist entirely of semitones, whole tones, and a single minor third, without having two semitones in a row? The he...
-
Behold pitch class histograms for my post-2018 music HERE . I undertook to analyze the pitch class content of my compositions, and in doing...
-
Polymeter 0.0.09 adds a live performance view, along with the ability to group tracks into parts, in order to simplify the interface. With ...
