You know programs like Anvil Studio and FL Studio 11 that let you create music tracks? My suggestion involves a miniature version of something similar built into the games code as a craft-able/place-able item, so that players can create small music tracks that can play with in a certain radius, just to put in houses or elsewhere. The functionality would be similar to that of the Music Boxes in Terraria, except you make the music yourself, and play it back using the item/station. (Example of Anvil Studio) What do you guys think?
Well there are already musical instruments in the game, which use the ABC format. I don't know about a way to create the files from in game, but I know you can play live using keyboard keys, maybe even MIDI instruments.
From what I've heard is that you can upload music and play it in-game. So technically if you make some music out of game and upload then that should give your desired effect.