🎵 📦 Music Box Editor 📦 🎵
Anthony_Tonev (99)

A simple editor for creating music box melodies with an animated music box that "plays" them for you.

Very basic:
Just click on the diamonds to generate a note and press play. There are some featured melodies included.

NEW: Create a BoxHub account and share your boxes:

The note sounds are from https://freesound.org/people/UbikPhonik/

Tech used :

Make sure you tune-up the box when first loading to cache the sounds and make sure they are loaded.

-edit notes
-play speeds
-save notes and load notes
-generate random notes
-tuning up the music box
-copy notes from sheet and auto-paste on next sheet
-add new block "+" and delete block "-" or press "++" to generate N blocks from input and "clear" to delete all.
-move notes with arrows
-toggle hold notes
-piece fast preview
-two blocks animating preview modes - show one block at a time or all blocks being visible while playing
-listen to the music only (radio icon) - remove all heavy matrix elements and generate a music output
-mixing notes - combine two or more pieces.
-build-in tunes: Ode of Joy, Twinkle Twinkle Little Star, Star Wars Theme, Jurassic Park Theme, Elf Song.

Bonus features:
--save notes to a database https://musicboxdb-2--anthony-tonev.repl.co/

My idea was to write an app that is simple enough to be beginner-friendly so anyone can learn to write simple music pieces without knowing complex note notations and also have an open-source note sharing system where users build melodies on top off or inspired by other users melodies.

Works best on a desktop with chrome in full-screen repl view.

I've added a guide that explains most of the stuff: https://docs.google.com/document/d/1VuNxjiUfA3SQPqONgDC-7V46lHGHZw3rfcvPiS7jNRI/edit?usp=sharing

Here are some gifs that try to explain the rest of the stuff:

Navigate on the block with the arrows or swap between adjacent blocks or cross between adjacent blocks (there were some bugs with these - most are fixed - there is one know bug where notes in perfect vertical line will merge when doing the cross matrix thing - but making holes on them will allow them to cross)

Mix different projects by chaining their notes together - very useful if you want to create a playlist or if you want to work in parts to reduce memory consumption.

Navigate from top to bottom when loading, previewing and editing by pressing the elevator buttons.

Radio player - Press the radio icon to generate the music and DELETE the blocks with their notes and editing panels ( they can be generated again via the load button). If all you want to do is listening to your creation then you don't need all that 15x15 matrix stuff - this mode is the player part of the editor.

The fast preview feature: Preview notes at 2x speed of the current delay value. After that, it will reset back to normal speed. Sometimes you will want to preview faster to find bad notes. In that case, you don't want to switch delay all the time - just included a button for it.

Change note delay type

Issues :

  • Lack of phone support.
  • Not working in Edge.
  • Adding and removing blocks is scrolling off.
  • Too many features - after hackathon deadline ends I will try to trim it a bit.

Huge thanks to ebest and vedprad1 for the amazing content they have created - I will not be able to compose such awesome music even if I'm using professional tools. Also greatly appreciate their and everyone else's issue reports and feedback. ay

You are viewing a single comment. View All
Mendelevium (42)

This is so neat. Wow

Anthony_Tonev (99)

@Mendelevium Thanks, I still enjoy creating simple melodies with it and then spend hours to come up with a name for the piece

Mendelevium (42)

@Anthony_Tonev, like you I am musical as well,
I have not had any time to play with it, but I am looking forward to it.
Where did you learn your HTML/JS skills?

Anthony_Tonev (99)

@Mendelevium I've studied 2d Computer Animation and started learning animating with expressions and scripting for After Effects to further enhance my skills. It was fun so I continued learning more programming by my self. I was hired to do an animation app and I still work on that. Working with js/html and node everyday for one year now.

Mendelevium (42)

Wow, @Anthony_Tonev! That is so cool!
I am a beginner in python, HTML, and Java Script.
Any advice for people trying to learn computer languages?

Anthony_Tonev (99)


Pick one main language and => {

Focus on algorithms and solve programming challenges from bunch of free sites online (try solving problems you've solved with two loops but instead with one loop);

Learn both functional and object oriented concepts (both are very useful in different cases - avoid "this way vs that way" opinions;

Learn math;

//The skills above don't build apps on their own but help you to think and find better solutions.

Very important - learn how to use JSON (it is an amazing data format and can get you far ahead);

But most importantly - have personal projects to help you learn. Include ONE technology or concept that you want to try out (like socket.io, or hosting on heroku, using a library, local file system, electron, using machine learning model etc.) Once you FINISH one project - it is finished when it can be used for its purpose and has no known bugs, then start another one but this time include ONE new technology or concept.

//Since 50% of programming is setting up stuff, reading documentations and debugging code that is not written by you - the idea here is that you get used to this.


Do this for an year -> archive all finished projects -> repeat the same process for another year -> collect second year projects in a portfolio

Mendelevium (42)

@Anthony_Tonev, Thanks!
my main language is python so this helps a lot.