Merge Songs

The code was changed on my scripts page too.

Beatslaughter’s front end GUI (scroll up, download it) has the latest versions of everything.

Good times.

Do you have a environment variable “OS” defined? It Looks for this one to find out, if it’s running on windows and chooses another way of deleting files. the actual frontend.exe wasn’t changed, but the run button disables, as long as the script is running and enables again, when it’s finished currently.

That’s weird… Line 140 is the else { } condition of the windows patch, you are bypassing:

  
if (isset($_ENV['OS']) && strripos($_ENV['OS'], "windows", 0) !== FALSE) {  
 // Windows patch for buggy perimssions on some machines  
 $command = 'cmd /C "rmdir /S /Q "'.str_replace('//', '\\', $dirname).'\\""';  
 $wsh = new COM("WScript.Shell");  
 $wsh->Run($command, 7, false);  
 $wsh = null;  
 return true;  
}   
  

Can you put

  
echo "My Environment: " . $_ENV['OS'] . "\n";  
  

one line above the if { } statement and tell us what it says?

That’s weird, it’s a standard define from MS. You can also try running the *.cmd file in the php dir for a phpinfo.txt. Maybe we can find some hints there for the collision.

Maybe join IRC for a mom, conner_bw is here too.

It is definitely smarter, but i keep everything in the same file to not have to answer questions about includes for newbies, etc. There’s enough problems supporting this as it is… :)

Could you try to replace the xrns-sf.exe with the one linked below. Maybe it will fix your problems.

Haha, some of us don’t have the privilege of using the GUI (i.e. linux and OS X users) and we need to call the script from locations other than root when traversing the file system. (i.e. ~/bin/ is in my path, but not in my php include_path) Includes would need to be set in the php.ini include_path under this condition, which isn’t difficult, but i’d rather not support that option.

In terms of a stand alone, encapsulated app, it should be partitioned as you suggest so that developers could reuse the code easily. I’m not against this, but the code should be forked for this purpose.

Good times.

@Bantai

My guess is that the slew of errors you are seeing is caused by running php on a different hard drive than your libraries. This happened to me at work on windows. My php.ini had /path/to/lib directories that would fail if I ran from U: drive because the libs were on C: - running php from u wold look for U:/path/to/lib but there was nothing there. You have to massage your php.ini i think.

I’m pretty sure, that this is a php problem of some sort. My app is calling the version included in the distribution and passes the -n switch, to not parse any *.ini files from php. In that second version i’ve unset PATH and PHPRC for my process, just to be sure it’s not due to conflicting environment variables.

I’ve reuploaded a new temporary version, which displays a message box and shows exactly which php.exe was called and what parameters where passed to it. The php.exe path should be the one in the dist, does that differ there?

And i have no idea, why your php env array is empty, in the php info you’ve sent me all variables were set, maybe from another php version?

To me it seems there is still something left, which relates to your other installed versions, or maybe you’re running my program with lower windows permissions?

After a long debugging session, we’ve finally fixed the collision. Bantai is a happy user now. :P

Download

This is so amazing! Great work guys! You can not belive what this means to me… There’s no words for how happy I am right now. F*ck Ableton Live!

Thank you!!! :D :D :D

VstiProperties was changed to PluginProperties between Renoise 1.8 and Renoise 1.9.

A fix which compensates for this change was checked into CVS.

RenoiseSong8.xsd was checked into /schemas/

I have just discovered this.

It is truly excellent!!

I used it today for the first time and it works perfectly…

I have a question though…

When you merge two songs, obviously there remains only 1 master track. How are the plugins on each songs master tracks dealt with? Are they both included on the new song created, or is it just the stuff from the first song?

Great work on this.

Original specification by Foo?:

The arrangement would be simple: You have file1 and file2. File1 is the selected host and file2 is considered as the import. The master effects of the host are retained. In the merge process the respective file2 amount of new channels and sends are made after the file1 channels and sends. All automations and send addresses are re-ordered to accommodate the file2 data. The pattern data from file2 is appended after the patterns of file1.

A decision was made that it doesn’t make sense to try to merge two master tracks into a single master track. PHP wise, it’s theoretically possible to change the script to append the second master to the first, but since the master track is reserved for the final mastering chain, fudging two masters together usually leads to horrible results. After thinking about it for more than 30 seconds, I foresee problems inserting master track effects from song 2 into song 1… So maybe it won’t work after all.

Thus, master track of song 2 is dropped, master track of song 1 is kept.

Like the other links in this post the link gives you a ogg file.
Couldn’t make this work with xrns 2.1 files. It doesn’t create the destination file (although it always says "Script finished succesfully). Will this be updated for renoise 2.1?
Would be very useful.

@Uffe

The XRNS-PHP scripts are consolidated here (and have been for many months now):

http://xrns-php.sourceforge.net/

They work fine with 2.1 modules.

Thanks. I downloaded the scripts there.

I get

Warning: DOMDocument::schemaValidate><: element this is not expected. in c: on line></:>```  
  
a few times and finally:  

Error: XML is invalid!

  
Don't know what it means.

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”