Criticisms of Scratch vs. Music Blocks, a Comparison

I was doing a search for “Music Blocks Programming” and I ran across an article with a provocative title and thesis. The title is “Music Making in Scratch: High Floors, Low Ceilings, and Narrow Walls?” written by W. Payne and S. Ruthmann at NYU.

However, for users wishing to create music through sequencing musical notes or with engaging sounds and instruments, they often can face high floors, low ceilings and narrow walls due to the complex numeric music mappings and mathematical representations, as well as data structures that limit musical expression.

Music Making in Scratch: High Floors, Low Ceilings, and Narrow Walls?

Background

What is Scratch? Scratch is a popular visual programming language. Its purpose is to teach coding concepts to young children.

What are “Floors”, “Ceilings”, and “Walls” with regard to programming?

  • Floors — How easy is it to get started? A low floor means that it is easy to get started. A high floor means that it is difficult to get started. A low floor is desirable as we want kids to get started creating, and thus learning, without unnecessary hindrances.
  • Ceilings — How far can a student go? A high ceiling means that a high level of complexity can be attained. A low ceiling means that high level complexity cannot be attained. Without the possibility for complexity to be explored students will only learn so much. And since “reality is complex”, we want to offer students the possibility to achieve complexity.
  • Walls — How many different methods are available? Wide walls mean that many methods are available. Narrow walls mean that few methods are available. As we all know, there are many different solutions to a problem. Having more methods available allows a learner to explore multiple solutions.

Now that we have established some of the terminology, let’s examine the criticisms of Scratch as laid out in this article as well as how Music Blocks compares. The primary goal is to better understand the differences between Scratch and Music Blocks as well as opportunities for improvement.

Criticisms of Scratch

Payne’s article is titled “Music Making in Scratch: High Floors, Low Ceilings, and Narrow Walls?” Given that there is general consensus that an educational programming language should have low floors, high ceilings, and wide walls, this title essentially says “When it comes to music, Scratch is doing everything the wrong way!” Let’s pick apart the criticisms in this section.

Three Main Criticisms of Scratch

First, the functionality of music blocks is immediately accessible, but designed to play sounds at the level of “musical smalls” (i.e., the “atoms” or “phonemes” of music, such as an individual note, pitch, or duration) vs. “musical simples” (i.e., the “molecules” or “morphemes” of music, such as motives and phrases) (Bamberger and Hernandez 2000).

Second, arising from Scratch’s bottom-up programming style (i.e., building music code block by block, and note by note from a blank screen), the act of realizing musical sequences is tedious requiring a deep mathematical understanding of music theory to (en)code music.

Third, and perhaps most challenging to the end user for music, is a timing mechanism designed to privilege animation frame rates over audio sample-level accuracy. As illustrated by numerous Scratch projects and our own task breakdown, a user must take extra, often unintuitive steps to achieve adequate musical timing to implement basic musical tasks such as drums grooving together in time, or melodies in synchronization with harmony.

IBID

Breakdown of Three Main Criticisms of Scratch

Below is a breakdown of the main criticisms as outlined in the Payne and Ruthmann article.

  1. Designed to play sounds at the level of individual note, pitch, or duration (i.e. “musical smalls”)
  2. Realizing musical sequences (structure?) is tedious, requiring a deep mathematical understanding of music theory.
  3. (Inaccuracies in timing due to) Timing mechanism designed to privilege animation frame rates.

Let’s examine each of these criticisms with regard to both Scratch and Music Blocks.

CriticismScratchMusic Blocks
Designed to play “musical smalls”Pitch as a Number. Duration as Number of Beats (whole number or decimal).Pitch as Alphabet, Solfege, or Number (and more). Duration as “Note Value” (simple fraction).
Realizing higher-level structure is tediousEvents are possible. Other ways of defining a function do not seem to be possible.Defining functions are possible with Action blocks. Creating Action Blocks from Musical Widgets is also possible.
Inaccuracies in TimingTo be tested. However, performance of pre-recorded samples seems to be good.There are imperfections in rhythmic timing due to performance priorities/flaws.
A comparison between Scratch and Music Blocks based on three criticisms of Scratch in Payne article.

Let’s examine the first two main criticisms of Scratch as well as how Music Blocks compares. As for the third criticism regarding performances, we will leave that for another time as this article will remain focused on conceptual issues, not technical.

Test of “Musical Smalls” (1st) Criticism of Scratch

Scratch uses a lot of very low-level representations when it comes to pitch and rhythm. My tests confirm this. For pitch, you only have a number to represent pitch. A musician would not be expected, for example, to know what pitch “60” is. Music Blocks, on the other hand, offers a wide variety of representations for pitch.

Scratch’s Music Blocks
Some of the many Music Blocks in Music Blocks
Some of the many Musical Blocks in Music Blocks

Both Scratch and Music Blocks allow the user to manipulate pitch and rhythm at this low level. Arguably, Music Blocks brings the user in at a higher-level than Scratch. Whereas Scratch only allows a user to represent pitch as a MIDI number, Music Blocks affords the user representations more often taught by music teachers, such as Solfege (Do, Re, Mi, etc.) and Musical Alphabet (i.e. C, D, E, etc.) while still offering a way to represent pitch as a MIDI number if one so chooses.

As for rhythm, notably Music Blocks offers a way for the user to conceptualize rhythm in Note Value, which is how music is taught in general music education. Scratch does not have this option. In Scratch, the user specifies “beat” as a whole note or decimal (i.e. a quarter note is beat of 1, an eighth note is beat of 0.5, and a sixteenth note is beat of 0.25).

Alternate Representations for “Musical Smalls”

For pitch, Scratch has a music keyboard popup to select the pitch. This helps somewhat mitigate the fact that “60” is very abstract. Music Blocks also has a keyboard representation available as a widget, which allows the user to input code via a keyboard in the browser or physical keyboard connected via MIDI.

Scratch Music Keyboard
Scratch Music Keyboard | Number of 60 is Middle C on the keyboard.
Cyclic Representation of Pitch in Music Blocks
Cyclic Representation of Pitch in Music Blocks | Pitch is represented as a pitch wheel.

Music Blocks offers a wide variety of other representations, some of which export functions (i.e. Action Blocks). Read the widgets section of the guide for more information. Some of the various widgets are pictured below. All widgets export code for the user.

Music Keyboard Widget
Rhythm Maker Widget
Key/Mode Widget
Phrase Maker Widget
Temperament Widget

Test of “Structure is Tedious” (2nd) Criticism of Scratch

I will admit that I have not spent much time coding with Scratch. When I read the Payne article, one thing caught my eye when first scanning through. There is a diagram of “Twinkle, Twinkle” (figure 3 of IBID) where the entire melody is written with Note Blocks, without defining functions to create higher-level musical structure.

Below is my solution, which utilizes Scratch’s Event blocks. It uses higher-order definitions of functions as compared to the example Payne has in their article. I add it here so that we can have a slightly better “apples-to-apples” comparison as Payne’s example is unnecessarily extreme in its verbosity.

Figure 3 of Payne article. “Twinkle, Twinkle” is coded without any structure. Forty-two Note Blocks are used.
"Twinkle Twinkle" with Scratch
“Twinkle Twinkle” with Scratch using Events. Twenty-one Note Blocks are used.

Below is an example of one solution to “Twinkle, Twinkle Little Star” as coded in Music Blocks. Using “Duplicate” blocks, which are a bit different than “Repeat” as they duplicate all contained Note Blocks, the number of Note Blocks required is only 12, which is about half of even the most efficient version one could create in Scratch. The solutions in the above images made in Scratch are also possible with Music Blocks.

Twinkle Twinkle with Structure
Twinkle Twinkle with Structure

Side Note: I observed a lesson of a Suzuki violin teacher instructor teaching “Twinkle, Twinkle” to a beginner. She used the sandwich analogy for the form of “Twinkle, Twinkle” and I have always thought it to be a great idea. Plus, the code lays out visually within the Start Block like a sandwich!

Importance of Musical Structure in Music Programming is Not a New Idea!

In 1971, in “Twenty Things to do with a Computer”, the authors (Papert & Solomon) mentioned the importance of structure in music programming. On pages 23 and 24 of the article, a “bad” way of coding Frere Jacques is compared against a good way to code Frere Jacques. Below are screenshots of the two pages for convenience of comparison.

Bad Way of Programming Frere Jacques
Bad Way of Programming Frere Jacques
Much Better Way of Programming Frere Jacques
Much Better Way of Programming Frere Jacques

The idea of structuring code in a way that reflects the musical structure has been around for 50 years. Music Blocks follows in this tradition. Scratch offers users fewer tools to structure their music.

Testing “Twinkle Twinkle” on Scratch and Music Blocks Videos

Next is a video of my tinkering with Scratch. You even get to see me making a few mistakes along the way! One mistake I made was to use a broadcast block that triggers all the events simultaneously instead of “waiting for” the event to end first before going on to the next.

After this video of “Twinkle, Twinkle” on Scratch is a video of “Twinkle, Twinkle” on Music Blocks. For the Music Blocks video, I play the melody two times. The second time, I add a “multiply note value” block so that the music plays at a similar tempo to the Scratch example for a better comparison (also because it is handy that Music Blocks has this block).

video
play-rounded-fill

Interested to try the Music Blocks project for yourself? The project is accessible from this link.

Other Criticisms of Scratch and Music Blocks Comparison

The section above focuses on the three main criticisms of Scratch. The following section examines the additional criticisms mentioned in the Payne article followed by a comparison to Music Blocks.

Sample Duration (i.e. Note Value) Cannot be Altered in Scratch

Setting a tempo affects pitched instruments and drums, but not audio files (e.g., sounds). This makes sense for games and animations where strict rhythmic timing is unnecessary, e.g. characters communicating with each other. But if a user wanted to load in their own musical sounds to create a sampler, they would need to use a combination of “play sound” blocks and “rest” blocks to emulate tempo. The syntax “play sound until done” is also confusing to new learners and unique to sound playback. Really this line means “do not move on until the sound has finished” and results in timing derived from the current sound’s length.

IBID

Music Blocks allows the user to record their own samples to create a custom instrument. The new custom instrument can be used just like any other instrument, and enclosed Note Blocks will perform for their specified duration as a Note Value (i.e. 1/2, 1/4, 1/8, 1/16, etc.)

Sampler Widget — Base pitch can be adjusted and a custom instrument is created.

Therefore, Music Blocks does not seem to have the same limitations as Scratch, although I have not tested the method described above with Scratch.

Multiple Pitches Cannot be Added to a Single Note Block

A single percussionist is required to play multiple instruments like an instrumentalist is required to play multiple notes. However, the “set instrument” function constrains sprites to a single instrument. It’s often a challenge to teach that a single sprite can play any number of percussion sounds in parallel with a pitched instrument but is limited to one pitched instrument.[4] A more consistent design may treat a drum like any instrument requiring it to be set for the entire sprite while providing smart selection/labelling to indicate the resulting drum sound.[5]

IBID

Music Blocks allows the user to put multiple pitches and drums (and other things) into a single Note Block.

Two notes sounded together (dyad).
A pitch and two drum sounds together.

Therefore Music Blocks is not limited in this way. In Music Blocks, you can have both multiple voices as well as a single voice performing multiple pitches/drums at a time.

Graphics (Movement), Actions, and Other “Chords”

It is worth pointing out that Music Blocks does not only allow the user to input multiple pitches, multiple drums, and pitch with drums inside a Note Blocks, but that just about anything can be put inside a note. The most notable example is Graphics Blocks, which create dance-like motion when combined with Note Blocks. More will be written about this feature in a future article, but for now you can read about it in the Music Blocks Guide. The guide has images as well as links to example projects for you to try.

Conceptual Challenges

The Payne article describes a number of conceptual challenges which raise the floor to entry for music making in Scratch.

The design of the “play note” and “play drum” blocks is challenging in other ways. For one thing, the vertical, numeric representation of pitches and instruments conceals melodic content more easily visualized with other representations like traditional score notation or pitch contour curves. A learner has to memorize for example that pitch 64 refers to “E,” that drum 1 is the snare drum, and instrument 9 is the trombone. Rhythm is also expressed numerically as fractions or multiples of the beat rather than in traditional formal music terms like “sixteenth notes” and “quarter notes.”

While this notation affords a more fundamental conception of timing and can lead to crazy behaviors (1.65 beats against 1.1 beats), it constrains the type of rhythms possible, e.g. triplet eighth notes that would need to be rounded down to 0.33. Depending on what one is teaching about music, a notation-based rhythm representation may be more accessible than decimal fractions of beats.

IBID

These conceptual issues are addressed in the “Musical Smalls” section above. An additional comparison of what the two Visual Programming Languages have to offer is outlined below.

Musical Small ParameterScratchMusic Blocks
PitchMIDI Number (i.e. C is 60)Pitch Number (i.e. C is 0)
Solfege (i.e. C is Do)
Musical Alphabet (i.e. C is C)
Scale Degree (i.e. C is 1 for key=C Major)
Nth Modal Pitch (i.e. C is 0 for key=C Major)
Pitch in Hertz (i.e. A is 440)
RhythmBeat Duration (i.e. eighth note is 0.5)Note Value (i.e. eighth note is 1/8)
Milliseconds (i.e. 1000 is 1 second)
Drum NameDrum as Number (i.e. “1” is snare drum)Drum as Name (i.e. “Snare Drum” is snare drum)
Instrument NameInstrument as NumberInstrument as Name
Visualization of Melodic MovementCode is Top to Bottom. No affordances for visualization.Code is Top to Bottom. Widgets help with visualization of melodic contour/movement.
A comparison of the “Musical Smalls” receiving scrutiny in Payne article.

Sound Quality

One criticism of Scratch is the sound quality. Unfortunately, Music Blocks is not very far ahead in this regard. Music Blocks and Scratch both have similar constraints in this regard. Both a browser-based, which requires samples to be downloaded and processed in the browser. Both strive to utilize samples that are licensed as free/libre/open-source.

How can we do better in this regard? (If you have suggestions, please add a comment below. Thank you!)

A Lesson from Jean Bamberger

One of the most intriguing things that I read in the Payne article is the following examination of Jean Bamberger’s approach.

In Bamberger’s curriculum, conversely, she begins with the middle-level concept of melodic chunks. The accompanying learning tool Impromptu presents musical building blocks called “tuneblocks” that are hierarchically grouped into entire tunes, phrases, and motives. The user begins by listening to the various “chunks” of melodies, and arranges and rearranges them to create or re-create a composition. The user is not working initially at the level of individual pitches and rhythms, but instead at a higher, and more intuitive level of abstraction.

Students begin by learning that the base units of a composition are melodies and motives, rather than pitches or frequencies. It is not until Part 3 entitled Pitch Relations when Bamberger zooms in and introduces intervals and assigns students to uncover and reverse engineer scales from melodies. She effectively reverses the order of traditional music theory, teaching children how to theorize with music, rather than accept it as a set of bottom-up, well-structured rules.

One notices this approach is the reverse of the way many people approach teaching coding in Scratch (and also in many other languages), but is congruent with the original design intention behind Scratch where users would first browse and play games created by other users in the Scratch community, then clicking the “see inside” button to remix others’ code as the starting point for learning.

IBID

Takeaway from Bamberger

Having taught Music Blocks for a number of years, I know that students can get frustrated when forced to work entirely with the smallest musical components. The first lesson I typically do with students has “Hot Cross Buns” basically transcribed for them, and in this way is very similar to Bamberger’s “Tune Blocks”. That being said, the students may always open up the corresponding Action Blocks to see what the notes are. In fact, I encourage students to do so, and even have them remix the notes and structure in the latter half of that first lesson.

I will say, having spent some time examining Scratch for the purpose of writing this article, that making music without defining functions (e.g. Action Blocks) is very difficult.

Four “chunks” of melodic material for “Are You Sleeping” (Frere Jacques)
The pitches contained within first two chunks.
The pitches contained within last two chunks.

Author’s Note: The music tools and ideas in LOGO referenced earlier were informed by Jeanne Bamberger and Terry Winograd. The example in that section is also Frere Jacques. You are encouraged to revisit that section to compare the code in those examples with the Music Blocks example above. What is similar and what is different?

Conclusions

It has been helpful to research the capabilities of Scratch with regard to musical computation. The Payne article has been a helpful catalyst to this much overdue comparison of Music Blocks to other visual programming languages such as Scratch.

Music Blocks, as expected, has many more affordances for musical computation than does Scratch. However, what was surprising is that Scratch does not seem to have a way to define and call functions. In Music Blocks, functions are called “Actions” or “Chunks” and are an integral way to creating musical structure. In Scratch, events can be defined and broadcast, but the structure is not as simple as Music Blocks’ Action Blocks. It is too easy to have multiple events broadcast simultaneously and not in order. In Music Blocks the Action Blocks can be used like ordinary blocks and placed in order to perform sequentially.

One takeaway from this article is Jean Bamberger’s approach to start with “Chunks” first and then zoom in to see the smaller musical components. As a teacher, I have tried both approaches in the classroom. I have had students start first with “Chunks” before “zooming in”, like in my “Hot Cross Buns” lesson, and I have also had students start building with the smaller components before “zooming out”. That being said, I almost always start a series of lessons with the former, and the latter approach I use after the first lesson.

Her approach rings true to me. In my experience, students who are given a series of lessons where they are starting from a new project and only using the “musical smalls” tend to lose motivation over time as they become frustrated with unimpressive outcomes of their efforts. A very helpful “next step” for Music Blocks may be to have a large effort made by a group of musicians and music teachers (i.e. more than just me, Walter, and my students) to create more musical material in Music Blocks and publish it to the planet for other students to use in their projects.

All-in-all his exercise in observing Music Blocks through the criticisms of Scratch outlined in the Payne article has been enlightening. Please share your thoughts in the comments below and keep the conversation going.