Also, should this resource only include definitions and examples, or should it also feature exercises?
I think this should be set from the get-go…
Also, should this resource only include definitions and examples, or should it also feature exercises?
I think this should be set from the get-go…
Initially, just definitions and examples I think
OK good… Also, should the course assume the user is familiar with the Sonic Pi tutorial?
I think maybe it’s better if the music theory thing, is separated from the basics of Sonic Pi itself.
If needed, a beginner will be directed to the tutorial and asked to come back for the music theory specific stuff, instead of explaining what play and sleep do, in this mini course.
But I’m not sure!
OK, so after some back and forth, here is a first draft of the outline presented by the AI…
Does this look OK to an expert eye?
Here is the revised overview:
play command and integer arguments.scale function.chord function, playing chord notes simultaneously with play_chord.sleep, use_bpm, and creating patterns with live_loop.live_loops for melody and chords.cue/sync) to switch between musical sections.Ready to draft the first module with this adjusted, concept-first focus.
This all looks very good, perhaps introduce durations a bit earlier. And should there be space for non-Western idioms such as microtonal music, Eastern rhythms, IDM etc? Or leave those topics for the intermediate/advanced?
PD-Pi
Hey… I presented the AI with this feedback, and now the outline looks like the following. Is this better? To be honest, there are some things that I find were formulated better in the previous version… It changed a bit too much IMHO…
Excellent feedback. The experienced users are thinking about flow, inclusivity, and practical application.
Here is the revised curriculum overview incorporating their points.
Module 1: Pitch, Time & The First Loop
play, sleep, use_bpm. Creating a simple, timed sequence in a live_loop.Module 2: Scales & The List Nature of Melody
Module 3: Intervals: The Measured Space Between Pitches
play commands.Module 4: Harmony & Chords
chord function. Using play_chord and arpeggiating chord notes.Module 5: Chord Progressions & Roman Numerals
Module 6: Rhythm & Pattern
Module 7: Exploring Beyond the 12 Notes
play command with decimal numbers for microtones. Introducing scale with non-Western tunings (e.g., :pelog).Module 8: Composition & Structure
define to create reusable melodic/harmonic functions. 2) Using cue/sync for timed section changes. Combining loops and functions to form a complete piece.This structure now:
Ready to draft Module 1: Pitch, Time & The First Loop with this integrated framework.
I asked it to put back the section about “Melody & Accompaniment” in there
On a related note, here’s an excellent music theory basics tutorial, very concise, with accompanying pdf
Nice… I’ll make sure and watch it… Sorry, I haven’t been very responsive, but I’m still around and motivated…
The AI did the final outline, and a draft of module one, but there has been a tiny bit of “drift” so I’ll refocus things before posting here, very soon!
Hey! I’m back…
So after some small corrective steps, here’s what my AI said the very first module should look like…
How did it do then?
Tags: [[Music Theory]] [[Sonic Pi]] [[Basics]] [[Pitch]] [[Rhythm]]
In Sonic Pi, music is built from two fundamental kinds of data:
The most straightforward way to represent a pitch in code is using a MIDI note number. Imagine a number line stretched across a piano keyboard.
C4 (Middle C) --> 60
C#4/Db4 ------> 61
D4 -----------> 62
... etc. ...
C5 (One octave higher) --> 72
Note: Different systems name these pitches. In this course, we’ll primarily use MIDI numbers and the English system (C, D, E…). For reference:
Sonic Pi understands both play 60 and play :C4.
The Code: The play command turns a number into sound.
play 60 # Plays Middle C
play 67 # Plays the G above Middle C
Try this now: Copy the two lines above, paste them into a Sonic Pi buffer, and press Run. You should hear two distinct pitches, played simultaneously.
Octave Simply Explained: In the code examples, notice that 60 and 72 are both called “C”. An octave is the distance where a note’s name repeats. In our number system, adding 12 moves you up to the next octave (e.g., from C4 to C5). Its musical use—for creating harmony, variation, and basslines—will be explored in later modules.
Music happens over time. The sleep command tells Sonic Pi to pause for a number of beats.
play 60
sleep 1 # Waits for 1 full beat before the next command
play 62
You control the speed of the beat using use_bpm (Beats Per Minute).
use_bpm 120 # Sets a medium-fast tempo
play 60
sleep 1
play 62
A melody is a sequence of pitch-and-duration pairs. In code, this is a list of instructions.
use_bpm 120
play 64 # E4
sleep 0.5 # A half-beat wait
play 62 # D4
sleep 0.5
play 60 # C4
sleep 1 # A full-beat wait
A live_loop repeats a block of code forever, allowing you to build repeating patterns—the backbone of most music. It’s a container for your lists of instructions.
use_bpm 120
live_loop :first_loop do
play 64
sleep 0.5
play 62
sleep 0.5
play 60
sleep 1
end
Run this code. You will hear your three-note melody repeat. Change one of the play numbers or sleep times and run the code again (while it’s still playing) to hear it update instantly.
live_loop) is a way to repeat that list, creating the cyclical structure essential to music.In this curriculum, we will first understand what the data is (a number, a list), and then we will learn how it sounds. The sound is the result of the code.
I’m currently debating the AI about mentioning the term “note” in module 1 (maybe even in the summary), and not just “pitch” and “duration” separated.
This will be rooted in code, but it’s still a music theory intro first…
EDIT: Here’s the result of the corrected section:
Here is the concise integration for Module 1.
Place this new section after explaining sleep and before “Combining Them: Your First Melody”.
In music, a single sound is called a note. A note is defined by two properties:
In Sonic Pi, a note is therefore constructed from our two core data types:
play [number] defines its pitch.sleep [number] defines its duration.# This is one note: Middle C, held for 1 beat.
play 60 # Pitch
sleep 1 # Duration
All musical structures—melodies, chords, rhythms—are built from sequences or combinations of notes.
This addition:
It maintains the “code-first” perspective while fulfilling the music theory requirement. Ready to integrate or await forum feedback.
Yes, I agree: the term ‘note’ contains two main properties, pitch and duration, especially in the context of Sonic Pi. Timbre is something else entirely (although related to frequency) not central to basic music theory.
I wonder if this thread/topic has the potential to become too unwieldy for this forum - what do the admins think?
PD-Pi
True… Maybe we should start a dedicated thread, or maybe continue in private messages?
Or maybe I should go all the way, and only show the finished product for review?
In the meantime, does this module 1 look OK?
Yes, it all looks great. I still struggle with the concept and implication of the sleep function. It impacts on the duration of a sound (given the appropriate synth sound) but it also defines the time interval between events. Perhaps you should be more explicit about that definition?
PD-Pi