Merge Songs

Crap, you are correct. There’s a bug.

The problem is here:

  
// VSTi AutoAssignedTrack  
foreach ($sx2->Instruments->Instrument as $x) {  
 if ($x->VstiProperties && $x->VstiProperties->AutoAssignedTrack >= 0) {  
 // Renoise XSD, doc_version 4  
 $x->VstiProperties->AutoAssignedTrack = $x->VstiProperties->AutoAssignedTrack + $offset;  
 }  
 else if ($x->PluginProperties && $x->PluginProperties->AutoAssignedTrack >= 0) {  
 // Renoise XSD, doc_version 8  
 $x->PluginProperties->AutoAssignedTrack = $x->PluginProperties->AutoAssignedTrack + $offset;  
 }  
}  
  

It appears AutoAssignedTrack has disapeared from the XSD schemas (RenoiseSong14.xsd, RenoiseSong14.xsd)… Anyone know what happened to it and what is expected now?

EDIT: Ok, changing to the following resolved the immediate bug. I think this is the solution.

  
// VSTi AssignedTrack (or AutoAssignedTrack, depending on Renoise XSD)  
foreach ($sx2->Instruments->Instrument as $x) {  
 if ($x->VstiProperties && $x->VstiProperties->AutoAssignedTrack && $x->VstiProperties->AutoAssignedTrack >= 0) {  
 // Renoise XSD, doc_version 4  
 $x->VstiProperties->AutoAssignedTrack = $x->VstiProperties->AutoAssignedTrack + $offset;  
 }  
 else if ($x->PluginProperties) {  
 if ($x->PluginProperties->AutoAssignedTrack && $x->PluginProperties->AutoAssignedTrack >= 0) {  
 // Renoise XSD, doc_versions 8, 9, 10  
 $x->PluginProperties->AutoAssignedTrack = $x->PluginProperties->AutoAssignedTrack + $offset;  
 }  
 elseif ($x->PluginProperties->AssignedTrack && $x->PluginProperties->AssignedTrack >= 0) {  
 // Renoise XSD, doc_versions 14, 15, ...  
 $x->PluginProperties->AssignedTrack = $x->PluginProperties->AssignedTrack + $offset;  
 }  
 }  
}  
  

Please edit the xrns_merge.php accordingly and if it works, I’ll commit it to SVN.

Thanks.

It works! Thanks a lot!

Nearly. There is a list of routings from Renoise 2.1 on (we do support plugins with multiple outputs):

  
OutputRoutings  
 OutputRouting  
 AutoAssign  
 AssignedTrack  
  

See RenoiseSong.xsd -> “InstrumentPluginRouting”

Could someone explain to me how to get this to work on osX?

I’ve looked through the topic here, but a lot didn’t make a massive amount of sense to me.

I’ve downloaded the files, but opening the .cfgs in terminal just starts a merge, then aborts.

I couldn’t find how to specify tracks to be merged.
do I need php installed?
I thought osX has something like that installed by default?

Thanks in advance.

The CFG files are useless on OSX and you can simply delete them. Probably they were included by accident. There is a pinned topic here, which should explain everything for Mac users.

https://forum.renoise.com/t/xrns-php-using-bash-on-os-x/20468

Yes, please :)

i have to check out this merge thing

is it possible to merge more than 2 XRNS??

EDIT:just found out its not possible

How about using the output from the first merge operation with the next song? People get lazy these days. :P

yeah i just saw what i wrote and thought just the same as you about the lazines in my post :rolleyes:

Ok, I’m confused.

AutoAssign is a bool with a default of true. AssignedTrack is an int that defaults to -1. Does this means I have to do something like:

  
foreach ($sx2->OutputRoutings->OutputRouting as $x) {  
 if ($x->AutoAssign === false) {  
 $x->AssignedTrack = $x->AssignedTrack + $offset;  
 }  
}  
  

Is there a freeware OS X plugin that supports this kind of routing? I have never used it, so i’m coding this blindly at the moment.

I don’t know of a free plugin with multiple outputs, but:

  
foreach ($sx2->OutputRoutings->OutputRouting as $x) {  
 if ($x->AssignedTrack != -1) {  
 $x->AssignedTrack = $x->AssignedTrack + $offset;  
 }  
}  
  

should always work…

Fixed for Renoise 2.5 in SVN. Here’s the Diff

I have to ask, is the “foreach ($sx2->OutputRoutings->OutputRouting as $x)” code really necessary? None of the modules I generate have this… I see a lot of “$sx2->Instruments->Instrument->PluginProperties->AssignedTrack” which is handled in another procedure… But the whole output routing is still a mystery to me. Can anyone confirm it actually works?

maybe the first post can be updated with this link http://xrns-php.sourceforge.net/
I like the tune, but it’s not what you want when you come here.

I saw the XRNS-PHP scripts are on the Tools and utilities pages, but maybe it’s better to add a list of scripts it contains, this merge script is simply amazing!
but stays a bit under the radar this way I think just like some other scripts inside it.
Really great package!!!

Wow, blast from the past. Some inspiring community work happened here! Is this something that could be evolved into a modern XRNX tool?

I was merging some songs to prepare for a live performance a few weeks ago. The merge songs tool is great, but the routing for sends and things like signal follower get all mixed up. It seems to be based on a fixed and not relative index, so if something is routed to Send 04, it’s still routed to Send 04 in the merged song even if that send is completely different. Also, it doesn’t account for BPM or LPB changes - it would be nice to have the option to automatically put those changes as pattern effect commands on the master channel, for example.

It would be great to see merge songs recoded as a renoise tool! (Maybe I should try to learn how to do it myself…)

absolutely +1
on xrnx

This tool has been a life saver for me, but is starting to grow obsolete:(

I’ve patched up this tool for Renoise 2.8.

@see: Xrns-php

Regards.

Much appreciated! will these programs also re-appear on the renoise.com site? maybe I overlooked them but can’t find them anymore.
It would be a shame if some people can’t find these great tools.

Crud, just noticed this. Doesn’t work as I type. Will try to fix this in the upcoming hours.

I don’t think this will happen. These PHP scripts are getting less interesting for me to maintain so I’d rather not show them off.

Lua is the future for Renoise! ;)