News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Prodatron

Arkos Tracker 2 - merging multiple songs into one file

Started by Prodatron, 15:12, 04 November 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Prodatron

Here is a Python script for merging multiple AKS files as subsongs into a new one:

http://www.symbos.org/files/aks_merger.zip

usage:
aks_merger.py [filemask for multiple input AKS files] [output AKS file]

Double instruments, arpeggios and pitches will be removed/reused.

I am not an XML expert, and the script is a little bit quick and dirty. E.g. it expects some XML elements at its current positions.
But at least for me it is working so far, so maybe it can be usefull for others as well.

I really like the possibility in AT2 to have multiple subsongs, which are all sharing the same instruments.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Targhan

Didn't test your script, but seems like an interesting feature. It's on my TODO list!
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

SpDizzy

Excuse me, may I have a little example about usage?
I'm trying to merge 2 songs: 'music1.aks' and  'music2.aks', into output 'music.aks''
What would be the correct notation? Have tried:

py aks_merger.py music1.aks music2.aks music.aks
And other combinations with commas on source files, between source and output,.. but in all of them script gives me same error:

Wrong arguments; use aks_merger.py [filemask].aks [fileout].aks

Sorry, I know it must be a nonsense but I'm not much used to Phyton or any programming lenguaje besides Basic and Z80 assembler.

Thanks so much

Prodatron

Please use

py aks_merger.py music?.aks music.aks
The script expects a single filemask for all the files which should be merged, not a list inside the parameters.

Does it work now?

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

SpDizzy

Ohh, thanks so much @Prodatron for the tool, and the quick response.
So question mark acts as wildcard, silly me.
I'm still having issues with sources not found.

Prodatron

Oh hm.
the AKS files are ZIPped XMLs?
Did it create something in a "/tmpaks" folder?
Somehow it seems, that the ZIP handling is not working currectly.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

SpDizzy

No "\tmpaks" folder.
I just use .aks songs, like seen on the picture above. Maybe they are not ZIPped XML? I dont know how to check that.
Obviously is a misuse for my side, will try again tomorrow, maybe I will be more lucid.
Thanks so much for your help.

Prodatron

Usually an AKS is a ZIP, which contains an XML (which has the same name like the zipped file).
Maybe you can send the two AKS files, you want to merge, to

jmika at prodatron dot net

so I can check, what's going wrong (I will not spread them of course).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

SpDizzy

Oh yes, sorry. Files are proper XML ZIPped Arkos .aks files.
I suspect the problem is on my side, because I also get same errors trying to merge .aks files provided by Targhan as examples in Arkos 2.
Hence if I rename 'Targhan - A Harmless Grenade.aks' to Targhan1.aks and 'Targhan - Hocus Pocus.aks' to Targhan2.aks (just to try with other songs appart from mine), the merging proccess gives same error.
I'm sure you can merge those files without problem.
If that's the case, something in my environment is the culpritt.
Thanks Prodatron.

Prodatron

Ops ok, you renamed the files, but in the ZIP there is still the old filename, which broke the script.

I fixed this, now it will just take the first file in the ZIP, which should always be the XML.

Please download the script again at:

http://www.symbos.org/files/aks_merger.zip

I wonder, if it will work now for you, too.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

SpDizzy

That's it!! Works like a charm now for my files Prodatron, many thanks!!
On respect to files provided by Targhan, and renamed by me, still a little problem (just in case you need to consider it).
Thanks so much!

Prodatron

Ah thanks for the hint! :)
I didn't test it with "A Harmless Grenade" and "Hocus Pocus", but I already see what's going wrong.
I will hopefully fix this soon.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Prodatron

#12
Pitch translation bug fixed:

http://www.symbos.org/files/aks_merger.zip

Let's give it a new try ;D
Should work now with Targhans sounds, too (I didn't test it with songs containing pitch table commands before).
Thanks SpDizzy for all the beta tests :D

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

SpDizzy

Working fabulously Prodatron!! Both with own files, and with Targhan's ones renamed.
Hey, I did something productive today   :laugh:
Thanks so much for the script tool and your time and patience  ;)

Powered by SMFPacks Menu Editor Mod