Skip to content

Presets Reference

Complete reference for all configurable presets in MIDI Sketch Bach.

Forms Reference

All 9 Forms

IDNameStringCategoryDefault InstrumentDefault BPMDefault Voices
0Fugue"fugue"OrganOrgan854
1Prelude and Fugue"prelude-and-fugue"OrganOrgan904
2Trio Sonata"trio-sonata"OrganOrgan903
3Chorale Prelude"chorale-prelude"OrganOrgan724
4Toccata and Fugue"toccata-and-fugue"OrganOrgan1004
5Passacaglia"passacaglia"OrganOrgan764
6Fantasia and Fugue"fantasia-and-fugue"OrganOrgan884
7Cello Prelude"cello-prelude"SoloCello803
8Chaconne"chaconne"SoloViolin763

Form Selection Flowchart

Organ System (Forms 0--6)

The seven organ forms cover the major genres of Bach's organ repertoire. All default to organ registration and typically use 3--4 voices. These forms feature the most sophisticated counterpoint, as the organ's sustained tones make every voice-leading detail audible.

Solo Instrument System (Forms 7--8)

The two solo forms generate music for unaccompanied string instruments. They use implied polyphony — a single melodic line that suggests multiple simultaneous voices through register shifts, arpeggiation, and chordal writing.

BWV References by Form
FormNotable Bach Works
FugueBWV 578 (G minor "Little" Fugue), BWV 542/2
Prelude and FugueBWV 532, 541, 548, 846--893 (Well-Tempered Clavier)
Trio SonataBWV 525--530 (Six Trio Sonatas)
Chorale PreludeBWV 599--644 (Orgelbüchlein), BWV 651--668
Toccata and FugueBWV 565 (D minor), BWV 540
PassacagliaBWV 582 (C minor)
Fantasia and FugueBWV 537, 542, 561
Cello PreludeBWV 1007--1012 (Cello Suites)
ChaconneBWV 1004/5 (Partita No. 2 in D minor)

Instruments Reference

IDNameStringGM ProgramSoundTypical Forms
0Organ"organ"19Church OrganAll organ forms (0--6)
1Harpsichord"harpsichord"6HarpsichordAny form
2Piano"piano"0Acoustic Grand PianoAny form
3Violin"violin"40ViolinChaconne (8)
4Cello"cello"42CelloCello Prelude (7)
5Guitar"guitar"24Nylon GuitarSolo forms (7--8)

TIP

While each form has a default instrument, you can override it with any instrument. For example, a fugue played on harpsichord has a distinctly different character than on organ — the harpsichord's crisp attack makes counterpoint lines more distinct.

Subject Characters

IDNameStringEffect
0Balanced"balanced"Mix of steps and leaps, moderate rhythm
1Lyrical"lyrical"Predominantly stepwise, smooth contour
2Energetic"energetic"Wider intervals, rhythmic variety
3Dramatic"dramatic"Bold leaps, dotted rhythms, chromatic elements

INFO

The character parameter affects the melodic profile of the fugue subject or primary thematic material. It has the most noticeable effect on fugal forms (Fugue, Prelude and Fugue, Toccata and Fugue, Fantasia and Fugue), where the subject defines the character of the entire piece.

Scale Modes

IDNameStringApproximate Effect
0Short"short"Compact — fewer variations/episodes
1Medium"medium"Standard length (default)
2Long"long"Extended — more development
3Full"full"Maximum — full formal structure

TIP

The actual output length depends on the form. A "short" passacaglia will still be longer than a "short" fugue because the passacaglia form requires a minimum number of variations to be musically coherent. Use targetBars for precise length control.

Key Reference

IDNamePitch ClassCommon Baroque Associations
0CCPurity, simplicity, clarity
1C# / DbC#Devotion, depth
2DDTriumph, brilliance (D major); passion, drama (D minor)
3D# / EbEbHeroic grandeur, nobility
4EEJoy, brightness (E major); lament (E minor)
5FFPastoral, calm
6F# / GbF#Intensity, brilliance
7GGGrace, simplicity (G major); seriousness (G minor)
8G# / AbAbSolemn, devotional
9AATenderness, elegance (A major); gentle melancholy (A minor)
10A# / BbBbNobility, warmth
11BBHard brilliance (B major); somber weight (B minor)

Key Associations in Baroque Music

Baroque composers associated specific keys with emotional qualities (Affektenlehre). D minor was the key of passion and drama (BWV 565 Toccata and Fugue), while C major represented purity (BWV 846 Prelude). These associations are subjective and vary by era, but they influenced Bach's choice of key for his compositions.

All keys work with both isMinor: false (major) and isMinor: true (minor).

Default Mapping

Cross-reference of form defaults:

FormInstrumentVoicesBPMKey
FugueOrgan (0)485Any
Prelude and FugueOrgan (0)490Any
Trio SonataOrgan (0)390Any
Chorale PreludeOrgan (0)472Any
Toccata and FugueOrgan (0)4100Any
PassacagliaOrgan (0)476Any
Fantasia and FugueOrgan (0)488Any
Cello PreludeCello (4)380Any
ChaconneViolin (3)376Any

Programmatic Access

Use the preset enumeration functions to access these values at runtime:

js
import {
  getForms,
  getInstruments,
  getCharacters,
  getKeys,
  getScales,
  getVersion
} from '@libraz/midi-sketch-bach'

// List all forms
const forms = getForms()
for (const form of forms) {
  console.log(`${form.index}: ${form.name}`)
}
// 0: Fugue
// 1: Prelude and Fugue
// 2: Trio Sonata
// 3: Chorale Prelude
// 4: Toccata and Fugue
// 5: Passacaglia
// 6: Fantasia and Fugue
// 7: Cello Prelude
// 8: Chaconne

// List all instruments
const instruments = getInstruments()
// [{ index: 0, name: "Organ" }, ...]

// List all keys
const keys = getKeys()
// [{ index: 0, name: "C" }, { index: 1, name: "C#" }, ...]

TIP

These functions are useful for building UI components like dropdowns or form selectors. The demo on this site uses them to populate the form selection interface.

Released under the Apache-2.0 License.