Skip to content

Instantly share code, notes, and snippets.

@aviral243
Last active August 30, 2020 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aviral243/ec5279aa0c915663c9166ca44557b447 to your computer and use it in GitHub Desktop.
Save aviral243/ec5279aa0c915663c9166ca44557b447 to your computer and use it in GitHub Desktop.
Google Summer of Code 2020 | Submission of Work for Final Evaluation | Sugar Labs

Music Blocks Scale Degree vs n^th Modal Pitch

I've spent last three months working on this proposal with Sugar Labs. I have learnt a lot over the summer working under the guidance of my mentors, Walter Bender and Devin Ulibarri.

This post links to all the work I've done over the summer.

Nerd Stats: Around 33 PRs, 80 commits and 5000+ insertions and 2 Version releases.

About:

Sugar Labs

Music Blocks is a programming language and collection of manipulative tools for exploring musical and mathematical concepts > in an integrative and fun way. -- Music Blocks Github README

Project Abstract : There is an underlying issue with scale degree block as we have it now. The current block does not perform the function that musicians expect when they think of scale degree. Instead the block functions in a way that we can specify a key/mode of a pitch length, input a number and result is a pitch in the chosen key/mode. The current block has its utility in programming and we aim to keep it as such with a modified name. A new block for scale degree needs to be added with the desired functionality.

Final Product:

The final product out of my GSoC contributions are most notably a new Scale Degree block, Pitch Preview options, an exhaustive converter block that provides the freedom to transform between different variables inside Music Blocks and several other performance and behaviour based enhancements.

  • Fixed Octave calculation for Scale Degree and Nth Modal Pitch block. #2275, #2519

  • Fixed ambiguity between accidentals while building scales. #2284

  • Transition of Old Scale Degree block to a new block named Nth Modal Pitch and subsequent changes. #2286, #2292

  • Addition of the new Scale Degree Block. #2314

  • Addition of a block (dubbed as Output Tools) that provides user with insightful information about the pitch being played. #2359

  • Increasing scope of the above block by transforming it into a converter that can potentially convert the current pitch or any user provided input to his/her desired output. #2450, #2487

  • Add a Y2Pitch converter block that converts a vertical position into a musical note. #2429

  • Addition of a Pitch Preview menu letting users work in keys other than C major, thus adding an IDE like experience to Music Blocks. #2419, #2438, #2451, #2488, #2498

  • Redisgned working of Random block with Solfege. #2386

  • Add ESLint rules for the JavaScript Directory. #2340

  • DOCUMENTATION: Added documentation regarding the converter blocks added above. #2500

  • Configured Plus Block to work with scale degree. #2539

  • On Scale degree do block. (Wasn't realised due to some underlying shortcomings) #2381

  • Bugs / Regression fixes and Minor performance improvements. #2245, #2248, #2276, #2278, #2280, #2325, #2336, #2360, #2428, #2512, #2391

Notable Features:

Scale Degree Block:

When the project started we actually did have a block called scale degree but it didn't function exactly how it should. That block was converted to N^th Modal Pitch and a new scale degree block in a different form-factor was introduced.

N^th Modal Pitch:

Nth Modal Pitch

Scale Degree:

Scale Degree

Pitch Preview Menu:

Music Blocks contains a set-key block that let users access keys and modes apart from the default C major. But the usage of this block is restricted to final execution of project. Pitch-Preview Menu provides several keys/modes to choose from and that selected key + mode combination is used to set-up the work environment inside Music Blocks. This doesn't affect the final execution of projects.

Pitch Preview Menu

Pitch Converter Block:

This started off as a simple block to display stats about the current note being played. Later it was evolved into a more functional converter that can take both user-provided custom input or the current note being played and convert it into useful and usable outputs.

Pitch Converter Block:

Pitch Converter

Options provided by this block through a Pie-Menu Interface:

Pie-Menu

Status:

All the goals proposed as part of the initial proposal were successfully met. I went on further to build upon a few more of the related issues. Some of the additional work was implemented but faced a lot of performace issues due to some underlying issues which need to be worked upon from scratch and form the core of the musical functionality inside the project. I will try to fix them in the near future.

Important Links:

The End?

I'd like to thank:

All my mentors: Devin Ulibarri and Sumit Srivastava, who took the pain of almost 'teaching' me music from scratch, Walter Bender whose insights saved hours of struggle with the code and Vaibhav Aren, for valuable code-review and regular feedbacks.

My fellow GSoC students, Saksham Mrig and Anindya Kundu for efficiently coordinating parallel work and providing valuable help at times and all the community members.

Looking to contribute more, however I can.

Lastly, Thanks to Google for organising such a great program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment