libxmp mod music player

About Monkey 2 Forums Monkey 2 Projects libxmp mod music player

This topic contains 26 replies, has 6 voices, and was last updated by  Ethernaut 9 months ago.

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #5343

    codifies
    Participant

    I like mod’s (probably my age!) I saw one of the first trackers to be released on the Amiga and was amazed… had a soft spot ever since…

    I’ve not wrapped the whole library, but it should be cross platform as it compiles completely using mx2 and doesn’t access sound hardware or even a library, instead delivering on demand x samples which you can use to ram down the throat of SDL’s sound system (not tried but should work with OpenAL too) – might even work with emscripten…?

    I’m posting it here as I’m off away soon, and don’t even know if there is enough interest to make it worth completing (a fair bit of the functionality is in, but I’m scratching my head at the moment about wrapping arrays of stucts inside structs)

    If there is sufficient interest I would be quite happy to complete the wrapper and after document it, submit it for consideration.

    enjoy!

    #5344

    codifies
    Participant

    *sigh* bare with me, I’ll upload it somewhere….

    #5345

    codifies
    Participant

    http://bedroomcoders.co.uk/tmp/xmp.tar.bz2

    btw it does IT and s3m so plenty of channels not just stuck to 4!

    #5347

    codifies
    Participant
    #5369

    Pakz
    Participant

    I am interested:) I still use modplug tracker for music production sometimes. And there are so many good modules out there.

    #5371

    AdamStrange
    Participant

    Brilliant work 🙂

    #5372

    codifies
    Participant

    @adamstrange ta 😉

    @pakz I’ll most likely have a squint again when I get back off my jollies…

    #5373

    Pakz
    Participant

    I remember playing with replay routines on the Amiga. They were not that big in size but I never learned how they worked. I was able to create exe’s that played a mod that stopped after a mouse click.

    #5380

    AdamStrange
    Participant

    throwing something in the ring here:

    As we now have the complete source (that isn’t a dratted monkey module). it would be possible to reverse engineer the xml player and write a soundtracker.

    quickly looking at the source there is base support for 2-pole filter, reverb and chorus

    It also says that there is no restriction on number of playable voices. so in theory we could have unlimited voices playing at once, which is similar to how blitzmax operated.

    Now. Given all of this. it would (in theory) be possible to create a very flexible cross-platform synth/sampler with all features you would expect?

    #5389

    codifies
    Participant

    in principle yes, there is actually not too much complication, but if you wanted to make a complete tracker it would probably be fairly time consuming, while many of the “mod” formats are documented (to various levels) it would probably be better to create a custom format.

    The place to start would be to write a multi channel mixer/pitch bender… SDL makes it reasonably easy, as it provides a callback when it needs a new buffer, (see the callback in the demo)

    anyhow bed soon and away for a little while

     

    just to mention if you run in debug mode you’ll get a seg fault, tried to pin it down with gdb but its corrupting stack frames so difficult to see, “seems” ok in release mode, but I’ve even seen behaviour like that with and without gcc’s -g switch so I’d lean to there being some issue for sure…

    might look at the “full” libxmp (as opposed to lite) source when I get back…

    #5392

    Mark Sibly
    Keymaster

    > just to mention if you run in debug mode you’ll get a seg fault

    This could be because the SDL callback happens on a different thread and mx2 is not threadsafe. This’ll probably also cause problems in release mode depending on what the code does.

    #5487

    codifies
    Participant

    so there is no way to safely use the sdl callback?

    I assume then that openAL is the way to go?

    #5504

    codifies
    Participant

    here’s an OpenAL version (sdl mutter mutter bag of bolts mutter mutter)

    which doesn’t need to be thread safe…

    because of a struct array inside the channel info struct I’ve had issues getting realtime feedback for the channels – its probably not worth taking too much further…

    enjoy!

    #5770

    AdamStrange
    Participant

    can I have the other sources as this one wont compile 🙁

    #5771

    codifies
    Participant

    what other sources? and won’t compile gives me no clue with which to help you…

Viewing 15 posts - 1 through 15 (of 27 total)

You must be logged in to reply to this topic.