Simple editor for creating music box melodies with an animated music box that "plays" them for you.
Just click on the diamonds to generate a note and press play. There are some featured melodies included.
As a bonus I have added a database - it's a separated repl because I don't want the player to load longer. My official submission is the Music_Box_Editor, the DB is just a storage for notes that I can't finds space for in the actual application.
To find more melodies or if you wan't to submit one to the database - click the button "MUSIC BOX DB". Fill the form to submit or press the magnify glass and copy the note data. Load it in the player - it will figure out the number of blocks and the type of the melody - but the delay is up to you (either use the optimal one suggested by the creator in the database post or the one you feel plays best).
The note sounds are from freesound.org.
Animations are created by me in After Effects and exported as SVG animation which is then played in the browser with the lottie player.
Make sure you tune-up the box when first loading to cache the sounds for better first preview.
-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
-two preview modes - show one block at a time or all blocks being visible while playing
-mixing notes - combines two or more pieces together.
-build-in tunes: Ode of Joy, Twinkle Twinkle Little Star, Star Wars Theme, Jurassic Park Theme, Elf Song.
note mixing feature user guide - paste notes on load input field and press +add -then put another one and another one and so on. Every time +add is pressed, load input field will be erased and the piece will be added in memory. When all needed peaces are collected - press mix'm button - this will merge all pieces together. Then all you have to do is press play - no load necessary.
--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 peaces 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 desktop with chrome in full screen repl view.
I noticed another problem:
I submitted a song into the database, and once I did, it appeared in the database.
However, it is not appearing now.
@vedprad1 Ok I have tested now - added one melody and I will see if it gets erased after the server falls asleep. I'm saving them to a file but maybe there is some update msg or something that the editor promps the app. I have closed all instances of repl editor. Thank you for the bug reports.
@vedprad1 After some testing - I've noticed data missing.. I have found an article stating that files are not being updated properly on the editor itself
I will figure out some firebase db backup I guess.
Added a firebase database - now everything is saved on the cloud where no data can be lost. I have removed the clumsy local database and I can even monitor the incoming uploads from the firebase console.
I'm so pissed that I've lost so much time on a data base integration which is not even a part from my submission because it is a separate repl, but what can you do... At least data can be stored.
Thanks again for point this out - I would have never figure out such problem existed since I've updated the app in the editor and thus "semi-manually" saved the file.
@vedprad1 there are 3 rules regarding posts -
1 Providing arranger name,
2 piece has to be ending with 'grand' or 'mini' - this is done automatic when played within the editor (tells player what size is the piece) but I've added it as a feature at sunday. Jurassic Park has to have ',grand' at the end,
3The third rule checks if the music has a proper notes format. I have removed the last rule now.
Just added 5 test pieces - seems to be working.
Wow! This is pretty good!
I probably just have one problem regarding this: The software is very hard to use on an phone or tablet, although you probably designed this for computer only.
If you want, you could add the following music into the collection:
Jurrassic Park Theme
Originally by John Williams
Arranged by @vedprad1
@AAnonymity Yes I don't keep boxes info - I plan to save the project into a database where I will keep the info for the number of boxes same as I do with the record collection.
For now the only way to load previous projects is with '++' button, on the left there is an input area where you can specify how many blocks you need and it will create that many boxes - then load peace.
I have yet to write documentations about these stuff...
I now see one more problem (sorry if I am annoying you):
I tried to enter the name of the original composer for a new entry, but the letters "Wang" were replaced with 4 Hearts.
@vedprad1 No problem - I'm happy for receiving issue reports.
Yes I saw your post in the DB monitor. The issue is that I've added a bad words checkers since I wan't to avoid disqualification if someone wants to add bad words in the DB for people to read hate speech. So I censor them with ❤️.
Yet a lot of names can mean a bad thing in eng. For instance the word "book" in my home language will appear like "k❤️❤️❤️❤️❤️".
For now I will monitor these stuff and will fix them manually. I will add the words for inspection somewhere in the db.
I've fixed the name of the author. Great piece by the way!
This is definitely one of the best so far. I think you've done a great job creating it and updating!!! Thanks for posting early and allowing us to follow your development.
As soon as I had something working I posted it. Not only to share development history (open source love) but also to gain free crowd sourcing.
That way people can point out issues and the ones that can do music can learn how to use it and add content.
It's not a generally good idea to post early - usually you would like to work on something private and keep an eye on the competition uploads. That way you know the height of the bar and you can surprise everyone with something amazing and they will never know what hit them. Also you keep your idea a secret.
However in my case - content is 50% of the whole thing. The early I post the better. And the issue feedback I get is pretty good - I would have called it done on day One if I never heard any complains.
Very cool. I think the number of rows should always be a multiple of 4, since most of the music we listen to subdivides into four.
okay you've probably won this contest
I'm a begginer, and I'm not exactly fluent in English (I've started learning English a while ago) but I dream of becoming a good programmer. I didn't know that a program so cool could be written like this. It was probably very hard to program, so I would like to say: Congratulations! Now I admire you.
@rodrigosm29 Thank you for your support. There are still 10 more days - I've build this basically in 2 , so there is still time for someone to write 5 apps like this one. There is still some fight to be had - I will try to tweak some stuff to put a fair fight. Only time will tell (and the judge).
Also I'm coding since 2 years so - I'm as much a beginner as any aspiring coder out there. I'm an artist and mostly animator. So I guess it looks kinda nice because of my artistic touch. However - the algorithm is the core any app - and I still have what to learn and what to improve. So I share the same dream too.
What if the community could ACTUALLY add musics? like if there was online storage for the music pieces?
@ebest I'm thinking about adding a firebase data base with a version control on your peaces - only the latest peace will be played when song is called and you can call early drafts of peaces if you want. I will see if it can be done simple enough - I want to avoid registrations at this point and nothing should be erased. The last part is kinda tricky but honestly songs are just strings - I think the free plan of firebase can handle enormous amount of songs and versions and I don't expect to get flooded with data (unless someone is willing to flood me on purpose }:D ). Also, I have to check how I can hide environment variables in repl.it - so I can hide the API key of firebase.
This is so cool. What gave you this idea?
@katyadee A music box that I had since I was a lvl 3 human. It plays a unique melody-lullaby that I'm still trying to find what it's called.
When hackaton theme was announced I thought I wanted to use the opportunity and record it's music then share it with an animated music box that plays the recorded audio. I've animated the box and proceeded with the recording.
But the recording I did was homemade. And it was not sounding like it was played by the cartoony box. Was too realistic for it to mix well with the character.
So I've decided to code a digital music box editor, then learn a little bit of music composition and then compose it's unique music box melody on it. I still have to train my music hearing but I will eventually play it. It's a very nice melody worth sharing.
@ebest In this game you get a tiny bit of XP every day and this is how you lvl up, but you can have a decent game time at any level. Some say that the real game starts when you reach lvl 22 because then you can decide to skip the tutorial stages or get access to better tutorial stages (academies, universities, courses). But honestly if you run the top tier class - the programmer class you can have fun at any level. At the current stage of the meta they can crush noobs even at level 10. So OP.
First song: THE FIRST SONG
Optimal delay: 300
When I made this, I noticed one thing when you load it up. If the song takes more then one block, you first have to add enough blocks for the song to fit in. This one takes 11 blocks! My suggestion is so that you can put the music code in the url.
London bridges falling up
Optimal delay is 200. 7 blocks required.
A classic: Ode to joy (Symphony No. 9) just slightly simplified to fit.
Optimal delay: 300. Blocks: 14
Any more songs to use?
@ebest wow, thanks alot I will add your song in the collection.
And yes that thing about loading them is not working well - it just loads notes. I have an object where I store notes, delay info and block count for community contributions. I will fix that to work the same way.
I will have to implement the url load for sure so I can make it like a community sharing thing but do you have any suggestions about a database maybe. I was thinking about firebase database where you just add a name and you get unique key plus that name and a version number if it's the same name - soma data about the song author etc. Or I can just make a node server and store them locally.
@ebest Yes I recognised them right away. I still think there should be the name of the person that added it as a box music. So I will name them like so : A. B. Gomme's "London Bridges falling down" by ebest.
BTW I have also added a button to generate n number of blocks (++ button next to load button).
Improved Ode to Joy:
@ebest I've added more notes - you can switch between 9 notes and 16 notes mode by pressing "more cowbells!/less cowbells" button. Old songs will still sound the same but now songs will also have a type - 'mini' for simple 9 notes one and 'grand' for 16 notes one. These are all the notes I could find - not sure if they work for all songs but at least they can cover more than before.
I have used a pack of sounds from freesounds.org that are named like so :
- I saw that some are missing, so I will try to find a pack with all notes - but this is very strange since this pack should have all notes from the box recorded. I guess it was not a note rich box.
@ebest it turns out I can - this is the code snippet
previewNote.currentTime = 0;
previewNote.volume = (volumeVal / 100);
//held notes part
previewNote.mozPreservesPitch = false; //something that does something
previewNote.playbackRate = 0.5; //the lower this is the longer the note will be heard
@Anthony_Tonev Finished! It uses all 16 notes.
@ebest wow - john williams, his jurrasic park score and starwars are the most recognisable - everyone can guess them.
btw I have just added the hold note - only 1 type for now - delay 0.4 and it activates when holding 1 right before clicking on a note. Just need to fix it in the load function.
@ebest load function is very primitive - not keeping it up with the new features. Load notes is just loading notes - it does not care for anything else. I will try to add it. On the button for community contribution it is updating the size. However it is recommended you switch to 16 first because you will need to tune the box anyway...
@ebest hold key '1' and press the note right away it will make a note 40% longer--it will be played but it does not work with load and move arrows yet, however it keeps it in save by adding a dot after the note coordinates. I plan to add more delay type although they seem very similar but first I will have to make some audio correction on the files because they have some amount of silence which affects the stretch or if I will edit them anyway I think I can make better long notes by adding sound effects on the audio file in audacity... I think this will be a better solution than roughly stretching it.
OMG! I would never be able to accomplish this! Good job! Keep up the good work and GOOD LUCK!!!