Draft:Music Blocks

Music Blocks is a block-based educational graphical programming language for exploring both music and programming. Music Blocks is a fork of Turtle JS, a logo-inspired visual programming language created by Walter Bender. Music Blocks is a Web application that runs in the browser (like Scratch 2 and 3) without requiring installation. Its basic syntax, although visual, is similar to the text-based program "Music Box" for Logo as described in "11. Make a Music Tune" of Twenty Things to do With a Computer, which utilizes new LOGO procedure (Subroutine) extensions specifically for music expression by Terry Winograd and Jeanne Bamberger.

User interface


The entire window of the browser below the main toolbar displays the code and the user's program. The main toolbar's main features are "play", "stop", "new project", and "planet". On the left are three main categories of palettes, organized as "music", "math/computation", and "graphics". Users drag and drop blocks from the palettes to create their code.

When online, students can publicly publish and share projects using the Planet feature.

Widgets are available for users to explore a variety of musical concepts. Widgets include "Phrase Maker" (simplified graphical notation), "Rhythm Maker", "Musical Modes", "Meter", "Pitch Slider" (Arbitrary Pitch in Hertz), "Music Keyboard", and others.

Features
Features of Music Blocks include:
 * Note value as a quanta of time, expressed as a fraction (e.g. 1/4 is "quarter note", 1/2 is "half note", 1/8 is "eighth note"). Both pitches and graphics can be used within Note Value;
 * Multiple expressions of pitch, such as solfege, Alphabet, scale degree, pitch number, and hertz;
 * Tools to define and utilize key signature and meter for computation;
 * Widgets specifically for musical expression/analysis and generating code;
 * Planet for publishing and sharing projects; and
 * Lilypond, MusicXML, and JavaScript export.

History
Music Blocks was first created as a fork of TurtleJS in 2014 by Walter Bender. In 2015, Yash Khandelwal developed the first prototype of the "pitch-time matrix" (predecessor of the "Phrase Maker" widget) for Google Summer-of-Code.

In 2016, Music Blocks was introduced to the public by Walter Bender (programmer, MIT) and Devin Ulibarri (musician, New England Conservatory) at the 2016 Constructionism Conference, hosted by Darunsikkhalai School for Innovative Learning. Bender and Ulibarri gave a workshop to attendees, a presentation, and submitted an article that was published in the conference magazine.

Music Blocks debuted in Japan by Devin Ulibarri and Sachiko Nakajima at Yokohama Science Frontier High School on December 16, 2017.

By the summer of 2018, Music Blocks was introduced to a workshop, as hosted by Gakken Ltd. Gakken, with funding by Japan's Ministry of Economy, Trade and Industry, translated Music Blocks into Japanese and customized the user interface, and ran a series of workshops with students and teachers while collecting research and feedback.

In 2019, Music Blocks was introduced to Boston Public Schools and Somerville Public Schools as part of outreach by the Free Software Foundation.

Curriculum
Music Blocks is in the Constructionism lineage of pedagogical tools such as Logo. The method of teaching coding through music using Music Blocks was published November 10, 2021 in Twenty Things to Do with a Computer Forward 50: Future Visions of Education Inspired by Seymour Papert and Cynthia Solomon’s Seminal Work by Gary S. Stager and Heather A. Pang. Music Blocks lesson plans have been created by teachers of MAP Family Learning Center, SugarLabs contributors, and by Gakken

License
The source code of Music Blocks is licensed under the Affero General Public License (AGPL) and is hosted on GitHub.