Tool Request: Merge Songs

Maybe I’ll be able to do it one day, but in the meantime, somebody else might want to have a go at this.

I believe there’s an extant PHP or .NET merge tool out there - I think I tried it once, long ago, and found that it worked but that it was relatively a lot of hassle. Now it seems like scripting can make it a fairly straightforward internal process! I guess it reads the chosen song, adds tracks and sends if necessary, loads VSTs, adds bypass commands on the last line of the last pattern of the current song forall DSP, resets all envelopes, then sticks the new song on and remaps all the instruments \o/ Sure, sample-heavy songs will turn into REALLY heavy merged multi-songs, but Renoise facilitates some amazingly efficient and slimline composition, so some cunning users could quite happily get a three hour liveset mashed into one huge song with a few tweaks to segue seamlessly between them…

I’m sure there are complexities, but if the people who did the external tools overcame them, any issues must surely be out in the open and maybe there’s even code available for some quick conversion to Lua ;)

Would anyone else use a tool like this? Does anyone fancy having a crack at making it?

[Edit - hmm, been thinking. IS it possible to instantiate DSP devices or VSTs on the fly with scripting? If so, cool. If not, I guess this tool would have to do all the XML-mangling, then save the result, then reload that song before it could be run. But that would still be cool, wouldn’t it? After all, you’d not want to be doing the actual merging on the fly, in a live situation :)]

Merging two songs is not currently possible.

You would need to have the ability to have two renoise.song() objects. This is not possible. It’s one renoise song at a time.

The PHP version does the job, for now.

EDIT: If you go out of your way to write code that manages external XRNS files in Lua, then sure it’s possible… But it doesn’t offer any advantages that the PHP version doesn’t have. It’s redundant to do this in the Lua API. (And not easy, there’s nothing like SimpleXML support in the Lua core)

Ah, that makes sense (even to me :)). But would you really need to be able to open two song objects? After all, all the relevant data is in XML and samples; couldn’t it just be parsed and added to the current object without ever being opened as a song?

Sure, the point is probably academic by now, but I’m curious…

[Edit: oh, now I realise that that’s what you were talking about in your edit…I think. Unpacking the zip, reading out the contents, storing samples into memory, blah etc.]