Reusable MOD Player in Flash with full source code released :-)

Discussion in 'Announcements' started by Bad Sector, Aug 4, 2008.

  1. jetro

    Original Member

    Joined:
    Jan 21, 2005
    Messages:
    130
    Likes Received:
    0
    That might be a nice addition... If I remember correctly, MOD also had some weird problem that the note range was very limited, i.e. if you load a high quality sample into it, you can't play it high enough... that is, you couldn't give the "natural" playing rate for each sample at all. But you said you extended the note range? Also I think there was an arbitrary limit (64k?) for sample sizes? (haven't made a single .MOD in years, but have been making .XM and .IT files).

    If you want to make it with minimal effort: one could just compose a MOD with 8 bit samples, then save it with 16 bit samples, and then change the header with hex editor so your code would know that the samples are 16 bit. :)

    Sure the instruments make it better, but I think the single most affecting thing to improve audio quality will be the 16 bit samples. :) The 8bit stuff sounds very tingly because of aliasing problems, i.e. there's lot of high pitched noise or something.

    Sure, that's how it always goes.. I'm not demanding anything, just suggesting - besides, if I'd urgently need that stuff, I could always implement those changes myself (thanks for making source available).

    It's interesting that you mention a tool which would generate sound waves etc - that is, contain a softsynth for creating instruments. A few years ago I used system like that for some demoscene 64kb intros (nowadays people usually use the softsynths in realtime instead of generating a few samples). I have also thought it'd be ideal way to get lots of nice music in a downloadable game while keeping it small.

    There's at least one such tracker (including free player source) available, check out ProTrekkr: http://pagesperso-orange.fr/franck.charlet/protrekkr.html
    I think its synth sounds a bit weird at times, and the tracker itself isn't very stable either... but it's still nice. :) No idea how viable it'd be run that stuff in Flash though, probably even worse than making xm instruments or so.
     
  2. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    The MOD format stores the note periods (based on Amiga screen frequencies). Unlike some MOD players that convert periods to notes, mine uses these periods directly (this is why XM playback needs much more than a drop-in) because the MOD commands modify the periods, not the sound frequencies. As a side effect, if your tracker saved the MOD with notes with very low or very high frequencies (MilkyTracker can do that but issues an "incompatibility" warning), my player will be able to play them. I don't know about the sound quality though.

    HOWEVER, some commands are based on the notes themselves (so i *do* have to build a note table, i just dont use it for all commands), like arpeggio. Since i don't have the extended note-period table (i just didn't searched enough - also i think i can extend it manually), these effects with non-standard notes will not sound correctly (actually i think only arpeggio uses this...).

    Anyway, if you can build a MOD with 16bit samples, tell me so i can look more into it :). A hex editor isn't needed, just a little patching utility is enough :)
     
  3. abiallan

    abiallan New Member

    Joined:
    Nov 3, 2008
    Messages:
    1
    Likes Received:
    0
    Hi!
    The information provided was very useful!
    Thanks!
     
  4. tolik

    Original Member

    Joined:
    Sep 20, 2004
    Messages:
    1,407
    Likes Received:
    0
    So i wonder if latest adobe announcement of C/C++ to AS3 compiler will improve support of music formats ;) They talked about Orbis already...
     
  5. nathan3011

    nathan3011 New Member

    Joined:
    Dec 4, 2008
    Messages:
    3
    Likes Received:
    0
    Hey just wanted to say a Landlord Insurance thanks for this!!

    Its greatly aprpeciated my friend :)
     
    #25 nathan3011, Mar 18, 2009
    Last edited: May 6, 2009

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer