Ron Bakker/SynthLabHelp
Open SynthLab ↗

Guide

Saving, sharing and export

Nothing you make in SynthLab is sent to a server. Projects live in your browser, in files you save, or inside links.

Saving in the browser

SynthLab saves the project in this browser (IndexedDB) a moment after every change, together with your recordings and imported audio, and opens it again next time. Saved instruments go into a library that all your projects in this browser share. Undo and redo (⌘/Ctrl + Z, ⌘/Ctrl + Shift + Z) go back through your changes. Clearing the browser's site data deletes all of it, so save files of work you want to keep.

Project files

File → Save project file downloads a .synthlab file: the project and every recording and audio file it uses, compressed. File → Open project file brings it back, in any browser.

Every project has a title, an author and a description. Set them under File → Song details or at the top of the Share dialog: they go with the project into share links, project files and the embedded player. SynthLab remembers the author name you last used for your next projects.

Share makes a link that contains the whole project, compressed, after #p= in the address. Whoever opens it gets their own copy to play and change. Recordings and imported audio are not included (they are far too big for a link); the built-in sounds are, because they are generated, not stored. Long projects make long links that some chat apps cut off: then share a project file.

Embedding a player

The Share dialog also gives an <iframe> for other websites: a player with the title, author and description, a timeline of the arrangement, play and seek, and a link to open the piece in SynthLab. Like the share link, the whole project is inside the player's address, and the music is made in the listener's browser by the same engine, so it sounds exactly like the original. Options: dark or light, looping. Here is the "Starship bridge" demo:

The player prefers a rendered copy of the piece, which costs almost no processor time to play and makes seeking exact. A player that is on screen renders the piece in the background a moment after the page loads (players take turns, one render at a time), so the first press of play usually starts from the rendered audio; if play comes first, it starts live and switches over without a gap when the render is ready. Renders are kept in the listener's browser (compressed as Opus when the browser can) and found by a fingerprint of the music, so playing it again, on a later visit or in SynthLab itself, uses no synthesis at all; a song rendered in SynthLab plays from that render in its player too. Changing the title or description does not need a new render; changing the music does. Only one SynthLab plays at a time: starting a player stops any other player or SynthLab tab.

A plain <audio src="…"> tag cannot play a SynthLab link: an audio tag needs a finished audio file, and SynthLab has no server to make one. Use the player, or export an Opus or WAV file and host that.

Exporting audio

Sounds from MathLab

In MathLab, scripts that call sound, soundsc or audiowrite get a player under the figure with an Open in SynthLab button. It hands the sound over inside your browser (it is too big for a link) and opens SynthLab with it in a Sampler, connected to the keyboard. The sound is added to the project's samples, so you can also use it in a Grain cloud or another Sampler.