Flod – JS/AS3 Tracker Replay Libs

spacer

Flod 4.0 and FlodJS 2.0

Released: 1st April 2012

Flod is a set of JavaScript and Flash/AS3 libraries written by Christian Corti that can accurately playback lots of different Amiga, PC and Atari ST music formats natively. It supports the following formats:

  • FastTracker II XM PC + DigiBooster Pro 2.18 detection
  • The Ultimate Soundtracker (Karsten Obarski)
  • DOC Soundtracker 9, DOC Soundtracker 2.0
  • Master Soundtracker
  • Soundtracker 2.3, Soundtracker 2.5
  • NoiseTracker 1.0, NoiseTracker 1.1, NoiseTracker 2.0
  • His Master’s NoiseTracker
  • ProTracker 1.0, ProTracker 1.1, ProTracker 1.2
  • SoundFX 1.0, SoundFX 1.8, SoundFX 1.9, SoundFX 2.0
  • FutureComposer 1.0, FutureComposer 1.2, FutureComposer 1.3, FutureComposer 1.4
  • SidMON
  • SidMON II
  • Brian Postma’s SoundMon 1.0, 2.0 and 3.0
  • DeltaMusic 1.0
  • DeltaMusic 2.0, Delta Music 2.2
  • Digital Mugician
  • Digital Mugician 7 Voices
  • David Whittaker
  • FredEd
  • Jochen Hippel (regular and COSO formats, 4 voices only)
  • Rob Hubbard

Christian has spent a long time preparing this brand new release. Before this version there used to be FlodXM for FastTracker replay, FlodES for extended formats, FlodPro for an interface and all kinds of files everywhere. With this release everything is consolidated together at last. One simple point of entry, one great playback.

HTML5 / JavaScript Download

This is a JavaScript port of my AS3 Flod library, it currently works only in Chrome (I’ve used version
17.0.942.0 to develop it), hopefully in the future other browsers will add support for the Web Audio API.

https://github.com/photonstorm/FlodJS

Flash / AS3 Download

The ActionScript 3 version of Flod requires Flash Player 10. It only adds a tiny footprint to the final SWF size. On the github repo you’ll find the new version and all previous releases, including the old Flod Beginners Guide, Flectrum, Flym and more.

https://github.com/photonstorm/Flod

There’s a great tutorial on getting started with Flod/AS3 on TIGForums.

Flym

Flym is an Atari ST YM format music replay class. YM files are typically created by Atari ST emulators, and are raw register dumps of the Yamaha soundchip. There are lots available for download and most ST emulators can create them by recording the music currently being played in a game or demo.

If you need to play Atari ST music, this is the only way to do it (short of converting a 5KB YM file into a multi-MB MP3 spacer

What’s New

April 1st 2012

  • new David Whittaker player
  • new FredEd player
  • new Jochen Hippel player (regular and COSO formats, 4 voices only)
  • new Rob Hubbard player
  • added DigiBooster Pro 2.18 detection to the XM player
  • Delta Music 1.0, fixed wrong sustain value
  • Delta Music 2.0, fixed Warfalcons-Intromusik 2 crash
  • Delta Music 2.0, fixed wrong restart pointer
  • Digital Mugician, fixed sample loop pointer (fixes Hoi Level 4)
  • Future Composer (Flod only), 1.0/1.3 was using the wrong waves
  • SoundFX, fixed effect 7/8 [step down/up] (fixes Forever Tonight)
  • SidMON 2, fixed effect C/F [volume and speed] (fixes Cool Module)
  • SidMON 2 was processing effects at tick 0, it shouldn’t spacer
  • SoundMon, fixed buffer restore, most modules didn’t play at all
  • ProTracker/NoiseTracker fixed vibrato depth value not set at the beginning
  • Fixed and updated Flip/Unzip

Commercial Use License

The Flod range of classes were a huge amount of work, and as such if you plan on using it in a commercial SWF the author requests you make a donation (minimum of $5) towards the project. “Commercial” means anything that is going to make money. This includes (but is not limited to): Flash games seeking sponsorship, Flash games with MochiAds / cpmStar / or any other form of advertising, games you will upload to Kongregate or NewGrounds (if it contains their ads API), and all forms of Flash work sold to clients  / publishers.

If your SWF will not directly earn you money (for example using it for music replay in a demo) then you are free to use it without paying.

To obtain a copy of your license please make your donation (minimum of $5) by PayPal to: chreil at hotmail dot com – if possible include a link to your project (more for our interest in seeing how Flod is used than anything else). You will receive a license back by email.

Spread the word:

58 Responses

Leave a comment

  • spacer
    Phil Peron
    August 16th 2009 at 11:00 pm

    Wow. Just… WOW.

    I absolutely can’t wait to start playing with this.

    Thanks, guys!

  • spacer
    ding
    August 17th 2009 at 7:41 am

    Why call it amiga sound tracker music? What formats does it play? mod, s3m,…? They were played and composed just as well on PC!

  • spacer
    Richard Davey
    August 17th 2009 at 9:57 am

    No, it doesn’t play S3M, just .mod files – the vast majority of which were created on the Amiga, and exist because of the Amiga.

  • spacer
    Phil Peron
    August 18th 2009 at 4:59 am

    Got everything quickly wired up and working on my test game demo!

    Quick question… I noticed that the load method signature for ModProcessor (could be others as well) are quite different between v1 and the latest pro release. Do you recommend using one over the other? I opted for the package under FlodPro as it only required me to do the following:

    var mp:ModProcessor = new ModProcessor();
    mp.load(modResource.data);
    mp.play();

    And bypass using ModSong at all. Is this considered ‘best practice’ or am I missing something obvious?

    Thanks!

  • spacer
    sascha/hdrs
    August 18th 2009 at 6:45 am

    This is awesomeness in cans!!

  • spacer
    Christian Corti
    August 18th 2009 at 1:46 pm

    Hi everybody…

    ding: “Why call it amiga sound tracker music?”
    Flod is a replay routine based on the Sound/Noise/ProTracker software on the Amiga, it plays .mod only and it does try to emulate the real amiga hardware unlike most of the mod player out there.

    Phil Peron:
    You should use Flod version 2.0, the one included with FlodPro. The replay routine has been rewritten from scratch and is several times more compatible with weird mods and a little bit faster as well; and no you’re not missint anything… spacer

    glad everbody likes it, have fun spacer

  • spacer
    Christian Corti
    August 18th 2009 at 2:37 pm

    just a quick note, the license has changed from free for all to free for non-commercial use…
    If you need to use it for any commercial project you can either use Flod 1.0 or just contact me…

  • spacer
    Christian Corti
    August 19th 2009 at 3:17 am

    Any comments, questions, bugs report, ideas, features request:

    flod@neoartcr.com

  • spacer
    Porter
    August 19th 2009 at 7:49 pm

    Source code provided? that’s pretty awesome. I can’t wait to dig through this and see what’s going on. I’ve been very interested in working closer with sound in AS3, looking forward to checking this out, thanks.

  • spacer
    Paul Smith
    August 25th 2009 at 7:43 pm

    Without recompiling the .as file in the zip, is there any way to make the flodpro.swf load and play automaticlly
    I love the program but dont know action script yet
    downloaded flash cs4 trial but dont understand how to compile.
    Im a GLBasic man usually .

    Thanks

  • spacer
    Ringo
    August 27th 2009 at 9:05 pm

    Sweeeeeeet:)

  • spacer
    bm
    October 7th 2009 at 12:26 pm

    When I try to load a .mod file created in MilkyTracker into FlodPro.swf (the one included in FlodPro_v1.zip) it fails with

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at neoart.flod::ModProcessor/load()
    at neoart.flod::ModProcessorEx/load()
    at neoart.flodpro::ProPlayer/loadCompleteHandler()

    I guess there’s something wrong with the settings I use. Did anyone try and succeed?

  • spacer
    Richard Davey
    October 7th 2009 at 1:28 pm

    How many channels does it have? Flod only supports 4. Send me the mod if you like and I can test it here (rdavey@gmail.com)

  • spacer
    bm
    October 8th 2009 at 11:32 am

    That’s it, thanks.

    Problem was I assumed that unused channels don’t count, turns out they have to be removed (“Sub” button in Milky).

  • spacer
    Frank
    October 13th 2009 at 12:27 am

    I have exactly the same question as “Paul Smith” i would like to get rid of the file browser part and just play a .mod file wich is on the server. But my programming skills are 0, if someone could post a modified “Player.as” file i think Paul and me are very happy! spacer

    Very very cool!, i read someone is also programming an sid player in flash/flex wich would be really cool too!

  • spacer
    Frank
    November 1st 2009 at 7:36 pm

    Many thanks for the guide!! think alot of people will be very happy with it.

  • spacer
    Paul Smith
    November 8th 2009 at 9:08 am

    Thanks Richard for the beginners Guide, Excellent work.

    Frank hope you got it working ok.
    I used the “basic mod replay with flectrum.swf” in the beginner guide zip and renamed my mod file to “the_enemy_within.mod” and it works great.

    And now I’ve just go the source to compile with Flashdevelop 3.0.6 and FlexSDK (all free, but bit of a pain to get working )
    Let me know if you want help with this

  • spacer
    Francis Lillie
    December 15th 2009 at 10:57 pm

    Wow! What can I say apart from that? Up and running in my Flex engine in FlashDevelop in *minutes*, and works a treat. A fantastic bit of code and saves me the hassle of writing it myself. I was on the verge of digging out and converting my tracker code for the Amiga when a friend totld me about Flod. Massive thumbs up.

  • spacer
    Francis Lillie
    December 16th 2009 at 9:24 am

    I’m being lazy I know, but can someone point me to where a channel is triggered to play? I have an 8 frame Santa (2 frames for each limb) that I want to make “dance”, so need to change the state of each limb each time a channel is triggered. Cheers in advance.

  • spacer
    Francis Lillie
    December 16th 2009 at 9:47 am

    Ignore me. I’m. An. Idiot. Been away from this sort of stuff for too long.

  • spacer
    Fredrik
    January 29th 2010 at 1:00 pm

    You’re awesome Chris, finally I actually get a use for the countless hours spent in front of Soundtracker when I was a kid spacer
    Using the mod format is perfect for creating games with low filesizes.

    I’ll give you a initial donation when I finish my game, then a percentage of the income, people like you enhance the flash scene!

  • spacer
    Fredrik
    February 1st 2010 at 10:56 pm

    Hi again,
    Really enjoying this player. Not sure if this would be of interest to anyone, but I was thinking that many portals want just one self-contained .swf file, which means no links to mod files. I did a workaround for this by converting the mod file to a image, then you can just save this as a PNG and import it into your library. I also did a function to convert the bitmapdata back into the same byteArray as before. Here’s a example of this in use: www.flashbutler.com/modplayer.swf

    Let me know if you want me to put the source up.

  • spacer
    Christian
    March 2nd 2010 at 11:00 pm

    Thnx, Fredrik, just wait for Flod 3.0 spacer

  • spacer
    T.S.
    June 10th 2010 at 1:34 am

    Hello,

    Does anyone know if it’s possible to embed .mod into .swf file (in Flash CS4) and use it as a resource, rather than load it with URLLoader?

  • spacer
    Richard Davey
    June 10th 2010 at 11:49 am

    TS – You can only do this by using an Embed command, which means you’ll need to compile with Flex SDK instead of the IDE.

  • spacer
    T.S.
    June 10th 2010 at 1:56 pm

    Thank you Richard.
    I downloaded Flex SDK, added Embed directive and, much to my surprise, managed to compile swf inside Flash CS4. For a moment I thought I was going to have to move everything to new environment and re-code/design it all. Thanx again, finally finished that flash conversion of an old Amiga intro of mine. Good old times…

    Great work on the player, BTW. Amazing thing. Must say I wasn’t too interested in flash until I ran into flashtro.com site a week or so ago. Made me start learning AS3.

  • spacer
    rich
    June 10th 2010 at 3:00 pm

    Cool, glad you got it working. Give me a shout when your intro is up on flashtro.com (I love that site!) always keen to see what fellow demo freaks are up to spacer

  • spacer
    YopSolo
    October 15th 2010 at 10:17 pm

    Awesome ! thx a lot spacer

  • spacer
    Micheal MacLean
    October 30th 2010 at 3:20 am

    This code is AMAZING! I thought I would add to the fanfare before I ask a question:

    Is there a way to tell the ModProcessor WHERE to start a song other than the beginning? Like, being able to have multiple songs using the same samples in the same .mod to save space. I have been looking through the source of v2 and I don’t really know where this could be… the “row” variable jumps out at me, but I’m just not sure.

  • spacer
    focus
    December 12th 2010 at 5:01 am

    Thank you for FLOD, I used it in my little experiment with a sound visualisation:
    blog.codestage.ru/2010/12/09/snow/

  • spacer
    Zack
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.