Learn the music code
Every song in Shawarma is code: short patterns of sounds and notes that play in a loop while you change them. These guides teach you to read and write it.
New for HalloweenHalloween party musicA spooky dance track for your party, ready to play, then changed by asking. Open the Halloween page- TutorialFrom an empty page to a short song: sounds, rests, layers, notes, scales, tempo and effects.
- Drum patternsKicks, snares and hats in mini-notation: house, rock, boom bap, breakbeats, Euclidean rhythms and fills.
- Cheat sheetEvery symbol of mini-notation and the functions you use most, on one page.
- Example songsFive complete songs with their code and notes on how each one works.
- Chat commandsThe / shortcuts in the chat: listen and fix the mix, vary, arrange, export and more.
What the code looks like
A kick on every beat, a clap on two and four, hats between the beats, and a bass line, in three lines. Quotes hold the pattern; each step in it shares the bar with the others.
const drums = s("bd*4, [~ cp]*2, [~ hh]*4") .gain(.85)
const bass = note("<c2 a1 f1 g1>*4") .s("sawtooth") .lpf(700)
stack(drums, bass)The code is JavaScript with a small pattern language inside the quotes. These guides are short and stick to what you need to start making songs. You do not need to know JavaScript: apart from const and a few brackets, it is all in the patterns.
Try it in Shawarma
Shawarma is a music editor where every song is code. Your song plays on a loop; ask the assistant for a change in plain words, listen to it, and keep it only if you like it. Or edit the code yourself, as in this guide. The editor is free, with 5 assistant replies to try it; Pro starts with 7 days free.