Home Manual Reference Source Test

Welcome

Constraint Composer composes short polyphonic pieces directly in your browser according to foundational rules of classical tonal music: you set some parameters, and a constraint solver handles the rest. The application is part of a master's thesis on algorithmic composition. It is a research prototype that generates short pieces under a constrained rule set; it is not designed to produce full-length works (<em>don't expect a symphony</em>) or imitate any specific composer. The accompanying listening study is open until 19 July 2026; your participation is voluntary and anonymous. Open germede.github.io/master, explore a handful of parameter combinations rather than a single trivial run, then click Send Feedback, fill in the dialog, and submit via the Send via Email button. The submission triggers a MIDI download and opens a pre-filled email; attach the downloaded MIDI manually before sending. Short welcomes in German and Spanish follow; the main manual continues with Overview.

Willkommen

Diese Anwendung und das übrige Manual sind auf Englisch verfasst, da die Benutzeroberfläche durchgängig englische Bezeichnungen verwendet. Constraint Composer komponiert kurze mehrstimmige Stücke direkt im Browser nach Grundregeln klassisch-tonaler Musik: du gibst einige Parameter vor, ein Constraint-Solver erledigt den Rest. Die Anwendung ist Teil einer Master-Arbeit zur algorithmischen Komposition. Sie ist ein Forschungsprototyp, der kurze Stücke nach einem eingeschränkten Regelsatz erzeugt; sie ist nicht dafür ausgelegt, vollständige Werke (<em>erwarte keine Symphonie</em>) oder einen bestimmten Komponisten zu imitieren. Die begleitende Hörstudie läuft bis zum 19. Juli 2026; deine Teilnahme ist freiwillig und anonym. Öffne germede.github.io/master, probiere mehrere Parameter-Kombinationen statt nur eines trivialen Laufs, klicke dann auf Send Feedback, fülle den Dialog aus und sende über den Send via Email-Button ab. Das Absenden löst einen MIDI-Download aus und öffnet eine vorausgefüllte E-Mail; hänge die heruntergeladene MIDI manuell an, bevor du sie absendest.

Bienvenida

Esta aplicación y el resto del manual están en inglés, ya que la interfaz utiliza términos ingleses en todo momento. Constraint Composer compone breves piezas polifónicas directamente en el navegador según reglas fundamentales de la música tonal clásica: tú indicas parámetros y un solver de restricciones se encarga del resto. La aplicación forma parte de una tesis de máster sobre composición algorítmica. Es un prototipo de investigación que genera piezas cortas bajo un conjunto acotado de reglas; no está diseñada para producir obras completas (<em>no esperes una sinfonía</em>) ni imitar a un compositor concreto. El estudio asociado está abierto hasta el 19 de julio de 2026; tu participación es voluntaria y anónima. Abre germede.github.io/master, explora varias combinaciones de parámetros en vez de una sola prueba trivial, luego haz clic en Send Feedback, completa el diálogo y envíalo con el botón Send via Email. El envío inicia la descarga de un archivo MIDI y abre un correo predefinido; adjunta el MIDI descargado manualmente antes de enviar.

Overview

For getting started, open germede.github.io/master in any modern browser. The first visit takes a moment to load; later visits start instantly from cache. Your first piece in 60 seconds:

  1. Wait for the status line to read <em>Ready to compose.</em>
  2. Click Run.
  3. Press Play on the MIDI player and listen.
  4. Change one parameter and click Run again. Good first knobs: increase the length of the piece via Bars and simultaneously sounding Voices, or switch Mode from <em>major</em> to <em>minor</em> for a darker piece.
  5. It's up to you to push the knobs until something catches your ear and click Send Feedback (or Download MIDI for safekeeping).

Layout

The application is made of three vertically stacked sections; the rest of the manual covers them in the same order:

+-------------------------------------------------------------+
|  Constraint Composer                     [Light|Auto|Dark]  |
+-------------------------------------------------------------+
|  Parameters                                [Import|Export]  |
|  - Step 1: Parts (bars, time signature...)               >  |
|  - Step 2: Chords (key, mode...)                         >  |
|  - Step 3: Notes (voices, pitch range...)                >  |
+-------------------------------------------------------------+
|  Solving                                   [Solver v|Run!]  |
|  +-------------------------------------------------------+  |
|  |                   Chord Progression                   |  |
|  |                      Chord Graph                      |  |
|  | Current status                               Log:[>_] |  |
|  +-------------------------------------------------------+  |
|  - Generated Model                                       >  |
|  - Raw Solution                                          >  |
|  - Statistics                                            >  |
+-------------------------------------------------------------+
|  Tracks                      [Download MIDI|Send Feedback]  |
|  +-------------------------------------------------------+  |
|  |                      MIDI Player                      |  |
|  |                      Music Score                      |  |
|  |                     Visualization                     |  |
|  +-------------------------------------------------------+  |
+-------------------------------------------------------------+
|              License | Documentation | Sources              |
+-------------------------------------------------------------+

Parameters

Everything you tell Constraint Composer to do is set here, in the Parameters section. The three steps mirror the way a composer typically thinks about a piece: first the overall shape (Step 1), then the harmony (Step 2), then the individual voices (Step 3). Defaults are tuned so that the very first Run already works; you only need to touch the knobs you care about. Two buttons at the top of the section serialise the entire parameter set to JSON (Export) and load it back (Import). Useful for reproducing a setting later or sharing it with someone else.

Step 1: Parts

Step 1 sets the global Tempo and the form structure: the sequence of named parts that make up your piece (e.g. a simple <em>A-B-A</em>, or a longer <em>A-B-A-C-A</em>). For every part you choose the number of Bars and the time signature. Reusing the same letter (<em>A-B-A</em>) tells the solver to repeat Part A verbatim, useful for refrains; different letters get independent content.

Step 2: Chords

Step 2 generates a chord progression for each part separately, so different parts can have different harmonic colour. For every part you choose for instance:

  • Key and Mode: the tonal centre (e.g. <em>C</em>, <em>D</em>) and mode (<em>major</em>, <em>minor</em>)
  • Style preset: a corpus-derived chord vocabulary (e.g. <em>Bach</em>, <em>Mozart</em>), or <em>manual</em> for the default one
  • Start Chord and End Chord: where the progression begins and resolves

Internally the solver finds the cheapest chord path of the right length through a weighted graph of chord transitions; you do not have to think about the graph: pick a preset and listen.

Step 3: Notes

Step 3 assigns actual pitches to each voice across all bars. The number of Voices defaults to two, with one to four voices supported; each gets its own row, identified by colour and Instrument. For every voice you set for instance:

  • Instrument: General MIDI program (<em>piano</em>, <em>violin</em>, etc.)
  • Pitch range: the lowest and highest notes the voice may use
  • Duration: how many notes per beat (<em>whole</em>, <em>half</em>, <em>quarter</em>, <em>eighth</em>, <em>triplet</em>, or <em>sixteenth</em>)

Beyond per-voice settings, Step 3 exposes a handful of global knobs (Variety, Dissonance, Max Interval, Max Holds/Rests) plus a Counterpoint section for voice-leading constraints; Step 2 has a corresponding Creativity knob for the chord progression. The default already gives a recognisable hierarchy of motion (fast top voice, slow bottom voice); change a voice's Duration to alter the texture (e.g. all voices in quarters for a block-chord texture).

Solving

The Solving card turns your parameters into music. Click Run and watch the chord progression build up on the graph below. The status line below the chord graph shows progress. On completion the status line shows one of:

  • <em>Done: X/X parts solved.</em>
  • <em>Partial: Y/X parts solved. Overconstrained: ... Try again.</em>
  • <em>No solution: Model may be overconstrained.</em>

When the solver gives up

Four things to try when the status reads <em>Partial</em> or <em>No solution</em>:

  • Widen a voice's pitch range in Step 3 to at least an octave and a half, or move Dissonance closer to 0.5 (neutral).
  • Shorten the part in Step 1 or one voice's Duration in Step 3; a 16-bar part with only whole notes forces the solver into a long path.
  • In Step 2, pick Start Chord and End Chord closer together in the chosen Style preset, or add bars in Step 1.
  • Lower Variety in Step 3; the solver randomises its candidate order, and a different seed may find a satisfiable corner the previous run missed.

The chord progression graph

Each part's chord sequence appears as breadcrumbs above the graph (<em>Part A: I -> vi -> IV -> ...</em>) and the corresponding path is highlighted below. Nodes are coloured by harmonic function (tonic green, subdominant blue, dominant red, etc.); thicker edges mark cheaper, more cadential transitions in the chosen Style preset.

Looking under the hood

The dropdown next to Run picks which MiniZinc solver runs the model. <em>Chuffed</em> is the default and fits the typical model sizes here; <em>Gecode</em> and others are available but rarely change the musical result. For the curious, three collapsible sections below the graph expose the inner workings of each pipeline step:

  • Generated Model: the actual MiniZinc model fed to the solver
  • Raw Solution: the solver's JSON output before MIDI generation
  • Solver Statistics: solving time, nodes explored, etc.

A small >_ link in the status panel opens the debug log, which captures every status message of the current session in case you missed it.

Tracks

Tracks is where you hear the result and tell me what you think: play, inspect per voice, download, and submit feedback to the study.

Listening

The MIDI player at the top has play, pause, and seek controls. Press play to hear all voices together; the waterfall visualizer at the bottom scrolls in sync, showing each note's pitch and duration. Between the player and the waterfall, a voices table breaks the result down:

  • One row per voice, labelled with its number, colour, and Instrument
  • One column per part, showing the staff notation for that voice in that part
  • A <em>Chords</em> row at the bottom listing the chord progression of each part

Download

The Download MIDI button saves the multi-track MIDI file to your machine, useful for keeping a copy independent of the submission flow.

Sending feedback

Click Send Feedback (next to Download MIDI) to open the feedback dialog. The form asks for:

  • Occupation
  • Musical experience (1 to 5)
  • Overall impression (1 to 5)
  • Aspect ratings: rhythm, harmony, melody, structure
  • Further questions: could a human have composed this, and would you use it again
  • Comments (optional free text)

The Aspect ratings are tristate checkboxes that cycle between <em>neutral</em>, <em>negative</em>, and <em>positive</em> on each click; the dialog's legend explains the symbols [ ], [-], [v]. The Further questions are normal yes/no questions.

Below the form, a five-item checklist (deadline auto-checked, four to confirm yourself) gates the Send via Email button. Clicking it triggers a MIDI download, opens your mail client with a parameter snapshot pre-filled, and waits for you to attach that MIDI manually before sending; the mailto link cannot attach the file on its own.

The application verifies that its compositions are mathematically valid; only listeners can tell whether they sound convincing. That gap is what the listening study measures. Participation is voluntary, anonymous, and open until 19 July 2026; plan about 5 to 10 minutes for an exploratory session; a single default run is less useful than several varied trials. Full participation conditions sit above the Send via Email button in the dialog.