News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_mr_lou

Requesting feedback on music conversion process

Started by mr_lou, 17:17, 13 April 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mr_lou

I am a musician who enjoys making tracks in multiple filetype versions. Apart from the classic MP3/OGG rendered version of my tracks, I also try to make a 16-bit 12-channel XM and an 8-bit 4-channel MOD version available. I even make 2-3 MOD versions, in different filesizes and qualities, trying to please everyone. Amigadevs are particular difficult to please regarding channel use and max filesize.

Depending on whether I managed to keep the filesize down or not, I may also make a Super Nintendo compatible version.
Other versions include MIDI, or MIDI+SF2. I even made a Sega Genesis version of one of my tracks a while back.

All of this effort spawns from a passion of wanting to support homebrew devs on the classic platforms - any classic platform.

But what's that I hear you say? What's missing, you say?

Ah right. The Amstrad CPC is missing from the list. How could I forget the Amstrad CPC?

Of course I didn't forget the CPC. It's been on my mind for ages, and I've wondered a lot about how I could include the Amstrad CPC in my list of target paltforms.

The only reason I manage to make so many different filetype versions of my tracks, is because there are many handy tools that does most of the work for me.

2MIDI from Un4Seen does a great job converting my XM into a MIDI+SF2.
Timidity is excellent at converting XM to plain MIDI.
SNESMOD is a great tool that lets me convert my XM to Super Nintendo.

And although Arkos Tracker 2 does actually have a MOD import option, it leaves way too much work afterwards. So that hasn't been a solution for me. It has to take much less work in order to be attractive.

So, for the past couple of weeks I've been looking into my own little tool to convert my MOD version into an Arkos Tracker 1 version. The idea of course, is to be able to add the Amstrad CPC as a target platform from now on. Maybe even also convert a few of my previous tracks.
And now I'm ready to present you with an example of such a conversion. The very first test.

I'm curious to hear some feedback, to figure out if it's worth the effort.
Is this an acceptable conversion?
I'm noticing a rather large filesize of the AKS file. Is that a problem? (Am I doing something wrong in the conversion?)
Any advice and feedback welcome.

Check out my track "Cheery Adventure!" here: https://indiegamemusic.com/6128

Thanks for helping out.


P.S.: The track ID (6128) in the URL is purely coincidental clearly a sign from the Gods that we are blessed and destined to have more CPC music in the future.

McArti0

CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

mr_lou

Arkos Tracker 1 (and 2) AKS format is an XML. So yes, it's a text file. You can load it in Arkos Tracker 1 and 2.
https://indiegamemusic.com/diskspace/mr_lou/CheeryAdventure.aks

Alternatively you can listen to the mp3 preview:

Skunkfish

I think it sounds fantastic and true to the original version. I'm no expert on Arkos Tracker, is it difficult to get it playing on an actual CPC?
An expanding array of hardware available at www.cpcstore.co.uk (and issue 4 of CPC Fanzine!)

mr_lou

Quote from: Skunkfish on 19:11, 13 April 24I think it sounds fantastic and true to the original version. I'm no expert on Arkos Tracker, is it difficult to get it playing on an actual CPC?
Thanks for the positive feedback! :)  I have no idea whether this particular track is easy or difficult to get playing on an actual CPC.
All I know is that, theoretically, by sticking to Arkos Tracker 1, it should be easier to use with cpcTelera and the cpcTelera native tools.

But the filesize is rather large, and I'm not sure why. Maybe I'm doing something wrong.
If I load it with Arkos Tracker 2 and save it again, it become much much smaller.

Maybe @Targhan has some insights.

I'm also curious about how to calculate actual filesize.
Like, when doing Super Nintendo music, the demo SPC is always 64 kb, and that's not interesting to devs at all. They'll want to know how much the compiled version of the music uses. I'm guessing CPC devs would wanna know somewhat the same. Is there an easy way to calculate or see that somewhere?

Targhan

You shouldn't bother about the file size of the XML file. AT1 has a very verbose one because the serialization of the objects in C# takes way too much data than necessary (but it takes about two handy lines of code!), contrary to what is done in AT2. What matters is that the real export to binary, and don't worry, this one is optimized.

> I'm guessing CPC devs would wanna know somewhat the same. Is there an easy way to calculate or see that somewhere?
It's hard to calculate with hindsight. It depends on how long the song is, how complex are the effects and tracks, etc. Simply export the song to binary and check the size.

As for the conversion tool, I for one believe that you should start from scratch for every target to use the specificities of the target machine, but yes, it's more work. Maybe use a MOD import to get the structure and notes, and that's it. But then I don't compose for several targets, so...
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

mr_lou

Well I've found that cpcTelera utility cpct_aks2c doesn't wanna work with the AKS file, and Arkos Tracker 1 won't load it either. (I only tested with Arkos Tracker 2, because I'm on Linux and AT1 doesn't work there).

So something is wrong with the XML, and I can't figure out what. Comparing with the hand-edited AKS from when I converted my AT2 track to AT1 for "Light Grid", I'm so far unable to spot anything wrong.

As for filesize of the AKS, I forgot that it's usually zipped. That of course helps a lot! :D 
It might also maybe be part of the reason why cpct_aks2c and Arkos Tracker 1 won't work with it? So trying with 7z and zip but it's not helping much yet.

Does anyone know if cpct_aks2c and Arkos Tracker 1 are supposed to work with unzipped AKS files?

mr_lou

One thing I'm missing in my XML compared to the Demo song from Arkos Tracker 1 is this:

The Demo AKS file with Arkos Tracker 1 has a ton of this line:
<Track xsi:nil="true" />

Like just 494 of them in a row. I assumed it served no purpose so I left them out. I also have no clue why there are 494 of them.
Do they serve a purpose? I'm guessing they do, since at this point, it's the only difference between the AKS files that I can spot.

mr_lou

I figured it out: Don't use 7z or zip. Use gzip.

cpct_aks2c converts it fine now, and reveals that the actual size of the music is 6533 bytes. So that's of course the filesize to report at the site.

http://indiegamemusic.com/diskspace/mr_lou/CheeryAdventureAT1.zip

eto


mr_lou

Quote from: eto on 13:07, 16 April 24Nice tune! :-)


Thanks! :)

@Targhan Can you confirm, that pitching (in Arkos Tracker 1) is adjustment of period?
So if I play period 478 (Middle C), and adds a pitch of -27, then the tone will be a C# (period 451), right?

Targhan

Quote from: mr_lou on 17:53, 17 April 24an you confirm, that pitching (in Arkos Tracker 1) is adjustment of period?
No, else the pitch would be too fast. From memory, I believe the pitch is divided by 4.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

mr_lou

Quote from: Targhan on 08:42, 18 April 24
Quote from: mr_lou on 17:53, 17 April 24an you confirm, that pitching (in Arkos Tracker 1) is adjustment of period?
No, else the pitch would be too fast. From memory, I believe the pitch is divided by 4.
Doesn't add up...

If I play period 142 (A - 880 hz). and call a pitch -1 in the next 6 rows (meaning 6 times -1), then it sounds close to period 150 (G# - 830,6 hz).
So it's clear that 1 pitch does not equal one period.

From period 142 to 150 there's 8. But pitching down 8 times with -1 results in a too low tone - not a G#.

But "divided by 4" doesn't sound right either. If 6 pitches is close to true, then 1/4th of those will be too little.

I don't suppose the source code is available somewhere?

Targhan

Quote from: mr_lou on 14:18, 18 April 24call a pitch -1 in the next 6 rows (meaning 6 times -1)

No, because don't forget a row lasts SPEED times. The player source is in the package since day one :).
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Targhan

Line 721, division by 4, as I remembered.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

mr_lou

Quote from: Targhan on 14:31, 18 April 24
Quote from: mr_lou on 14:18, 18 April 24call a pitch -1 in the next 6 rows (meaning 6 times -1)

No, because don't forget a row lasts SPEED times. The player source is in the package since day one :).
Ooooh.......

So a single pitch of -1 for a row is actually called SPEED times?
(This applies to MOD for commands 1xx and 2xx too, but not E1x and E2x - those are only applied once per row).
Alright... lemme see if I can make that fit somehow then.
Thanks

mr_lou

Well, my little converter tool is progressing slowly.

I have converted another track of mine: "Bottled Bubbles" - https://indiegamemusic.com/5852

The zip file containing the Arkos Tracker 1 version also contains an Amstrad CPC DSK file with an executable preview, so you can listen to it on your Amstrad CPC (or emulator) to hear how it sounds like, and as a kind of demonstration that the track does actually play on a real CPC.




The two DSK files are attached here for your convenience. Feedback and suggestions are welcome!

If anyone is asking "What's the point of all of this?", the answer is simple: It is merely to provide music to CPC gamedevs. Hopefully inspiring them to get busy coding some (more) games.
Have long wanted to make more CPC music, and this little tool makes it easier for me to do so. Simple as that. I hope someone out there will appreciate the effort. (I also hope other CPC musicians will post their tracks to IGM).

I should also mention licenses briefly, since many people tend to completely overcomplicate those. Licenses are simple: Tracks might be available with a freeware license. That means you may be allowed to use the track completely free of charge - provided your game is also available completely free of charge.
If you plan on making a little bit of pocket money on your game, then look for tracks available with a non-exclusive resale license. These tracks are available for use for a one-time royalty-free € 5-20 EUR.
Regardless of license type, you need to ask the authors permission to use the track(s).

Thanks to Targhan for the help so far.

mr_lou

Hm, for some reason it didn't include my screenshot, so uploading here.

Herman

Good work!
Thanks to Mr. Lou & the helpers here for sharing your background knowledge with us.

mr_lou

Made a new Amstrad CPC conversion of one of my tracks: "Happyland Quest" - https://indiegamemusic.com/5610

Amstrad CPC preview MP3:

(Apologies for the shitty slow webhost. It's been nothing but trouble for years. Should find a new one, just don't know who - and too lazy to move everything).

I'm also curious to hear from Amstrad CPC gamedevs: How many bytes (max) do you prefer a tune to use?

Powered by SMFPacks Menu Editor Mod