Music API

Discussion in 'Plugin Development' started by maxben34, Nov 3, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    maxben34

    Is there an API that allows developers to add an mp3 or some type of sound file into their code. The API will then transfer the music into Notes that can be used by noteblocks and make the sound play in minecraft? I doubt there's anything like this out there... but I wonder if anybody would be interested in making something like this... :3
     
  2. Offline

    maxben34

    Nonono... Not like that. Something that transfers music into noteblocks within a program.
     
  3. Offline

    CubieX

    Interesting idea.
    But mp3 is not ideal for this. A MIDI file would probably work better, because extracting single notes should be possible there.
    Problem is: How to attach those notes to note blocks.
    The single notes have to be extracted from the MIDI file and stored in some list or map.
    And then the configured note blocks have to be placed by the plugin directly.

    This should not be impossible. But I've never seen something like this.
    If you can extract those notes one by one from a MIDI file or a custom data file you designed by yourself, you could at least create note blocks with the right notes.
    However, to get the timing of the song right, you would need redstone circuits, which makes it very difficult.
    So, Possible? Probably. Somehow. But challenging.
     
    The Gaming Grunts likes this.
  4. Offline

    maxben34

    CubieX
    Thanks for the response! I figured it was possible and someone should seriously figure out how to do this properly and make an API for this! (I would... But this is honestly way beyond me since ive only been programming for 2 months now).
     
  5. Offline

    blablubbabc

    Craftbook has something like this
     
  6. Offline

    maxben34

    Ill look into it but i doub that it is functionally sound.
     
  7. Offline

    Me4502

    CraftBook has a library built into it that converts midi files into note block format and plays it. It is 'functionally sound'.
     
    maxben34 likes this.
  8. Offline

    ccrama

    I know you don't want to use resource packs, but you could convert your music file to an OOG, put it as a note in the sound folder of the resource pack, and when that is triggered, you have your song. You might even be able to change the disk music with resourcepacks, but I haven't looked into it much. Just an idea
     
  9. Offline

    maxben34

    Thanks. I actually installed craftbook earlier today before you sent this message and got it working. Great job dude!
     
  10. Offline

    Minermax7

  11. Offline

    TryB4

Thread Status:
Not open for further replies.

Share This Page