Music Maker

           

See my Sound Effects page for how the sounds are generated.

Rules

Sequences must be declared before they're used. The last sequence is returned as the sound.

Note format: [CDEFGAB][#b][octave]. Ex: A4, B#12, C-1.2

SymbolDescriptionParameters
,Separate and advance time by 1 BPM.
, XSeparate and advance time by X BPM.
'Line comment.
"Block comment. Terminate with "
bass:Define a sequence named bass.
bassReference a sequence named bass. [vol=1]
BPMBeats per minute.[240]
VOLSets volume. Resets every sequence. [1.0]
CUTCuts off sequence at time+delta. [0]
AGAcoustic Guitar [note=A3] [vol=1] [len=5.0]
XYXylophone [note=C4] [vol=1] [len=2.2]
MRMarimba [note=C4] [vol=1] [len=2.2]
GSGlockenspiel [note=A6] [vol=1] [len=5.3]
MBMusic Box [note=A5] [vol=1] [len=3.0]
HHHi-hat [note=A8] [vol=1] [len=0.1]
KDKick Drum [note=B2] [vol=1] [len=0.2]
SDSnare Drum [note=G3] [vol=1] [len=0.2]

To map a note to a specific frequency, see this page.

To map guitar frets to piano notes (source patmusic77):

String01234 567891011 121314151617 1819202122
eE4F4F#4G4G#4 A4A#4B4C5C#5D5 D#5E5F5F#5G5G#5 A5A#5B5C6C#6D6
BB3C4C#4D4D#4 E4F4F#4G4G#4A4 A#4B4C5C#5D5D#5 E5F5F#5G5G#5A5
GG3G#3A3A#3B3 C4C#4D4D#4E4F4 F#4G4G#4A4A#4B4 C5C#5D5D#5E5F5
DD3D#3E3F3F#3 G3G#3A3A#3B3C4 C#4D4D#4E4F4F#4 G4G#4A4A#4B4C5
AA2A#2B2C3C#3 D3D#3E3F3F#3G3 G#3A3A#3B3C4C#4 D4D#4E4F4F#4G4
EE2F2F#2G2G#2 A2A#2B2C3C#3D3 D#3E3F3F#3G3G#3 A3A#3B3C4C#4D4

Samples