SoundBox

Contents

Introduction

SoundBox is a tool for composing synthetic music, in your browser. Its design is basically that of a music tracker, which essentially means that the music is organized in tracks and patterns.

Quick start

Perhaps the quickest way to get started is to open one of the demo songs and start playing with it.

Start by pressing the Open button, and select one of the songs. Once it has been opened, press the Play button to start the song.

Note: The entire song has to be generated (i.e. synthesized in software) before it can be played. This can take some time, but on a fast computer it should not take more than ten seconds or so for normal song.

The editor

A song is made up of 8 channels, where each channel has its own instrument. Each channel has 36 note patterns (0-9,A-Z), and each note pattern has 4 note tracks and 1 FX track.

Overview

1. Import/Export & Playback

In this section you can import (open) and export (save) songs. Here you can also play the song (or just a section of the song).

2. Sequencer

Each column in the sequencer represents one channel. Selecting a column will show the instrument settings for the selected channel in the instrument editor (4).

For each channel, there are 36 available note patterns. By typing a number (0-9) or a letter (A-Z) in a sequencer cell (or by using the +1/-1 buttons below the sequencer), the corresponding note pattern will be visible and editable in the pattern editor (3). Holding shift while typing the character will also advance the cursor to the next row. The cells can be navigated using the arrow keys. Holding control down while navigating the table moves to the very end (e.g. the top-most cell when pressing arrow up).

It is possible to select a range in the sequencer (by click+dragging), and then copy the selected range with the Copy button, and the copied range can then be pasted to any other position with the Paste button. A range can also be selected by holding shift down and navigating the table with arrows. Alt-shift and arrows adjust the second corner of the selection range.

Hitting enter with a range selected fills the empty space in that range by looping or interpolating the values at the top of the range. For example:

3. Pattern editor

The pattern editor consists of four columns, which enables four notes to be played simultaneously. There is also an effect track (FX track), that can be used to dynamically control all aspects of an instrument during playback.

The note editor

To enter notes in the pattern editor, a valid pattern (0-9,A-Z) must have been selected in the sequencer. Notes are entered with the piano (5), the keyboard or a MIDI input device (see below).

Just as with the sequencer, it is possible to select a range and copy and paste note data with the Copy & Paste buttons. It is also possible to transpose a selected range of notes with the +1, -1, +12 and -12 buttons.

Hitting enter with a range selected fills the empty space in that range by looping the notes in the top part of that range.

The FX editor

To enter commands in the FX editor, select a row in the FX track, and modify one of the instrument parameters. The corresponding command + value will be entered into the selected row.

You can copy and paste FX commands with the Copy & Paste buttons.

Please note that FX commands are persistent, so if a command for a specific instrument parameter is issued in one pattern, it will remain active until set to something else (either in the same or another pattern).

Hitting enter with a range selected interpolates between the effect parameters. The range has to be empty and the command in the beginning and in the end of the same type.

4. Instrument editor

An instrument is synthetically generated using a few simple building blocks, according to the chart below:

Overview

Each part of the instrument chain is controlled by the instrument settings, and with careful tuning you can produce many different kinds of sounds.

An easy way to get started with an instrument is to select one of the presets from the drop-down box, and then change some settings until you get the sound you are looking for.

5. Piano

The piano is used for entering notes into the selected note pattern. Pressing keys on the piano will produce notes in the pattern.

A more efficient way to enter notes is to use the computer keyboard (if you have one). The mapping of keyboard keys to piano keys are as follows:

Keyboard layout

Both the piano and the keyboard only covers two octaves. To reach more octaves, use the Octave down and Octave up keys next to the piano to change the base octave for the piano/keyboard.

Using a MIDI device

It is also possible to use a MIDI input device to enter notes. You can select which input device to use in a drop down box above the instrument editor (if no MIDI device is available, no drop down box will be shown).

Note: In order for MIDI input to work, you currently have to install the Jazz-Soft Jazz-Plugin, which at the time of writing works for Windows and Mac (a Linux version is on the way).

Playing music

A tip: Playing the entire song over and over when editing music can be quite tiresome. Use the Play range button to just play the selected range (e.g. a single pattern). You can also use the keyboard short-cut: space.

Loading and saving

Songs can be saved as data URLs or as binary files.

You can deal with the data URLs in pretty much any way you want. For instance, you can mail the song to a friend, bookmark it in your browser, put it through an URL shortener and tweet it, or you can copy & paste it to a local text file if you wish to save it for later.

Note: The entire song is stored in the URL. Nothing is stored in a file or on a server.

The binary files, that are saved if you press the "Save binary" button in the Save dialog, can later be loaded by drag'n'dropping them onto the editor.

Importing Sonant songs

It is also possible to import binary song files that have been exported from the Sonant or Sonant Live sound editors. Simply drag'n'drop a file from your computer onto the editor to load it.

Note: Sonant songs are converted to the SoundBox format, which means that some subtle differences from the original may be noticeable.

Using songs in your own products

The real use case for SoundBox is to produce music that you can use in your own products. To do so, export your song as a JavaScript data chunk using the "Export song as JavaScript" button.

The player routine to use in your JavaScript product is: player-small.js.

For examples of how to use the player routine, see: demo.html or arpeggio-demo.html.

Licenses

SoundBox is an open source product. You can find the latest source code at GitHub / SoundBox.

The SoundBox tool

SoundBox (including the GUI, the instrument presets and demo songs), is released under the GNU General Public License v3.

The player routine

The stand-alone player routine (player-small.js) is released under the zlib/libpng license, making it easy to use and adapt the player routine for your own products (e.g. demos). You'll find that the "Export JS" function comes in handy if you want to use a song in your own product.

Third party code

Blob.js

https://github.com/eligrey/Blob.js/

Copyright © 2011 Eli Grey.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FileSaver.js

https://github.com/eligrey/FileSaver.js/

Copyright © 2011 Eli Grey.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

js-deflate

https://github.com/dankogai/js-deflate

/* $Id: rawdeflate.js,v 0.3 2009/03/01 19:05:05 dankogai Exp dankogai $
*
* Original:
* http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt
*/

/* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
* Version: 1.0.1
* LastModified: Dec 25 1999
*/

WebMIDIAPIShim

https://github.com/cwilso/WebMIDIAPIShim

Copyright 2013 Chris Wilson

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Credits

Many thanks to Jake Taylor (a.k.a Ferris / Youth Uprising) for the original C language synth that was the starting point and inspiration for this tool.