Write a Blog >>
ICFP 2018
Sun 23 - Sat 29 September 2018 St. Louis, Missouri, United States
Sat 29 Sep 2018 14:45 - 15:10 at Jeffersonian+Knickerbocker - Audio Chair(s): Donya Quick

The Yeamer library is an experimental project for writing powerpoint-like presentations directly in Haskell (similarly to LaTeX’ beamer style). As a by-product of its monadic architecture, which allows not only a sequence of full slides but also interactivity anywhere within a slide, it gives a simple means of exploring even recursive / fractal structures, lazily.

The interactive operation can be used for triggering sounds and thus playing music, i.e. explore the space of harmonically-related notes. Perhaps not that commonly known, this space is actually infinite: a note of frequency ν is harmonically related to notes with frequency r·ν, where r is a small integer ratio. (Small integer ratios are readily picked up by the ear as sounding consonant, because after a couple of cycles the signals will always re-synchronise). This is called just intonation.

In Western music, the ratios used are

  • The octave, r = 2
  • The perfect fifth, r = 32
  • The major third, r = 54

and compounds of them, from which all standard harmony can be constructed.

In practice, Western instruments like guitars or piano don’t actually use these exact ratios, precisely for the reason that (even within the finite range of audible frequencies) infinitely many different notes can be constructed from the three generator ratios. The only instuments that fully support this are fretless strings, trombones etc., which make it the player’s responsibility to fine-intonate the pitch.

Discrete-pitch instruments instead use a mathematical approximation (a temperament, specifically the 12-edo temperament), namely they approximate 32 by 2712 ≈ 1.498 and 54 by 213 ≈ 1.260. As a result, any compound interval then lies on a discrete grid which divides the octave into twelve equally-spaced steps (on a logarithmic scale). The price to pay for this simplification is that harmonies never sound quite as consonant as they would in just intonation. Furthermore, microtonal intervals (e.g. based on factors 74 or 118) are precluded right from the start. Such intervals occur e.g. in Indian music, which achieves them by using fixed, but non-equally spaced steps, which allows for elaborate melodies but not a lot of harmonic movement.

Attempts to combine the features of such Eastern traditions with the symmetries found in Western music without needing continuous-pitch instruments focus mostly on other (usually finer) equally-spaced grid approximations, such as: the 31-edo temperament that was endorsed by Christiaan Huygens and Adriaan Fokker, the α-, β- and γ scales by Wendy Carlos, or the Bohlen-Pierce tuning. All of these either require very many steps and thus rather unwieldy to play instruments, or they sacrifice the support of traditional Western melodies.

These problems don’t arise if the instrument’s UI can unfold the infinite space of just-intonation ratios on demand. This is basically a lazily evaluated ternary tree. A free-monad⊗monoid architecture such as the one used in Yeamer easily allows expressing this, and offers both a very concise programming DSL and a reasonably convenient graphical playing interface. And although it is not as expressive as a purpose-build GUI could be, it still allows much more dynamic response than a simple folding-tree viewer would, because the monad is actually realised as a transformer and can thus be linked with any Haskell IO action, in particular timing information.

This demo will use Yeamer to construct the fundamental intonation ratios, and thus show how many common musical scales arise from very basic mathematics.

Geophysicist, Haskell hacker and musician.

Always in search of ways to bridge the gaps between these disciplines – in particular, bringing nice constructive, well-typed FP techniques to physics.

I’m currently writing a master’s thesis on the magnetic field of Neptune.

Sat 29 Sep
Times are displayed in time zone: (GMT-05:00) Guadalajara, Mexico City, Monterrey change

13:30 - 15:10: FARM 2018 - Audio at Jeffersonian+Knickerbocker
Chair(s): Donya QuickStevens Institute of Technology
farm-2018-papers13:30 - 13:55
Research paper
Mark SantolucitoYale University, USA, Kate RogersYale University, USA, Aedan LombardoYale University, USA, Ruzica PiskacYale University, USA
DOI Pre-print
farm-2018-papers13:55 - 14:20
Sebastien MondetMount Sinai - Hammer Lab
farm-2018-papers14:20 - 14:45
farm-2018-papers14:45 - 15:10
Justus SagemüllerUniversität zu Köln, Institut für Geophysik und Meteorologie