Glossary

bars In music, a bar refers to a unit of time equal to one measure. In TunePad, a bar is always equal to four beats.
beat A beat is a unit of time in music. In TunePad, a beat is the same as a quarter note, and there are four beats in every measure.
block In computer programming, a block of code is a set of instructions that are grouped together. In python, the colon (:) character starts a block of code. Then all of the instructions that belong to that block are indented by the same amount.
boolean In computer programming, a boolean is a data type that can have only one of two values: “True” or “False”. Many mathematical operators in Python code result in a boolean value (<, >, ==, etc.).
bpm In music, tempo refers to the speed at which notes are played. In TunePad and many other music software programs, tempo is measured in "beats per minute" or BPM.
chord A group of musical notes played together at the same time. There are many different types of chords that follow common patterns. Two of the most common types of chords are major chords and minor chords. Try using the python code to the right to play around with different major and minor chords.
conditional In coding, a conditional lets you ask a question in your program. Depending on the answer, you can do one thing or another. The most common types of conditionals are "if", "else", and "elif".
counting-loop In programming, a counting loop lets you repeat a group of actions for any number of times. A special variable controlled by the loop counts up for each cycle of the loop.
def A Python keyword used to define a function.
eighth-note ♪ An eight note is a unit of time in music equal to half (0.5) of a quarter note. In TunePad, there are usually 8 eighth notes in every measure.
elegant In computer programming, code is elegant when it's efficient, neat, and easy to understand.
for-loop In Python programming, a for loop is used to step through a list of items, one at a time. This is a good way to repeat a group of actions over and over again.
function In programming, a function is a block of code that only runs when it is called. Some functions, like playNote, are already defined for you. But, you can also create your own functions and name them whatever you want. In Python, functions can return a value. They can also be called with special variables called parameters. Functions are one of the most powerful tools a programmer has to "decompose" hard, complex problems into smaller pieces.
hi-hat A hi-hat (or hihat, high-hat, or just hat) is a combination of two cymbals, that can either be closed together or open slightly apart. Hi-hats are an essential part of the standard drum kit.
indentation In Python, you can specify a "block" of code using indentation. A block is a set of statements that work together as a group. In TunePad, we use three spaces of indentation to mark a block of code. Blocks can also be "nested" inside of one another. Each new block gets indented three more spaces than the block that contains it.
kick-drum A kick drum (or bass drum) is the largest and often lowest sounding drum in a standard drum kit. It usually sits on the floor and is struck using a foot pedal (kicked).
laziness For a computer programmer, being lazy is a virtuous trait! It means working smart, not hard. In a nutshell, avoid repetitive, error-prone work that the computer can do better than you can. Computers are good at rote tasks, and humans are good at higher-order reasoning. As a human, you should play to your strengths.
legible In computer programming, legibility means how easy it is to read someone's code. A legible program uses comments, includes lots of whitespace, is free of messy and repetitive blocks of code, and is well formatted. An illegible program is, well, not all of those things. It's worth the time to make your code pretty! Someday you might have to read (and understand) it.
list In programming, a list is an ordered set of items. In Python (and many other languages), you use square brackets to show the beginning and end of a list. Each item is separated by commas. For example, a list of notes in TunePad might look like this: [ 12, 16, 19, 24 ]
loop In computer programming, a loop let's you repeat a block of code over and over again. Python has several different kinds of loops, including for-loops and while-loops.
major-chord In music, a major chord is three notes all played together at the same time. Major chords always follow the same pattern. You start with a base note (for example, C = 36), add four (E = 40), and then add three more (G = 43). In TunePad, you would play this as a list of notes [ 36, 40, 43 ]
measure In music, a measure is a unit of time. In TunePad, a measure is equal to four beats. Measures can also be called "bars".
minor-chord In music, a minor chord is three notes all played together at the same time. Minor chords always follow the same pattern. You start with a base note (for example, D = 38), add three (F = 41), and then add four more (A = 45). In TunePad, you would play this as a list of notes: [ 38, 41, 45 ]
parameter In programming, a parameter is a special kind of variable that you can "pass" to a function. For example, the playNote function takes at least one parameter, which is the note to be played. Changing the parameter changes the sound that results. Functions can take any number of parameters, some of which might be optional.
playNote playNote is a function defined by TunePad to play a sound. Depending on the instrument, the sound might be a drum beat, a musical note, or some other type of sound. playNote also takes an optional parameter called beats that determines how long the note should last.
print print is a function defined by Python that writes text to the Output tab in TunePad.
python Python is one of the most popular programming languages in the world. Python is used by Tunepad and many, many other organizations.
quarter-note ♩ A quarter note (also called a beat) is a unit of time in music. In TunePad, there are usually four quarter notes in every measure.
return A Python statement used to return a value from a function.
sixteenth-note A sixteenth note is a unit of time in music equal to one fourth of a quarter note (0.25). In TunePad, there are usually 4 sixteenth notes in every beat and 16 sixteenth notes in every measure.
tempo In music, tempo refers to the speed at which notes are played. In TunePad and many other music software programs, tempo is measured in "beats per minute" or BPM.
variable In programming, a variable is used to hold a piece of information. You can change the value of the variable at different points in a program.