web synth docs

midi-editor

The MIDI Editor allows the editing of MIDI data visually to create music. It is the primary way that songs are written using web synth.

A screenshot of the MIDI editor showing some drawn notes, the toolbar, and the piano keyboard labeling notes

The MIDI editor also has support for sequencing multiple tracks within the same MIDI editor instance. For example, you can compose the MIDI for both a lead synth along with other instruments like a bass, drums, etc. all from the same window. This makes it much easier to form a cohesive composition since the context from other tracks is visible.

Other tracks can be collapsed and expanded to free up space in the UI for the track being worked on currently.

Screenshot of the MIDI editor showing its multi-track support with some tracks collapsed, showing only a small minimap-like view of their notes

To add a new MIDI track, click the "AE" button at the top of the MIDI editor.

cv outputs

In addition to MIDI, the MIDI editor also supports sequencing continuous output values to do things like modulate parameters such as filter cutoffs in sync with the rest of the composition. This is often referred to as control voltage or "CV" in the modular synth world.

The CV outputs work in the same way as the [envelope-generator]s used in other parts of the application.

To add a new CV output to a MIDI editor, click the "AO" button in the top control bar. This will add a new output on the MIDI editor node in the [graph-editor] which can be connected to other nodes.

audio thread midi scheduling

In order to make the playback of sequenced notes in the MIDI editor as accurate and well-timed as possible, the actual scheduling of MIDI events takes place on the audio thread.

This is only relevant to the development of web synth itself, but for technical details on this you can check out the [audio-thread-midi-scheduling] page.

midi-editor