overdub
FirmwareM-VAVE FM-1

FM2000

jukejutsu/FM2000 · ★ 0

Music 2000 on FM1

Fork of Dinghy

Built on Felucca

README from GitHub, GPL-3.0

FM2K

A song maker for the M-VAVE FM-1, after Music 2000 on the PlayStation. Write short riffs, place them on a timeline of bars, build a whole track on the device: arrangement first, the way a DAW works, not a pattern looper.

🚧 Work in progress. FM2K is an early prototype. It runs in the browser simulator and on a computer; it has not been built or tried on an FM-1 yet. Things change daily, saved songs are not kept yet, and there is no release. Do not install it on your FM-1 for now.

The idea

Most FM-1 firmwares are grooveboxes: patterns, loops, live play. FM2K is for writing a song from start to end.

  • Four tracks: three synth tracks, each with its own sound engine, and a drum track.
  • Riffs: each track has a pool of up to 32 riffs, 1 to 64 steps long (a 1/16 step, up to 4 bars), with chords and note lengths: a small piano roll each, not a step pattern.
  • Arrangement: the song is a timeline of up to 128 bars. Put a riff on a bar and it plays through its length, until the next riff on that track starts.
  • One screen, the whole song: time runs left to right, the four tracks one under the other, every riff a solid block on a faint grid, its notes drawn in it as a DAW shows a clip; the riff under the cursor lit violet.

What works now

  • The song model: tracks, riffs, notes, the arrangement, packing a song for the flash (tested: tests/test_song.c)
  • The ARR (arrangement) screen: cursor, scrolling, zoom, moving riffs along the timeline, the playhead
  • New riffs (SEQ on an empty bar), deleting riffs (SEQ on a riff), the RIF piano roll (EDIT on a riff) to write and edit a riff's notes
  • Playback from the cursor, as in Music 2000: the playhead crosses the first bar of the page, then the page slides on a bar and the playhead starts again from the left (ARR and RIF); a loop of 1 to 32 bars, a metronome
  • Repeating a riff: a riff and its repeats drawn as one block, a line where each repeat begins
  • A simple synth: one engine (BASIC, 7 presets) for tracks 1-3, three drum kits for track 4
  • Projects: 8 slots and an autosave in the flash, save / save as / load / new / clear, back where you were at power-on
  • A test song to play with
  • The simulator: the firmware's own C code compiled to WebAssembly, on a drawn FM-1 panel

Planned

  • Placing riffs on the timeline from the riff pool (it moves to its own control)
  • RIF: copy / paste, recording from the keys; more riff and note settings on EDT
  • Recording riffs from the keys, quantised
  • Real sound engines for tracks 1-3 (from the Felucca family) and better drum kits
  • MIX, SND (sound editing), SNG (song settings) screens
  • A build for the FM-1 and the first tests on the device

Controls (ARR screen)

ControlDoesIn the simulator
ALGORITHMthe track↑ ↓
SELECTthe bar← →
PRESETSthe track's sound, or the drum kit on track 4Shift ↑ ↓
KNOB 1grab the riff under the cursor a bar left / right; it trades places with a neighbour it runs into, both kept wholeShift ← →
KNOB 2repeats of the riff under the cursor: clockwise one more right after it (if it fits), anticlockwise one lessP, Shift P
KNOB 3the loop: clockwise on (4 bars from the cursor) and longer, anticlockwise shorter down to offG, A
KNOB 4zoom 2x / 1x / 0.5x / 0.25x (4 to 32 bars): anticlockwise out, clockwise in from the cursorK, Shift K
PLAYplay from the cursor / stopSpace
GLOthe metronome (for now)6
SAVEtap: the PRJ screen (projects); hold 2 s: save8
SEQon an empty bar: a new riff (16 steps); on a riff: delete it0
EDITon a riff: RIF, its piano roll5
keysplay the track's sound; OCT− OCT+ the octaveZ…/ and Q…O rows, [ ]

A riff (RIF screen)

EDIT on a riff opens its piano roll; HOME goes back. Time across, pitch up the screen beside a piano keyboard (the keys light up as you play them); on the drum track the rows are named by their drums.

ControlDoesIn the simulator
SELECT / ALGORITHMthe cursor: the step / the note← → / ↑ ↓
OCT+a note in at the cursor (1 step); on a note: the note out]
OCT−undo: the riff's last change (16 deep); recording, all you played on the last time round[
KNOB 1grab the note and move it along the stepsShift ← →
KNOB 2move the note up / downP, Shift P
KNOB 3the note's lengthA, G
KNOB 4zoom: 8 / 16 / 32 / 64 steps in viewK, Shift K
RECrecord (see below); again: rehearsal, again: record=
PLAYstop recordingSpace

Recording: REC on RIF plays the riff alone, round and round from its start, and the keys (or MIDI on the riff's channel) write onto it as you play. A note goes to the nearest place on the riff's quantise grid (EDT), its length is how long the key is held. Each time round new notes go on over the old ones: the same note at the same place is replaced. REC again is rehearsal: the riff keeps looping, the keys play but write nothing, and REC blinks; REC once more goes back to recording. PLAY or another screen stops it. (A count-in of 1 or 2 bars comes with the metronome's settings.)

A riff's settings (EDT screen)

EDIT on RIF opens the riff's settings; EDIT goes back to the roll, HOME to ARR. SELECT picks the tab, ALGORITHM the row, KNOB 1 changes the value.

TabSettingValues
RIFFLENGTH1 to 64 steps (notes past a shorter end go, notes running past it are cut)
RIFFQUANTIZEthe recording grid: 1/2, 1/4, 1/4T, 1/8, 1/8T, 1/16, 1/16T, 1/32 (T: triplets)
NOTE (with a note at the cursor)VELOCITY1 to 127, sounded as it changes

On ARR a riff that does not fill its last bar (12 steps, 24 steps) is drawn as long as it is: the rest of the bar stays empty, and its repeats start on the next bar.

Projects (PRJ screen)

SAVE opens PRJ; HOME goes back. Eight slots and an autosave (AUTO, written by itself when the music is stopped and nothing has been touched for 10 s). At power-on the newest save comes back.

ControlDoes
ALGORITHMthe slot
OCT+load the slot, or a new project in an empty slot; yes to a question
OCT−clear the slot (it asks first); no to a question
SAVE held 2 ssave: on PRJ into the chosen slot (save as, asks before overwriting), elsewhere into the project's own slot; not while playing

Loading or starting a new project with unsaved changes asks first. In the simulator the projects are kept in the browser.

Try it

The simulator runs the same code the FM-1 will run.

sh web/serve.sh          # then open http://localhost:8000 and press "Switch on"

After changing the code, rebuild it with sh web/build.sh (needs clang with the wasm32 target and lld; on macOS brew install llvm lld). tests/run_tests.sh runs the model's tests, the host build and the simulator headless.

Inside

firmware/src/song.h       the song model: tracks, riffs, notes, the arrangement, pack / unpack
firmware/src/fm2k.c     the app: the ARR screen, the sequencer, the synth
firmware/src/platform.c   the FM-1 platform (boot, USB, updates, audio, panel, screen, settings), from Dinghy
web/                      the simulator's sources: the browser platform, the page, the audio worklet
sim/                      the simulator, built
tests/                    the model's tests and the host run
tools/                    the build, the installer, the font generator

The song model in short: cell[bar][track] starts a riff (1..32) or is empty; a riff plays on through its length unless the next one starts first. Every note of every riff lives in one shared pool of 4096 notes. A song packs to a few KB with a CRC.

The chip has no FPU: everything is integer arithmetic (see docs/RULES.md, and docs/API.md for the platform).

Credits

  • Dinghy by zvenson: the starting point, the minimal FM-1 firmware this is built on
  • Felucca by Leo Kuroshita (Hügelton Instruments): the FM-1 platform, and the browser simulator's design; SLOOP by isod89: the platform as it carries it
  • X0X by charlesvestal: the first browser build of the family
  • Unbounded (The Unbounded Project Authors, SIL OFL 1.1): the UI font
  • Music 2000 (Jester Interactive / Codemasters, 1999) for the idea. FM2K uses none of its code, graphics or sounds.

License

GPL-3.0-only, as Felucca, SLOOP and Dinghy. Details and third-party parts in LICENSING.md.

M-VAVE and FM-1 are trademarks of their respective owners. FM2K is not affiliated with or endorsed by them.