musicpad help

back to musicpad

OK, if you're REALLY completely lost with the blurb hereunder, you can give a try to the TUTORIAL.

instructions

musicpad is an online musical notepad which lets you code your musical inspiration in a simple way and generate midi files. Lots of features are already implemented (macros, polyrythms) and lots of others will be added (randomization, midi controllers, sweeps, saves,...)

The core of musicpad is a cgi perl script. You can fetch the sourcecode and play around with it.

musicpad is not case sensitive, except for dEbUg, and macros. Don't put whitespace inside commands, but use as many whitespaces and new lines as wished between them.

Notes

A#5/8 : play A# at octave 5 for 1/8
notes are : A to G.
P for Pause (see also - below)
O doesn't play any note, and is used for defining note, octave and/or duration. For example a oA5/16 defines a A5/16 as the default note but doesn't play it. A x would then play that note. Other valid syntax: n5 defines octave 5, o/16 defines duration 1/16, o5/16 defines octave 5 and duration 1/16, oA+/16 defines note A+ and duration 1/16, etc...
A+ or A# means A sharp
A- or Ab means A flat
If you don't include all characteristic for the note, the missing characteristics will be the same as previous note. Example:
  • A/4 : play A at same octave as previous note for 1/4
  • A4 : play A at octave 4 for same duration as previous note
  • C : play C at same octave and for same duration as previous note

8 : A number alone means different things depending on mode:

  • in normal mode: same note as previous note for duration 1/8
  • in guitar mode (guiton), a note 8 half-tones above previous "normal" note (a bit like a relative n+x note, except that it's only temporary and the note after this one will not be based on 8 half-tones above)
  • in toms mode (tomson), the number indicate the Tom number to be played (from 1-highest to 6-lowest) for the same duration as previous note.
X : play same as previous note
- : pause of same duration as previous note (or pause)
= : the previous note is held for its initial duration (can be used multiple times: x== holds it 3 times longer, x=== 4 times, etc...)
X, - and = can be used for defining rythm patterns. No whitespace is needed between those
Nxx : play absolute midi note xx (e.g. C5 = 60)
N+x or n-x : play new note with +x or -x half-tones relatively to previous note played.
Nt+x or nt-x : play new note with +x or -x half-tones relatively to previous note played, but doesn't change the reference note.
/ : octave +1
\ : octave -1
'X or 'A ... : stress note (no space)
,X or ,A ... : soft note (no space)
Ra/b : next notes duration should be multiplied by a/b (allows playing triplets with 4/3 or 2/3 etc. Also used for polyrythms)
R1 : back to normal duration
[...]: chord. 4 different chord syntaxes are available:
  • [-5,0,3,7,...] : notes definition in half-tones, relative to actual note.
  • [G:-,0,2,2,2,1] : guitar chord, relative to guitar tuning ('-' for not-played string)
  • [Amin] or [min] : standard keyboard chord. Chords have variations, usually :1 and :2, in some cases up to :5 - try min:1 , min:2.
  • [G:Amaj] : standard guitar chord. Guitar Chords also have varations indicated with ':' . Note that guitar chord base note is to be written only with 'A-G' and 'b' for flat (don't use sharp '#','+' or flat '-') (hey, don't complain, you still have 900+ guitar chords to choose from !!!)

you should take a look at the chords list.

Commands


...*x or ( )*x : repeat x times
m$xx(...) : define macro $xx (NB: m$ lowercase only)
mrnd$xx(...) : define random macro $xx; inside the macro, list all possible macros. Everytime you process the song, one macro will be randomly chosen from the list to remplace the random macro. (NB: mrnd$ lowercase only)
$xx : play macro $xx
ixx : use instrument xx - see GM instruments list below
iBD, iSD, ... Use Bass Drum, Snare Drum,... (defines both default note and Channel 10) - see drummap below. Playing standard notes on ch10 also produces drums.
chxx : use midi channel xx
uxx : (duty) note is played over xx% of normal length - 10 for staccato, 98 by default, 100 max
vxx : set velocity to xx (max 127)
t+x or t-x : transpose of x half-tones up or down (t0 to cancel transpose)
| : next track
|0 : back to first track
|x : jump to track x (no space between | and x)
stressxx : stressed notes will be xx% stronger
softxx : soft notes will be xx% softer
pitch+x or pitch-x : change pitch of +/- x% (usually 100% = 2 half-tones). pitch0 to center pitch.
# : comment (the rest of the line is ignored)
loosew,q : add "human" feel to playing; notes hit will vary of +/- w milliseconds around exact time. The q parameter defines how centered notes are: with a q of 1 repartition is random (rectangular distribution), with a higher q notes are more centered on exact time (q=10 is almost always exact time); if you specify q=g, you get a gaussian distribution (ex: loose10,g). A standard value example would be loose20,2
velvarw,q : add another "human" feel to playing; notes velocity will vary of +/- w% around standard velocity. The q parameters defines how centered velocity is: with a q of 1 repartition is random (rectangular distribution), with a higher q notes are more centered on exact velocity (q=10 is almost always exact velocity); if you specify q=g, you get a gaussian distribution (ex: velvar10,g). A standard value example would be velvar10,2
guiton: activate Guitar mode (a number alone means a note with temporary transpose)
guitoff: de-activate Guitar mode
tomson: activate Tom mode (a number alone means the tom number to be played, on channel 10)
tomsoff: de-activate Tom mode
ctrla,b : send midi control parameters a,b
sysexa,b,c,... : send midi sysex values a,b,c,...
struma,b,c : chord strumming parameters - a = delay between notes in milliseconds, b = maximum time to trigger upstrike in milliseconds, c = upstrike volume in %. For a rythm guitar try strum10,300,80 . Parameters b and c are optionnal.
tuning[E3,A3,D4,G4,B4,E5] : defines guitar tuning.

Global Commands

Global Commands are valid for the whole song.
tempoxx : define tempo per quarter note (by default 60)
resolutionx : define resolution (0 for 96 ppqn, 1 for 192 ppqn, 2 for 384 ppqn, 3 for 1536 ppqn. 192 by default)
dutyxx : define default duty of notes (by default 98)
velocityxx : define default velocity of notes (by default 100)
dEbUg (case sensitive command!) : debug mode, will print out processings - allow you to debug your song... also dEbUgMaX is an even more insanely complete debug mode...
globaloosew,q : define default loose parameters for all tracks (see loose above)
globalvelvarw,q : define default velvar parameters for all tracks (see velvar above)
globalguiton: all instruments are in guitar mode by default

some notes

  • Syntax structure can vary depending on song style and complexity. I personaly like to define instruments first, then macros, then playing the song, but it's my personnal taste. See also the "I" project for lots of song syntax examples.
  • Non-spaced Pattern mode (xxx--) can be mixed with standard notes (F5). Be careful though: 'F---' (F and 3 times '-' without spaces) is interpreted as: F flat, then two pauses. Add spaces in case of uncertainty: 'F ---' (F, space, and 3 times '-') means F then 3 pauses, 'F- ---' (F, '-', space, and 3 times '-') means F flat then 3 pauses. Use the dEbUg mode if you don't understand why your code is "misinterpreted".
  • Known bugs:
    • Some heavy songs can be very slow to create depending on server traffic, and issue a time-out error. Don't be discouraged, try again, or try another time.
    • When using song saving and editing, don't use the "back" command on your browser, ever - it might delete your song.

quick reference

a : note (La)
b : note (Si). Following a note: flat
c : note (Do)
ctrl : send midi control parameters
ch : midi channel
d : note (Ré)
dEbUg : debug mode (case sensitive command)
dEbUgMaX : debug overkill mode (case sensitive command)
duty : default duty
e : note (Mi)
f : note (Fa)
g : note (Sol)
globaloose : define global time randomness
globalvelvar : define velocity randomness
globalguitmode : guitar mode by default
guiton: activate guitar mode
guitoff: de-activate guitar mode
i : instrument
loose : define time randomness
m$ : define macro (lowercase only!)
mrnd$ : define random macro (lowercase only!)
n : play absolute or relative note
nt : play temporary relative note
o : don't play note
p : pause
pitch : pitch variation
r : duration ratio
resolution : song resolution
stress : stressed notes definition
strum : chord struming
soft : soft notes definition
sysex : send midi sysex
t : transpose
tempo : song tempo
tomson : tom mode on
tomsoff : tom mode off
tuning : guitar tuning for chords
u : duty
v : velocity
velocity : default velocity
velvar : define velocity randomness
x : same note
+ : Following a note : sharp
- : pause same duration. Following a note : flat
= : hold note
# : comment. Following a note: sharp
* : repeat
/ : define duration (or used in ratio) or octave +1
\ : octave -1
| : change track
$ : play macro (see m$)
' : stress note (no space)
, : soft note (no space)
[...] : chord (see the chords list)

some examples

Chromatic: o/8 a d e f g a b / c

Melodic: o5/16 i27 (c e g e a f b g)*3 c e g a/4 | o/16 i27 (c g / c \ g f / c \ g b)*3 c g / c e/4

Rythm: iBD 4*8 | iSD (P/8 8)*8 | iCH 16*32

Rythm with subtil human feel: globaloose15,2 globalvelvar20,2 iBD 4*8 | iSD (P/8 8)*8 | iCH 16*32

Rythm played by beginner: globaloose50,1 globalvelvar30,1 iBD 4*8 | iSD (P/8 8)*8 | iCH 16*32

Rythm patterns: iB2 o/16 xx-xxx--*4 | iS2 o/16 --x---xx*4 | iHH o/16 -x-x-x-x*4

Polyrythm, triplets: iBD 8*8 | iCH r8/12 8*12

Polyrythm, play 17 over 15: iBD r16/17 16*17 | iCH r16/15 16*15 ... or even simpler: iBD 17*17 | iCH 15*15 ...

Playing with macros and track shifts: |0 ch1 o1 i12 | ch2 i12 o1 v75 | ch3 i12 o1 v50 m$1(o/32 c e g e g / c \ g / c e) m$2(|0 $1 | r3/2 p/128 r1 $1 | r5/2 p/128 r1 $1) $2*8

Playing with macros and track shifts, dEbUgMaX mode ! (watch out...): dEbUgMaX |0 ch1 o1 i12 | ch2 i12 o1 v75 | ch3 i12 o1 v50 m$1(o/32 c e g e g / c \ g / c e) m$2(|0 $1 | r3/2 p/128 r1 $1 | r5/2 p/128 r1 $1) $2*8

Hold Notes: o/16 g g g d#======-- f f f d======

Fun with random macros:o6/64 m$1(c) m$2(e) m$3(g) mrnd$4($1 $2 $3) $4*64

Fun with random macros & relative notes: m$1(n+2) m$2(n-1) mrnd$n($1 $2) on40/64 $n*128

Guitar mode : guiton i25 oA3/16 0 4 7 = = = 4 5 2 4 0 0 = = - 11 12 11 = = 12 11 7 9 11 12 0 0

Temporary Transpose : i01 m$1(nt+2) m$2(nt-1) m$3(nt+4) m$4(nt+7) mrnd$n($1 $2 $3 $4) on60/32 (x $n)*128

Pitchs : m$p( P/8 pitch-20 P/16 pitch-40 P/8 pitch-20 P/16 pitch0 P/8 ) |0 ch1 i49 C5/2 D E F G | ch1 $p*5 (note the use of a separate pitch track to be able to pitch a note while it's still playing)

Chords (4 different ways) & strumming:

see also the "I" project.

using the songlist

  • You have to be logged in to be able to save a song. Click on "register" on top left to get a user & password. In case you forgot your password just send me an email.
  • click on to listen to a song.
  • click on to edit a song (even if it's not one of yours, but in that case you'll have to "save as new").
  • click on columns header to sort songs
  • you can filter songs on a word, or view only yours.
  • by default new songs are = not published, meaning only you can listen and edit them. Click on the icon to change its status to published, and share it with other users.
  • you can delete your song by clicking on . The admin can undelete them if needed.

legal advice

By using musicpad you abide to the website's policy:

  • You retain the rights to your own songs, but when publishing them (status ) you accept to share them with the other users, allowing them implicitely to copy and modify them at will.
  • The admin is all-knowing and all-powerful. He can decide to ban abusive users, delete songs, delete or modify comments, etc...
  • In case of problems, questions, requests, etc, contact loic prot.

back to musicpad

drummap

code.midi.name
BD36Bass Drum 1
B235Bass Drum 2
SD38Snare Drum 1
S240Snare Drum 2
RS37Side Stick (RimShot)
HH44Pedal Hi-hat
OH46Open Hi-hat
CH42Closed Hi-hat
TA54Tambourine
T150High Tom 1
T248High Tom 2
T347Mid Tom 1
T445Mid Tom 2
T543Low Tom 1
T641Low Tom 2
CC49Crash Cymbal 1
C257Crash Cymbal 2
TC52Chinese Cymbal (Trash)
RC51Ride Cymbal 1
R259Ride Cymbal 2
RB53Ride Bell
SC55Splash Cymbal
CB56Cowbell
HC39Hand Clap

general midi drummap

note.code.name
B2 35Bass Drum 2
C3 36Bass Drum 1
C#3 37 Side Stick
D3 38Snare Drum 1
D#339Hand Clap
E3 40Snare Drum 2
F3 41Low Tom 2
F#342Closed Hi-hat
G3 43Low Tom 1
G#344Pedal Hi-hat
A3 45Mid Tom 2
A#346Open Hi-hat
B3 47Mid Tom 1
C4 48High Tom 2
C#449Crash Cymbal 1
D4 50High Tom 1
D#451Ride Cymbal 1
E4 52Chinese Cymbal
F4 53Ride Bell
F#454Tambourine
G4 55Splash Cymbal
G#456Cowbell
A4 57Crash Cymbal 2
A#458Vibra Slap
B4 59Ride Cymbal 2
C5 60High Bongo
C#561Low Bongo
D5 62Mute High Conga
D#563Open High Conga
E5 64Low Conga
F5 65High Timbale
F#566Low Timbale
G5 67High Agogo
G#568Low Agogo
A5 69Cabasa
A#570Maracas
B5 71Short Whistle
C6 72Long Whistle
C#673Short Guiro
D6 74Long Guiro
D#675Claves
E6 76High Wood Block
F6 77Low Wood Block
F#678Mute Cuica
G6 79Open Cuica
G#680Mute Triangle
A6 81Open Triangle

general midi instruments

code.instrumentcode.instrument
PIANOCHROMATIC PERCUSSION
1Acoustic Grand 9Celesta
2Bright Acoustic 10Glockenspiel
3Electric Grand 11Music Box
4Honky-Tonk 12Vibraphone
5Electric Piano 1 13Marimba
6Electric Piano 2 14Xylophone
7Harpsichord 15Tubular Bells
8Clavinet 16Dulcimer
ORGAN GUITAR
17Drawbar Organ 25Nylon String Guitar
18Percussive Organ 26Steel String Guitar
19Rock Organ 27Electric Jazz Guitar
20Church Organ 28Electric Clean Guitar
21Reed Organ 29Electric Muted Guitar
22Accoridan 30Overdriven Guitar
23Harmonica 31Distortion Guitar
24Tango Accordian 32Guitar Harmonics
BASS SOLO STRINGS
33Acoustic Bass 41Violin
34Electric Bass(finger) 42Viola
35Electric Bass(pick) 43Cello
36Fretless Bass 44Contrabass
37Slap Bass 1 45Tremolo Strings
38Slap Bass 2 46Pizzicato Strings
39Synth Bass 1 47Orchestral Strings
40Synth Bass 2 48Timpani
ENSEMBLEBRASS
49String Ensemble 1 57Trumpet
50String Ensemble 2 58Trombone
51SynthStrings 1 59Tuba
52SynthStrings 2 60Muted Trumpet
53Choir Aahs 61French Horn
54Voice Oohs 62Brass Section
55Synth Voice 63SynthBrass 1
56Orchestra Hit 64SynthBrass 2
REEDPIPE
65Soprano Sax 73Piccolo
66Alto Sax 74Flute
67Tenor Sax 75Recorder
68Baritone Sax 76Pan Flute
69Oboe 77Blown Bottle
70English Horn 78Skakuhachi
71Bassoon 79Whistle
72Clarinet 80Ocarina
SYNTH LEADSYNTH PAD
81Lead 1 (square) 89Pad 1 (new age)
82Lead 2 (sawtooth) 90Pad 2 (warm)
83Lead 3 (calliope) 91Pad 3 (polysynth)
84Lead 4 (chiff) 92Pad 4 (choir)
85Lead 5 (charang) 93Pad 5 (bowed)
86Lead 6 (voice) 94Pad 6 (metallic)
87Lead 7 (fifths) 95Pad 7 (halo)
88Lead 8 (bass+lead)96Pad 8 (sweep)
SYNTH EFFECTSETHNIC
97FX 1 (rain) 105Sitar
98FX 2 (soundtrack) 106Banjo
99FX 3 (crystal) 107Shamisen
100FX 4 (atmosphere) 108Koto
101FX 5 (brightness) 109Kalimba
102FX 6 (goblins) 110Bagpipe
103FX 7 (echoes) 111Fiddle
104FX 8 (sci-fi) 112Shanai
PERCUSSIVESOUND EFFECTS
113Tinkle Bell 121Guitar Fret Noise
114Agogo 122Breath Noise
115Steel Drums 123Seashore
116Woodblock 124Bird Tweet
117Taiko Drum 125Telephone Ring
118Melodic Tom 126Helicopter
119Synth Drum 127Applause
120 Reverse Cymbal 128 Gunshot

midi controllers (ctrl)

Below, a list of values to use in the ctrla,b command ( a & b between 0 and 127 only).

Note: when two "1st Value" are given (like: 0 / 32), the first is used for the most significant byte (MSB), the second for the least significant byte (LSB). Use the MSB in priority.

1st ValueController Type2nd ValueRemark
0 / 32Bank Select0 to 127(not used in minimal GM)
1 / 33Modulation0 to 127vibrato or tremolo...
2 / 34Breath Controller0 to 127(not used in minimal GM)
4 / 36Foot Controller0 to 127(not used in minimal GM)
5 / 37Portamento Time0 to 127(not used in minimal GM)
6 / 38Data Entry0 to 127see NRPN/RPN (not used in minimal GM)
7 / 39Main Volume0 to 127
8 / 40Balance0-63=left, 64=center, 65-127=right(not used in minimal GM)
10 / 42Pan0-63=left, 64=center, 65-127=right
11 / 43Expression Controller0 to 127
12 / 44Effect Control 10 to 127(not used in minimal GM)
13 / 45Effect Control 20 to 127(not used in minimal GM)
16 to 19General-Purpose Controllers 1 to 40 to 127(not used in minimal GM)
64Damper pedal0-63=off, 64-127=on
65Portamento0-63=off, 64-127=on(not used in minimal GM)
66Sustenuto0-63=off, 64-127=on(not used in minimal GM)
67Soft Pedal0-63=off, 64-127=on(not used in minimal GM)
68Legato Footswitch0-63=off, 64-127=on(not used in minimal GM)
69Hold 20-63=off, 64-127=on(not used in minimal GM)
70Sound Controller 1 (variation)0 to 127(not used in minimal GM)
71Sound Controller 2 (sound)0 to 127(not used in minimal GM)
72Sound Controller 3 (release time)0 to 127(not used in minimal GM)
73Sound Controller 4 (attack time)0 to 127(not used in minimal GM)
74Sound Controller 5 (brilliance)0 to 127(not used in minimal GM)
75 to 79Sound Controller 6 to 100 to 127(not used in minimal GM)
80 to 83General-Purpose Controllers 5 to 80-63=off, 64-127=on(not used in minimal GM)
84Portamento Control(not used in minimal GM)
91Effects 1 Depth (reverb/delay)0 to 127(not used in minimal GM)
92Effects 2 Depth (tremolo)0 to 127(not used in minimal GM)
93Effects 3 Depth (chorus)0 to 127(not used in minimal GM)
94Effects 4 Depth (vibrato)0 to 127(not used in minimal GM)
95Effects 5 Depth (phaser)0 to 127(not used in minimal GM)
96Data Increment +1not used (0)see NRPN/RPN (not used in minimal GM)
97Data Decrement -1not used (0)see NRPN/RPN (not used in minimal GM)
99 / 98Non-Registered Parameter Number (NRPN)0 to 127use with 6/38 or 96-97 (not used in minimal GM)
101 / 100Registered Parameter Number (RPN)0 to 127use with 6/38 or 96-97 (not used in minimal GM)
120All Sound Offnot used (0)
121All Controller Offnot used (0)
122Local keyboard on/off0-63=off, 64-127=on
123All Notes Offnot used (0)
124Midi Mode Omni Offnot used (0)
125Midi Mode Omni Onnot used (0)
126Midi Mode Mononot used (0)
127Midi Mode Polynot used (0)

Registered Parameter Numbers (RPN - ctrl 101/100 )

MSB/LSB
(101/100)
Description
0 / 0Pitch Bend Sensitivity (MSB = number of semitones, LSB = cents)
0 / 1Fine Tuning (MSB = number of semitones with 64=A440, LSB = cents)
0 / 2Coarse Tuning (MSB = number of semitones with 64=A440, no LSB)
0 / 3Tuning Program Select (part of the MIDI Tuning Standard, not used in minimal GM)
0 / 4Tuning Bank Select (part of the MIDI Tuning Standard, not used in minimal GM)
127 / 127RPN Reset (no data entry needed)

Example: to set a Fine Tuning of -1.5 half-tones (-2+50%) versus A440, use the following commands: ctrl101,0 ctrl100,1 ctrl6,62 ctrl38,50

back to musicpad

musicpad vs polymath

musicpad was initially inspired by polymath.cgi. Here is a comparaison of syntaxes on well-chosen polyrythms...
polymathmusicpad
Meshuggah - New Millenium Cyanide Christ intro
(t, 150) (n, CR CH SD BD)
((1 1P*3)*2)*2 
|((4P 4*15)*2)*2 
|(2P 1*7 2)*2 
|((P, 16, (xxx 3 2 2)*2 xxx)*5 (P, 16, xxx 3 2 2 xxx))*2 
tempo150
(
|0 iCC (1 P*3)*2
|  iCH (P/4 x*15)*2
|  iSD (P/2 x)*8
|  iBD o/16 ((xxxx--x-x-)*2 xxx)*5 xxxx--x-x-xxx
) *2
Same with instruments & macros:
tempo150
m$BD1(xxxx--x-x-)
m$G1(A+/16 A+ A+ / C/8 \ P/16 A+ - A+ -)
m$G2(($G1*2 xxx)*5 $G1 xxx)
(
|0 iCC (1 P*3)*2
|  iCH (P/4 x*15)*2
|  iSD (P/2 x)*8
|  iBD o/16 ($BD1*2 xxx)*5 $BD1 xxx
|  ch1 i34 n1 $G2 |  ch2 i82 n2 $G2 |  ch2 n2 t+7 $G2
) *2

back to musicpad

musicpad history


v2.22 - 17 Aug 2006 - minor interface changes
v2.21 - 25 Aug 2004 - added tom mode, and tomson / tomsoff commands, and the q=g parameter for loose & velvar
v2.2 - 17 Aug 2004 - added chords [...], strum and tuning commands.
v2.1 - 16 Aug 2004 - corrected some bugs (WMP error, b as flat...). Added the guitar mode and the nt, pitch, sysex and ctrl commands.
v2.0 - 11 Aug 2004 - a new interface with login & save.
v1.4 - 10 Aug 2004 - deleted o, changed n to o , n used for new "relative note" command
v1.3 - 06 Aug 2004 - added dEbUgMaX, loose and velvar commands
v1.2 - 05 Aug 2004 - added dEbUg, '=' and $mrnd commands
v1.1 - 04 Aug 2004 - added global commands
v1.0 - 03 Aug 2004 - initial release

musicpad v2.22 © loic prot 2006. largely inspired by polymath.cgi, © jens johansson 2001