don't click here

GenesisTracker Public Beta

Discussion in 'Technical Discussion' started by Andlabs, Aug 16, 2010.

  1. Andlabs


    「いっきまーす」 Wiki Sysop
    Writing my own MD/Genesis sound driver :D
    If you just stumbled upon here, click here.


    Ok so I have a birthday gift from me to all of you:


    I've been working for the past few months on a music tracker for the Sega Genesis sound chips for use in a sound driver I will eventually write. I'm here now with a feature-packed public beta. A lot of the functionality is present, though some things (such as New and Nearest Possible Timing) have yet to be implemented, while others have bugs. However, you can save modules and export to VGM and SMPS (though the SMPS export is the most unoptimized SMPS export ever). FM voices can be loaded in TFM and X3V format. The PSG voice format is just like that in FamiTracker. The only supported effects right now are 1xx, 2xx, and Mxx. 1xx/2xx are the same as in every other tracker (pitch slide up/down) and Mxx is a general miscellaneous (M00 is nop, M01 takes the PSG noise out of Channel 2 mode and silences both PSG3 and PSG noise), M02/M03 turns FM retrigger on/off. Timing is in XM format and DAC is always on (FM6 is always shown and will be saved but ignored during playback/export). There's more but right now I don't remember everything =P

    Hit the spacebar to start editing. (This works like MilkyTracker/FamiTracker; sorry IT/Mod2PSG/TFM/Modplug users.) Also this uses the keyboard layout used by everything except ModPlug.

    Note the TL Sensitivity field in the FM voice editor. Some people on #mod_shrine suggested this feature, which emulates a similar feature in Yamaha DX keyboards. Instead of simply modifying the volume level of the slots like every other sound driver, GenesisTracker will modify all the TLs by the amount specified. I provided a button if you want the regular behavior, but feel free to toy around with this feature and tell me what you think.

    Everything should be ready to go for Windows.
    The Mac build will run on 10.5 or newer Intel only and might require Qt 4.7 beta 1 if that's not somehow linked in. I will make a PPC build when Qt 4.7 final is released.
    The Linux build requires portaudio to be installed (obviously portaudio-devel if you want to build from source). 29MB

    Right now the source code is "don't use" because a) I need to replace the MAME FM core which is from Rob Jinnai's SMPS C demo b) IDK what license I want to use but I want a free software and/or OSS license.

    All the binaries are built for debug so if something fails please give me a crash log ;)

    Also the About box needs to be updated with more thanks, so as well as the thanks here, there, and in the source code, thanks to AamirM for providing the PSG core.

    Finally if you have a private beta the modules you saved with it will not work in this new version. Send them to me if you want them fixed.


    Oops, looks like —static-libstdc++ didn't work or wasn't passed... anyway add this to the win/ folder:
    <a href="" target="_blank"></a>
  2. theocas


    Tech Member
    Oh, I really like this! Is there any reason you're using Qt 4.7? I can design an application icon if you wish. Now, on to what I'm thinking of this:

    I like the general UI - It is very clean and not very cluttered. I like the general design of it. I have absolutely no idea about music, so an example project would have been very helpful, but it's ok. The only thing that annoyed me on Mac is that there is no menu bar at the top of the screen - You should probably fix that.

    Anyways, I'm gonna try to find a way to actually test it, but I wish you good luck with it.
  3. RamiroR


    Code (Text):
    1. [email protected] ~/Desktop $ ./GenesisTracker
    2. ./GenesisTracker: error while loading shared libraries: cannot open shared object file: No such file or directory
    That doesn't seem to be Qt btw. (For theocas)
  4. Andlabs


    「いっきまーす」 Wiki Sysop
    Writing my own MD/Genesis sound driver :D
    Before using PortAudio I was using the QtMultimedia API running on another QThread, and that was causing problems with 4.6's Carbon backend. Switching to the 4.7 beta, which used Cocoa by default, fixed them, though I had to stop using QtMultimedia because it wouldn't work on any Linux I've tried (and OpenAL blew up in my face).

    Feel free to, though that's not a very high priority for me right now so take your time.

    That was a deliberate design decision; had there been a menubar it would've only had two menus (File and Play) each with no more than 5 options, which is a waste.

    It is; take a look at the source.
  5. Spanner


    The Tool Member
    United Kingdom
    Sonic Hacking Contest
    Good to see that this actually fits on my screen in Linux now:
    I played around with it and right now it seems that only one voice would play and the rest wouldn't, then after the program would crash and exit.
  6. Tiberious


    Yeah, I'm furry. Got a problem? Oldbie
    Why the apparent hate for ModPlug? Maybe you might be able to make a 'MPT feel' mode that can be enabled through an option?

    Also, thinking it might be helpful to get 3XX to function properly (pitch slide to note). I use that alot more than I do 1XX/2XX.
  7. TmEE


    Master of OPL3-SA2/3 Tech Member
    Estonia, Rapla City
    T-04YBSC-A !
    98SE + KernelEx =

  8. Conan Kudo

    Conan Kudo

    「真実はいつも一つ!」工藤新一 Member
    If you are moronic enough to run Windows 98, compile GenesisTracker, Qt 4.7+, and PortAudio for Windows 98 yourself. Otherwise you're going to have problems.
  9. Andlabs


    「いっきまーす」 Wiki Sysop
    Writing my own MD/Genesis sound driver :D
    Apparently PortAudio on Linux is multithreaded and it was doing GUI functions on the audio thread, which Qt doesn't like. It's fixed in my code now. There is still a weird crash on program close that has me confused (the PortAudio thread stays alive after Pa_Terminate()? wtf?).

    I could probably add that as an option at a later date (first I need to think of a clean way to support the punctuation characters as well as just alphanumeric ones). I won't take out needing to go into edit mode as I often find myself wanting to play around with the notes using the keyboard even during playback; I hope you understand what I mean.

    I really have never understood how 3XX works (it seems to have different effects in different trackers?) but I'll see what I can do.

    That's a problem with PortAudio; I think it's trying to access something that doesn't exist on your system. I compiled the latest PortAudio with support for everything it supports except ASIO; you may have to do the same.
  10. nineko


    I am the Holy Cat Tech Member
    3xx is easy to use. For example, look at channel 9:

    Let's look at line 32 for an example. What does it do? It sets the target of the note slide, B-5, while the start of the note slide was already set on line 22 (A-5), and it starts the note slide, which will go on as long as there is a 3xx in that channel and no new note are played, or until the target note is reached. Therefore B-5 isn't played on line 32, but it will be reached somewhere between line 33 and line 34.
    Same on line 46: it says "hey tracker, I want to slide from E-6 to C-6, let's start here, with a speed of 10, we'll keep sliding for 3 rows until we reach the target note".
    Note that you're not guaranteed to reach your target note if you slide for too few or with a too low speed; on the other hand, you can start a slide from any frequency (e.g. a previous unfinished/untargeted slide).
    Finally, you can use 3xx in a different way, with a ridiculously high value such as 3FF, to get an "instant slide", effectively obtaining the same effect as E7 in smps, not attacking the next note. A "legato" of some sort, to say so.

    Re: different effects in different trackers, well no, 3xx always acts like this. You might have different behaviours in modules depending if they use the Linear Frequency Table or the Amiga Frequency Table, but this affects all the other pitch slides as well, and it's documented in the XM specs I sent you the other day.
  11. Ritz


    Subhedgehog Member
    Oh, this is awesome. Or at least, it would be, only the program gives me a runtime error every time I hit the Play Song button. Kind of a big deal.

    Once that's sorted out, I can't wait for you to tell me how the PSG works!

    Oh. I, uh, I guess I'll look into that then
  12. MaliceX


    hi i code and quack. Oldbie
    Talk about timing of taking these things up. First impressions, it's definitely working, but as yet still riddled with bugs. So far (testing the Windows port):

    -Deleting voices/samples from list does nothing.
    -Adding voices/samples works on file import, I'm guessing the blank adding functionality is still unfinished.
    -Song playback crashes with a MSVC++ runtime error.
    -Internal file browser opens very slowly, but browses fine afterwards.
    -Save As does not work, Save dialog does, however file save requires manually writing file extension. (Otherwise user might think file didn't save)
    -Export to VGM works, but requires manually adding .vgm extension
    -No idea how to play a banked DAC sample
    -Export crashes if there is a nonexistent instrument written in pattern. (At least, presumably)
    -Cut/Copy/Paste dialog makes appear what looks like a HIDE/SHOW menu option.
    -Effect 100/200 is literally 0 speed, rather than continue. This may confuse people familliar with XM/MOD effects.
    -PSG volume works. :O WOW. :D

    Other than that, this is certainly looking very promising. Will be keeping an eye on this, thanks for sharing! :D
    EDIT:: Quick test with what can be managed. Damn, having easy DAC import makes things epic.
  13. Andlabs


    「いっきまーす」 Wiki Sysop
    Writing my own MD/Genesis sound driver :D
    Yeah, I'm still thinking of how to design that feature (clear current or just outright delete?)

    Could you please elaborate?

    I belive that's related to the Linux error above. Once I get XM import finished I will build a new binary and see if the above fix fixed it there too.

    That's a Qt issue; there's little I can do about that. Sorry.

    Save As isn't in yet; it will be soon. As for manually writing the extension I have to figure out why Qt doesn't do that for me when using its own file dialog...

    Constant is DAC1, banked is DAC2. I should probably change the labels to CDAC and BDAC.

    Also I forgot to explain it before: my sound driver will allow mixing of two DAC samples: one in Z80 RAM ("constant") and one in a ROM bank ("banked"). So, for example, common drums like kicks and snares would go in the constant, while things like crashes, voice samples, etc. would go in banked because not every song needs them and/or not frequently. This has the advantage of not requiring two bank switches every time a new byte has to be read from the samples ;)

    Yeah I have to implement bounds checking...

    Selections will be the implemented later.

    Believe it or not I didn't know about this until some number of days ago when I was reading another tracker's documentation (or was it yesterday when I was reading the XM docs? I forget) and I first used it in a module today (with IT's Hxy, equivalent to XM's 4xy). I'll add that functionality in the next public build.

    Thanks for the input!
  14. MaliceX


    hi i code and quack. Oldbie
    Like, at the moment, importing a sample or patch with the other button works just as well without neding to add a new sample entry (then importing, with the replace box ticked). But it seems to be working. I'm not sure if it's related, but sometimes double-clicking to rename a patch/sample works for some, but not on others.

    Quick question, will it be possible to adjust DAC sample volume in a future revision? Couldn't help but notice how quiet it is compared to the FM channels, but it's definitely working. (Tends to work better with smaller samples, larger samples become garbled mess which could be a useful efffect :D)
  15. Andlabs


    「いっきまーす」 Wiki Sysop
    Writing my own MD/Genesis sound driver :D
    Oh, that other button is for saving instruments and instrument banks, not loading. I have yet to implement that.

    Unfortunately no, however if you're importing a 16-bit sample, my current code is dumb and won't do it to a high quality (so expect less volume and more noise). That will be fixed (it or something similar should be marked as a TODO in the code).

    Also right now I just mix the DAC directly in. Maybe I should send it to the FM chip core instead... I'll look into it in the future.
  16. Andlabs


    「いっきまーす」 Wiki Sysop
    Writing my own MD/Genesis sound driver :D
    Ok new build! 30MB

    New features:
    • Fixed the Play Song crash on Linux and Windows. There might be more crashes; if so please let me know.
    • 100/200 support.
    • 3XX support (with 300).
    • XM import. The import is rudimentary (don't try PSG noise or leave instrument names blank; they'll kill you) but effective enough to start. There is a drop-down for choosing which sample to grab from the XM; this will be implemented in the future and only available for DAC.

  17. MaliceX


    hi i code and quack. Oldbie
    Okay, tested so far:
    ---XM made with OpenMPT (via compatibility export) doesn't seem to import due to module header not 0x114. Have't tried with a MilkyTracker XM yet, but ugh.
    ---Play song works, very laggy however. (EDIT: Confirmed laggy realtime playback on both Win7 x64, and XP SP3 x86)
    ---Pressing Play Song repeatedly would double/increase the playback speed until the song ends/stops.
    ---Saving a song with a different pattern length will change back to 64, omitting anything past the 64th row.
    ---300 doesn't work properly (ie: notes remain 'stuck' to previous note instead of bending with previous 3xx value or legato?). 3xx works however. :D
  18. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    I love you forever andlabs.
    I've been working with TFM Music Maker for some time, combining it with seperate trackers working very hard to get tempos to sync up. For the most part, it worked, but was frustrating and time consuming.
    I've been waiting a long time for a tracker designed specifically for Genesis music. And now I can die in peace. I can't wait to try this out.
  19. SegaLoco


    W)(at did you say? Misfit
    Well, trying to run the first version, I got a SIGSEGV on line 31 of mainwindow.cpp

    Code (Text):
    1. 31&nbsp;&nbsp;&nbsp;&nbsp;module = Module();
    Trying version 2 right now, if the same bug persists I will say.

    Edit: Yup, same behaviour in v2.
  20. Andlabs


    「いっきまーす」 Wiki Sysop
    Writing my own MD/Genesis sound driver :D
    What happens if you build from source? We fixed it. Make sure you are running PortAudio v19. I need to find a way to make sure you're not linking it to v18...