\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{samaaron} \pdfinfo{ /Title (sonic-pi-basic-starter.pdf) /Creator (Cheatography) /Author (samaaron) /Subject (Sonic Pi Basic Starter Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{FF1493} \definecolor{LightBackground}{HTML}{FFF0F8} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Sonic Pi Basic Starter Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{samaaron} via \textcolor{DarkBackground}{\uline{cheatography.com/166286/cs/34799/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}samaaron \\ \uline{cheatography.com/samaaron} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 20th October, 2022.\\ Updated 20th October, 2022.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Simple Melody}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{play 70 \newline sleep 1 \newline play 72 \newline sleep 2 \newline play 75} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Repetition}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{4.times do \newline play 76 \newline sleep 1 \newline sample :bd\_haus \newline sleep 1 \newline end} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Loops}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{live\_loop :sally do \newline sample :bd\_haus \newline sleep 0.5 \newline end \newline \newline live\_loop :kate do \newline play 70 \newline sleep 1 \newline end} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{FX}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{with\_fx :reverb, room: 1 do \newline sample :guit\_em9 \newline end \newline \newline with\_fx :distortion do \newline play 70 \newline sleep 1 \newline play 75 \newline end} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.84 cm} x{4.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Synths}} \tn % Row 0 \SetRowColor{LightBackground} `play 60` & Play note 60 with the current synth \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `play :e` & Play note E with the current synth \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} `play :eb` & Play note Eb with the current synth \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} `play :cs` & Play note C♯ with the current synth \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} `play :e3` & Play note E at octave 3 with the current synth \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} `play 60.5` & Play the note halfway between 60 and 61 \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} `play :eb2 + 0.25` & Play the note a quarter of a semitone above Eb octave 2 \tn % Row Count 16 (+ 3) % Row 7 \SetRowColor{white} \{\{nobreak\}\}`play (chord :e3, :minor)` & Play chord E Minor at octave 3 \tn % Row Count 18 (+ 2) % Row 8 \SetRowColor{LightBackground} `play {[}60, :E3, 72{]}` & Play notes 60, E (octave 3) and 72 as a chord \tn % Row Count 21 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.08 cm} x{3.92 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Samples}} \tn % Row 0 \SetRowColor{LightBackground} \{\{nobreak\}\}`sample :loop\_amen` & Play loop amen sample \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \{\{nobreak\}\}`sample :loop\_amen, rate: -1` & Play loop amen sample backwards \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \{\{nobreak\}\}`sample :loop\_amen, rate: 0.5` & Play loop amen sample at half speed \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} \{\{nobreak\}\}`sample :loop\_amen, amp: 2` & Play loop amen sample at double volume \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Randomisation}} \tn % Row 0 \SetRowColor{LightBackground} \{\{nobreak\}\}`play (scale :c3, :minor).choose` & Play a random note within the C Minor scale in octave 3. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \{\{nobreak\}\}`sample :bd\_haus,\{\{nl\}\}~~cutoff: rrand(70, 130)` & Play the bd haus sample with a random cutoff value between 70 and 130 \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} `sleep rand(3)` & Sleep for a random amount of time between 0 and 3 beats. \tn % Row Count 10 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Available Samples}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Example Usage} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`sample :loop\_industrial, amp: 1.5, rate: 0.5`} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Electric Sounds} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:elec\_triangle`, `:elec\_snare`, `:elec\_lo\_snare`, `:elec\_hi\_snare`, `:elec\_mid\_snare`, `:elec\_cymbal`, `:elec\_soft\_kick`, `:elec\_filt\_snare`, `:elec\_fuzz\_tom`, `:elec\_chime`, `:elec\_bong`, `:elec\_twang`, `:elec\_wood`, `:elec\_pop`, `:elec\_beep`, `:elec\_blip`, `:elec\_blip2`, `:elec\_ping`, `:elec\_bell`, `:elec\_flip`, `:elec\_tick`, `:elec\_hollow\_kick`, `:elec\_twip`, `:elec\_plip`, `:elec\_blup`} \tn % Row Count 13 (+ 10) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Guitar} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:guit\_harmonics`, `:guit\_e\_fifths`, `:guit\_e\_slide`, `:guit\_em9`,} \tn % Row Count 16 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Drums} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:drum\_heavy\_kick` `:drum\_tom\_mid\_soft`, `:drum\_tom\_mid\_hard`, `:drum\_tom\_lo\_soft`, `:drum\_tom\_lo\_hard`, `:drum\_tom\_hi\_soft`, `:drum\_tom\_hi\_hard`, `:drum\_splash\_soft`, `:drum\_splash\_hard`, `:drum\_snare\_soft`, `:drum\_snare\_hard`, `:drum\_cymbal\_soft`, `:drum\_cymbal\_hard`, `:drum\_cymbal\_open`, `:drum\_cymbal\_closed`, `:drum\_cymbal\_pedal`, `:drum\_bass\_soft`, `:drum\_bass\_hard`, `:drum\_cowbell`, `:drum\_roll`} \tn % Row Count 26 (+ 10) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Misc} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:misc\_burp`, `:misc\_crow`, `:misc\_cineboom`} \tn % Row Count 29 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Percussion} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:perc\_bell`, `:perc\_bell\_`, `:perc\_snap`, `:perc\_snap2`, `:perc\_swash`, `:perc\_till`, `:perc\_door`, `:perc\_impact\_1`, `:perc\_impact\_2`, `:perc\_swoosh`} \tn % Row Count 34 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Available Samples (cont)}} \tn % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Ambient} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:ambi\_soft\_buzz`, `:ambi\_swoosh`, `:ambi\_drone`, `:ambi\_glass\_hum`, `:ambi\_glass\_rub`, `:ambi\_haunted\_hum`, `:ambi\_piano`, `:ambi\_lunar\_land`, `:ambi\_dark\_woosh`, `:ambi\_choir`, `:ambi\_sauna`} \tn % Row Count 6 (+ 6) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Bass} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\} `:bass\_hit\_c`, `:bass\_hard\_c`, `:bass\_thick\_c`, `:bass\_trance\_c`, `:bass\_drop\_c`, `:bass\_woodsy\_c`, `:bass\_voxy\_c`, `:bass\_voxy\_hit\_c`, `:bass\_dnb\_f`} \tn % Row Count 11 (+ 5) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Bass Drums} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:bd\_pure`, `:bd\_808`, `:bd\_zum`, `:bd\_gas`, `:bd\_sone`, `:bd\_haus`, `:bd\_zome`, `:bd\_boom`, `:bd\_klub`, `:bd\_fat`, `:bd\_tek`, `:bd\_ada`, `:bd\_mehackit`} \tn % Row Count 16 (+ 5) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Loops} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:loop\_industrial`, `:loop\_compus`, `:loop\_amen`, `:loop\_amen\_full`, `:loop\_garzul`, `:loop\_mika`, `:loop\_breakbeat`, `:loop\_safari`, `:loop\_tabla`, `:loop\_3dprinter`, `:loop\_drone\_g\_97`, `:loop\_electric`, `:loop\_mehackit\_1`, `:loop\_mehackit\_2`, `:loop\_perc\_1`, `:loop\_perc\_2`, `:loop\_weirdo`} \tn % Row Count 24 (+ 8) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Snares} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:sn\_dub`, `:sn\_dolf`, `:sn\_zome`, `:sn\_generic`} \tn % Row Count 27 (+ 3) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Tabla} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:tabla\_tas1`, `:tabla\_tas2`, `:tabla\_tas3`, `:tabla\_ke1`, `:tabla\_ke2`, `:tabla\_ke3`, `:tabla\_na`, `:tabla\_na\_o`, `:tabla\_tun1`, `:tabla\_tun2`, `:tabla\_tun3`, `:tabla\_te1`, `:tabla\_te2`, `:tabla\_te\_ne`, `:tabla\_te\_m`, `:tabla\_ghe1`, `:tabla\_ghe2`, `:tabla\_ghe3`, `:tabla\_ghe4`, `:tabla\_ghe5`, `:tabla\_ghe6`, `:tabla\_ghe7`, `:tabla\_ghe8`, `:tabla\_dhec`, `:tabla\_na\_s`, `:tabla\_re`} \tn % Row Count 37 (+ 10) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Available Samples (cont)}} \tn % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Vinyl} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:vinyl\_backspin`, `:vinyl\_rewind`, `:vinyl\_scratch`, `:vinyl\_hiss`} \tn % Row Count 3 (+ 3) % Row 13 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Glitch} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:glitch\_bass\_g`, `:glitch\_perc\_1`, `:glitch\_perc\_2`, `:glitch\_perc\_3`, `:glitch\_perc\_4`, `:glitch\_perc\_5`, `:glitch\_robot\_1`, `:glitch\_robot\_2`} \tn % Row Count 8 (+ 5) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{Mehackit} \tn \mymulticolumn{1}{x{8.4cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}\{\{nobreak\}\}`:mehackit\_phone\_1`, `:mehackit\_phone\_2`, `:mehackit\_phone\_3`, `:mehackit\_phone\_4`, `:mehackit\_robot\_1`, `:mehackit\_robot\_2`, `:mehackit\_robot\_3`, `:mehackit\_robot\_4`, `:mehackit\_robot\_5`, `:mehackit\_robot\_6`, `:mehackit\_robot\_7`} \tn % Row Count 15 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}