Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / MOD / XM support - Tier 1

Author
Message
n00bstar
20
Years of Service
User Offline
Joined: 9th Feb 2004
Location: Montreal, Canada.
Posted: 28th Feb 2020 21:29
Just so you know, I'm right up there in the bleachers (3rd row from top, three seats down...no other down....yes there) cheering for this project. AppGameKit definitely needs support for trackers! A part of me dies when my game data is 20kb of code, 500kb of graphics and 200mb of mp3

I've been tracking since the 80s and I'm sitting in a room with Amigas, Ataris, C64s and whatnot so if you need anything tested in detail just ask.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 3rd Mar 2020 00:50
Cheers for the support n00bstar.
I'm fully in agreement with you regarding the frivolous use of streamed music these days. Of course, the opportunity to fully integrate music into the game is lost with these simplified methods - just play and forget.

Your post did contribute to spur me on to do a bit more work on this and I've applied some new knowledge to the effects engine part and got the first 3 effects (1xx,2xx and 3xx) working 100% correctly now, rather than the convoluted way I was doing it before. Removed quite a bit of code in the process as well, so should be easier to understand.

There's really enough here now to show, but the code is still messy and needs a bit of a tidy. There's some more work to add the full song playback and sequencer (shouldn't be too difficult) as I only needed to play one pattern to test the process and effects.

Look out for a beta version shortly.

cheers


nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 3rd Mar 2020 23:43
Updated top post.
Added 5xx command
Started refactoring for beta release

I would say there's enough in there now to be a functional player (when the sequencer parts are done) without the more exotic functions.
Definitely will be enough to play most "standard-ish" XM/Mod for beta.

Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 4th Mar 2020 15:32
Today I installed XMPlay again and listened to some HVL (Hively Tracker) and others, Space Debris (MOD) and thought about XML and JSON. Why? ReNoise can create such files.
And I found that info:
https://www.renoise.com/tools/export-to-unreal

From what I understand, the ReNoise file format is XML based. I guess, ZIP with XML and the samples saved in OGG or so.
I don't know, how much I could do with the Demo of ReNoise, also it needs admin-rights for installation :-( so I will see.

Also somewhere is source code in C for Hively Tracker from HVLtoWAV. So I guess, it would be possible, to have maybe some 4k Byte files and "render" them to WAVE in memory or so.
Would work on the OUYA, I guess. Not the best way for an Android device, but with 1 GByte of RAM and only some MBs left on the flash for apps and game data from the 8 GByte, that could save "disk space". Don't know, how fast the ARM processor could render a complete WAVE into a memblock.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 4th Mar 2020 21:15
I dunno - seems like a lot of work to achieve. The export only gives you some song data in a different format.
I still think the real-time mode is the way to go, as you can dynamically switch channels, effects and receive custom sync events and all kinds of other benefits.

Also anyone using that ReNoise method is going to, well, need to have ReNoise to prepare the music file.


Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 5th Mar 2020 13:41 Edited at: 5th Mar 2020 13:42
Cool.

From what I understand, the UNMO3 libs are free, so they could be implemented into App Game Kit also nativly. They are not for playback use, but for decompression of MO3-files. And un4seen supports Android, iOS, MacOSX, Windows 32/64 Bit, Linux, so it would be cross-plattform.
http://www.un4seen.com/

Copy of the mo3.txt from the unmo3lib from un4seen


nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 5th Mar 2020 15:39
I've used the Mo3 stuff before. Doesn't work on everything and the ones it does work on usually need fiddling with.
It is also as you say not for playing but would still need something like BASS (or some other engine to play and the associated license)
I had been in contact with un4seen some time ago to get a clear picture of licensing for both AppGameKit to use it and also for my own use and distribution.

Of course it would cost TGC money to include it in AGK. I think it won't / hasn't been done because there's not the demand for it (most people these days don't care about 200mb+ of music when they could have the same for 500Kb.)

To be honest, it would be possible to use the MO3 stuff as a tool to "prep" the data used in my player and it would be playing OGG data instead of wave - quite easy to add support for it to my player.
The problem is the same as above then: it does break a few mods (some loops, retriggers or other effects). I did use it on that demo I did with the physics blocks jumping around to the music - 969Kb XM down to 439Kb as Mo3 without any defects.
I think it only compresses the sample data, as the pattern data is a byterun1 compression already.

Here is the feedback I got to my questions from Un4Seen in 2017. It meant I was able to use BASS in free stuff and also I could release my wrapper with the BASS dll included.



nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 6th Mar 2020 01:15
Dxx added
Song sequencer added

The Dxx command had me stumped for a while. It turns out that it takes a param (never used it or knew it existed) where D skips playback to the next pattern in the sequence as expected, but the param is an optional offset to start the next pattern on.
The crazy thing I found was that this is a decimal parameter (every other param is HEX). So typical of this format where maybe hundreds of people stacked their versions on top of the original

I also did a quick test to see if my timer stuff would work with < 50 fps - it does.
Because mods were designed to be called at the standard VBR rates (50fps) I coded the player to take a VBR parameter (almost always 50)
However, if your main game loop was 30 FPS for some reason, then you would never get a 50fps playback.

My routine will work fine at 50fps even though you may have a main loop at 30FPS. Simply call the player twice with the param 25.0 in your main 30FPS loop like:



As long as the total calls to the player allow it to get 50Fps timings, it's all good

nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
n00bstar
20
Years of Service
User Offline
Joined: 9th Feb 2004
Location: Montreal, Canada.
Posted: 11th Mar 2020 13:53
Just wait 'til you get to Exx. You'll have to recode all those functions again
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 11th Mar 2020 16:14
Yea, I've save that one as one of the last, as I'll be mostly gen'ed up then. Also, many of them aren't used very often - if at all.
A lot of them aren't too bad though.

Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 28th Mar 2020 07:02
@nz0
nice, to see you making progress. You are my hero.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 28th Mar 2020 17:32
I added Arpeggio today and it works well. However, I ran into this problem, which needs an AppGameKit fix to proceed
Let's hope that fixes are still being carried out......

AliceSim1
6
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 28th Mar 2020 21:16
I hope that the bug, which you have reported, is solved, so you can continue with the project.
I am subscribed to your Thread, because I am interested in seeing how it evolves and its progress.
We hope in the future, to play music MOD / XM / S3M / IT

I give a lot of encouragement and strength!
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 30th Mar 2020 22:51 Edited at: 30th Mar 2020 23:03
I have made a workaround for the bug by unrolling the small sample loops to be >256 bytes.
Here's where we are now:
This example is quite complex module and I have also added Amiga stereo separation @85% for this preview.
There's also a simple balance equaliser in effect.

I've also added a pattern visualiser so you can see what is playing / what effects are in use.



For anyone looking that doesn't know about XM / Mods, then this entire music is <200Kb and with the T1 player, it should work on all platforms natively.
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 6th Apr 2020 17:13
@nz0 is there source code, I missed? Would be nice, to try some MODs and play around with it.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 6th Apr 2020 20:32
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 10th Apr 2020 13:21 Edited at: 12th Apr 2020 10:17
I spent some time yesterday creating a Teir 1 plugin to play tracker files and I have it working for windows and linux. It will play XM, MOD, s3m, IT. In addition to the playback it allows us to get all the trigger events and play information inside of AGK. Its license free too. Seems to work fine on windows and linux but its only a day old and is still being test on a few machines are there may be bugs.

I'm currently looking at building it into the android player now as there are no plugins allowed on that platform. Building it into the windows player is also possible so no need for a plugin even.

KayDee
4
Years of Service
User Offline
Joined: 12th Feb 2020
Location:
Posted: 10th Apr 2020 16:30
To nz0...

Your links at the bottom of your post cannot be reached by me. I get the 'Do you want to leave Forum?', but then gives up.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 10th Apr 2020 22:50
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 10th Apr 2020 22:55
Quote: "I'm currently looking at building it into the android player now as there are no plugins allowed on that platform. Building it into the windows player is also possible so no need for a plugin even.
"


That was the original request ages ago. Better that this was incorporated into the player by TGC though. It's OpenMPT ?
AliceSim1
6
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 11th Apr 2020 10:13
Bengismo wrote: "I spent some time yesterday creating a Teir 1 plugin to play tracker files and I have it working for windows and linux. It will play XM, MOD, s3m, IT. In addition to the playback it allows us to get all the trigger events and play information inside of AGK. Its license free too. Seems to work fine on windows and linux but its only a day old and is still being test on a few machines are there may be bugs."


I can't compile, it gives this error:
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 11th Apr 2020 11:12 Edited at: 11th Apr 2020 13:02
You dont need to compile it...you can just run the exe file.

You can have the commands.txt if you wanted to try the plugin in your own projects. I will probably rename a few commands though as they aren't named well to start with.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Apr 2020 22:53 Edited at: 11th Apr 2020 22:53
You need to copy the plugin folder to the plugins folder in the AppGameKit folder ;
C:\Program Files (x86)\The Game Creators\AppGameKit Studio\Plugins
or
C:\Program Files (x86)\The Game Creators\AGK2\Tier 1\Compiler\Plugins
AliceSim1
6
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 12th Apr 2020 01:09 Edited at: 12th Apr 2020 01:10
I managed to recreate the file:
\Plugins\AudioPlugin\Commands.txt

Thanks to the AppGameKit plugin usage example:
\AGK2\Projects\PluginTest
\AGK2\Example Plugin\Windows
\AGK2\Tier 1\Compiler\Plugins\ExamplePlugin\Commands.txt


And it allows compiling with Tier1 AppGameKit for Windows x86 (32bits)


Put for Compile AG2, "Plugins" folder to:
\AGK2\Tier 1\Compiler\<Plugins>

\AGK2\Tier 1\Compiler\Plugins\AudioPlugin\Commands.txt

Attachments

Login to view attachments
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 12th Apr 2020 09:07 Edited at: 15th Apr 2020 23:22
Nice work but id of been happy to give it to you....

Here is an updated example as well as the full windows plugin folder including the correct "commands.txt" file and both the Win32 and Win64 versions of the DLL it can be downloaded here:

AudioPlugin V0.5

There are extra commands in this version (V0.5) and It also has a document listing of the commands and what they each do and what the arguments do.

Please let me know if there are any issues...it was only created yesterday so I was wanting to test it before actually giving it out. If anyone wants the linux version let me know as I have that working but the setup is tricky. I also have the windows player/interpreter with this built directly into it too now so DLL isnt really needed at all.

Happy Easter
AliceSim1
6
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 12th Apr 2020 12:57
It makes me very happy that it works so well !!
And you have good control!
Many thanks!

I really liked this return function: GetChannelVU
You can get interesting results for our games, it's fun


I would like the Plugin to be earlier for Android, before Linux.
My priorities are S.O: Windows and Android.
Later as secondary S.O: Linux and Raspberri Pi (Raspbian S.O.)




I have some suggestions to add more control:

Possibility of amplifying the volume, by double. For songs that have low volume, is it possible?
SetVolume(<float Vol> 2.00 = 200%

Features that do not exist and would be new:
Possibility of changing the volume output of a specific channel, thus being able to create volume effects at certain times on a specific channel. Also getting to mute a channel.
SetChannelVolume(<Int Channel NÂș>,<Float volume>

Play from a Order and Row,
It allows to reproduce from an exact point of the Order and Row
SetOrderRowPosition(<Int Order>,<Int Row>
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 29th Apr 2020 20:17
I also found that and saw, it has XM support. Maybe someone could "port" that somehow into AppGameKit, it AppGameKit would be to limited with some Audio-Buffer things.
https://www.raylib.com/index.html
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Apr 2020 05:12 Edited at: 30th Apr 2020 05:13
in case you need some motivation, nz0 :


nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 1st May 2020 01:32
That's a nice visual VM.
I could already do something like that with my previously released FMOD or BASS plugins.
This effort was about making a native tier 1 play-routine. However, if the plugin bengismo is preparing is cross platform, then there's no need for a native play-routine.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 19th Jul 2020 01:12
I saw this today, maybe we have to build that into AppGameKit as well for better playback.

Login to post a reply

Server time is: 2024-11-21 23:42:04
Your offset time is: 2024-11-21 23:42:04