Jump to content


Photo

Merge Songs


  • Please log in to reply
185 replies to this topic

#176 Beatslaughter

Beatslaughter

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2296 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:Music, Blu-ray, PC Games

Posted 05 June 2012 - 18:20

I have 3 GB ram here.
Thanks for looking into this issue. I've shared the folder with Beatslaughter too.


With default settings i was able to replicate the running out of memory issue and adding that memory size line to the PHP script didn't help either. I have found a solution it seems by making the PHP executable large address aware. Normally this is a compiler setting, but with this small tool you can patch the file yourself.

1. Download the small tool from the first post here: http://www.techpower...ad.php?t=112556
2. Pick the php.exe file in the php subfolder of xrns-sf as target.
3. Tick the checkbox which enables the flag and then press the save button.
4. Try the merge again and it should work.

If you're too lazy for all that, grab the appended php.exe and change the file with the one included.

Attached Files

  • Attached File  php.zip   29.72KB   195 downloads


#177 Drop Shadow

Drop Shadow

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 434 posts
  • Gender:Male
  • Location:Copenhagen

Posted 05 June 2012 - 22:31

I've applied the patch and updated the xrns_functions.php and xrns_functions.php to Conner's latest versions.

I tried it in three different scenarios.

1. WinXP 32bit 3GB ram.
Same issue.

2. WinXP 32bit 3GB ram - With 3GB switch enabled.
It was still not possible but I could see in the Task Manager that the php.exe now topped at around 1.5GB when processing the files (before the patch was applied it was 1GB). So it seemed it got further in the process. And it gave a different error report (still mentioning memory issues though).
Still, it stopped way before all available memory were used.

3. Win7 64bit 2GB ram.
Success! I also tried with some even larger files. Still success.


So, for some reason WinXP 32bit 3GB ram can't manage the job while Win7 64bit 2GB ram can.

In any case: Thanks for the effort. Using my laptop with Win7, I am now a happy merger.

#178 Drop Shadow

Drop Shadow

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 434 posts
  • Gender:Male
  • Location:Copenhagen

Posted 31 March 2013 - 01:45

I know this great tool isn't exactly maintained but anyways:

I've got this issue which is perhaps best explained by an example:
Let's say I want to merge song 1 and 2 (in that order).
Song 1 contain instrument numbers 00-09. So does song 2 (after merging, song 2's instrument will be reordered to 0A-13.

Song 2 consists of one track with 3 columns. In the third of these columns there's a note playing instrument 01 (0B after merge).
Now, in the first two columns of that track there will be inserted two 0A's in the instrument column.

So...
--- .. --- .. C-4 01
will after the merge operation become
--- 0A --- 0A C-4 0B
while it should be
--- .. --- .. C-4 0B

With complex songs, this means there will be lots of changes to the way the song sounds...

If there's a quick fix to this, I would be grateful if anyone would make it.

Edited by Drop Shadow, 31 March 2013 - 01:47.


#179 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7113 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 31 March 2013 - 04:12

Can you post two XRNS that I can use to duplicate the problem?

Thanks.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#180 Drop Shadow

Drop Shadow

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 434 posts
  • Gender:Male
  • Location:Copenhagen

Posted 31 March 2013 - 15:36

Two really simple songs here...

Thanks for looking into it.

Attached Files

  • Attached File  1.xrns   3.68KB   232 downloads
  • Attached File  2.xrns   3.68KB   227 downloads


#181 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7113 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 31 March 2013 - 19:18

Thanks for that. XRNS files to duplicate bugs are really really helpful.

The problem is as follows:

Old XSD (every version before 2.8)
<xs:element name="Instrument" type="xs:string" minOccurs="0"/>

Newest XSD (RenoiseSong37.xsd)
<xs:element name="Instrument" type="xs:string" default=".." minOccurs="0"/>

The old value was always "numeric" whereas the new value can be both "numeric" and ".." - I'm not sure if this is a bug/mistake in Renoise? Anyways...

The fix is to change line ~279 from:

if ($z->Instrument) {

To:

if ($z->Instrument && '..' != $z->Instrument) {

See this commit for more details. As I am shutting down XRNS-PHP I'm not sure how to get these changes to you. The best way is to change the code yourself until something is worked out. Or get comfortable with the command line and clone my new git repo, which I will be updating from now on.

Hope this helps.

Cheers.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#182 Drop Shadow

Drop Shadow

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 434 posts
  • Gender:Male
  • Location:Copenhagen

Posted 31 March 2013 - 23:59

Great. I changed the code and it works.

However, I've encountered a new issue.

When the second of the merged songs has a track in which a VSTi is AutoAssigned to a track, this Autoassigning will be changed, so that it will now be assigned to the corresponding track (meaning same track number) in the first of the songs that were merged.

See test examples and notice that after merging the sound output is now much louder because the original track dsp in song 2x is now no longer applied to the VSTi.

For test purposes, I've used the free VSTi dmihammer (also attached).

Hope this will help you in your "git repo" work.

And if you got a quick fix for xrns-sf too, I'm once again very grateful...

Attached Files


Edited by Drop Shadow, 01 April 2013 - 00:06.


#183 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7113 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 01 April 2013 - 00:26

Thanks Drop Shadow, xrns examples are awesome, you are my favourite user of the tool.

I will check this out and reply here soon.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#184 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7113 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 01 April 2013 - 02:57

Ok I found the problem.

The issue is that I cut and paste this code snippet verbatim a long time ago, but it never worked. Nobody has reported it as clearly as you did until now.

The fix is this diff. Or replace the old routing code with:

// AssignedTrack routings
foreach ($sx2->Instruments->Instrument as $x) {
    if ($x->PluginProperties->OutputRoutings->OutputRouting) {
        foreach ($x->PluginProperties->OutputRoutings->OutputRouting as $y) {
            if ($y->AssignedTrack != -1) {
                $y->AssignedTrack += $offset;
            }
        }
    }
    if ($x->MidiInputProperties->AssignedTrack != -1) {
        $x->MidiInputProperties->AssignedTrack += $offset;
    }
}

The code is on GitHub. Can you work with this?

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#185 Drop Shadow

Drop Shadow

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 434 posts
  • Gender:Male
  • Location:Copenhagen

Posted 01 April 2013 - 21:54

Once again good fix. I changed the code in Wordpad. It works great.

Re. Github: I'm really a simple user and know nothing about coding. So I look for the executable file and when I can't find it I don't know what to do. I should somehow execute the xrns_merge.php inside a GitHub program ... ?

Btw: found another bug.
When Song 1 doesn't contain any samples (it's either empty or all instruments are VSTi's) and Song 2 contain one or more sample based instruments, merging will fail with this kind of error:

---------------------------------------
Warning: mkdir(): No such file or directory in C:\...\xrns-sf-1.09\scripts\xrns_functions.php on line 88

Warning: copy(C:\Users\.../xrns_merge_55e65da6fd51f4be6a897391
b683b171_Track01//SampleData/Instrument10 (Hat-001)/Sample00 (Hat-001).flac): fa
iled to open stream: No such file or directory in C:\...\xrns-sf-1.09\scripts\xrns_functions.php on line 98
Error: File 'C:\Users\.../xrns_merge_af9b6dfbace3518aaf1cbf96b
42e8242_Track02//SampleData/Instrument00 (Hat-001)/Sample00 (Hat-001).flac' coul
d not be copied.

Try merging the two attached songs to produce the error.

Select 2y as the first song to be merged and it'll work!

Attached Files

  • Attached File  1y.xrns   4.54KB   240 downloads
  • Attached File  2y.xrns   18.98KB   199 downloads

Edited by Drop Shadow, 01 April 2013 - 22:41.


#186 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7113 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 03 April 2013 - 02:11

If GitHub is unfamiliar to you, Wordpad is fine.

Again thanks for the bug report. Amazing as usual. The fix has been committed here.

Basically look for:

// SampleData directory
if (is_dir($unzip2 . '/SampleData/')) {
    foreach(new DirectoryIterator($unzip2 . '/SampleData/') as $file) {

And change to:

// SampleData directory
if (is_dir($unzip2 . '/SampleData/')) {

    if (!is_dir($unzip1 . '/SampleData/')) {
        $ret = mkdir($unzip1 . '/SampleData/');
    }

    foreach(new DirectoryIterator($unzip2 . '/SampleData/') as $file) {

Hope this helps.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »