Skip to content

[DMP 2025]: Music Blocks 4 Program Engine #431

@pikurasa

Description

@pikurasa

Ticket Contents

Description

Music Blocks is a programming platform, and at its core is the execution engine
responsible for running Music Blocks programs. This project will focus on
building the execution engine and the necessary components to represent and execute
Music Blocks programs in-memory.

The project will begin by refining the Object-Oriented program syntax constructs.
These constructs will encapsulate the logic for each syntax element and will serve
as the foundation for developing a framework to represent Abstract Syntax Trees
(ASTs) for Music Blocks programs. Additional utilities will be built to manage
instances of these syntax constructs, thus completing the static pieces.

Next, several components will need to be developed to execute the program ASTs,
forming the dynamic pieces of the project. Key components include:

  • Parser: Responsible for parsing the nodes of the ASTs in inorder traversal.
  • State Manager: Manages the program state at any given point during execution.
  • Interpreter: Executes individual expressions and instructions.

It’s important to note that Music Blocks programs combine both imperative and
declarative constructs. Additionally, some instructions in the programs execute
over a time duration, and the programs themselves are multi-threaded. These threads
must run concurrently while ensuring proper synchronization.

We currently have a work-in-progress on
github.com/sugarlabs/musicblocks-v4-lib,
but some design decisions need to be revisited. This project will involve understanding
and refining these design choices and completing the remaining components.

Goals & Mid-Point Milestone

Goals

  • Collaborate with project maintainers to define all expected functionalities and
    behaviors, and write a technical specification.
  • Collaborate with project maintainers to develop a concrete execution algorithm,
    addressing time-based instructions, concurrency, and synchronization.
  • Refine and complete the static components responsible for program representation.
  • Refine and complete the dynamic components responsible for program execution.
  • Write comprehensive unit tests for all components.
  • Focus on optimizing runtime performance.

Setup/Installation

No response

Expected Outcome

No response

Acceptance Criteria

No response

Implementation Details

The following tools will be important to implementation:
TypeScript 5, Vitest, and Vite

Knowledge of how Music Blocks (v3) works is essential to proper contextualization. Please familiarize yourself with that tool from a user's perspective, creating a few projects that interest you: https://musicblocks.sugarlabs.org/

Mockups/Wireframes

No response

Product Name

Music Blocks V4

Organisation Name

Sugar Labs

Domain

⁠Education

Tech Skills Needed

TypeScript, Other

Mentor(s)

Mentors

Anindya Kundu

Assisting Mentors

Walter Bender

Devin Ulibarri

Category

Frontend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions