Xrns - Reorganize Instrument Notes


(vereiser) #1

This script reorganizes all notes in a song, so that each instrument will use a separate track. Typically XM modules triggered multiple instruments in the same track, which would complicate any further work in Renoise. So this script is for xm files converted to xrns only.

DOWNLOAD V.1.3 [final]:
xrns_reorganize_instruments_notes.php
xrns_reorganize_instruments_notes.cfg
class.xrns_reorganize_instruments_notes.php

>> Download here

THE SCRIPT IS FINAL AND IT IS WORKING WITH RENOISE 1.9. A VERSION FOR RENOISE 2 WILL COME SOON.
NOTE: THE INSTRUMENT SLOT 00 HAS TO BE EMPTY.

============================================================================
Original thread history starts here:

Because of my old xm modules, I’m coding a script, which reorganized the notes of an instrument to the instrument specified track. The main reason why I want to do that is the mixing of the instruments.

It’s not easy to code but the finalization, you will get soon.

Momentary I have a problem with the frontend.
I always get the error_message:
zend_mm_heap corrupted

Seems to be a memory problem.
Or is it another problem, beatslaughter?

Thanx. :)


Hilight Instruments In Pattern Matrix
Script Request: Reorganize Instrument Notes ...
(Beatslaughter) #2

This is coming from PHP and not the frontend. Tried to google the message and the net is full of it, but no definite answer on how to solve it. We’ve recently updated to PHP 5.2.5, which might’ve introduced something. You could try downloading an older PHP package and extract the two files “php.exe” and “php5ts.dll” into the php subfolder of the frontend, maybe it solves it.

Does the error only appear running script from the frontend or also when running it through the command line? Without having something to test with i can’t be of more help i’m afraid. Feel free to mail me at info AT … beatslaughter DOT de.


(vereiser) #3

I know, without a script, it is hard to find the problem.
I will test this day what I can do by myself to solve it, and if I can’t help me, I’ll send you the script. :)

Thanx for the quick answer.

The Renoise project is great.


(Beatslaughter) #4

One note, it seems people often run into this with nested loops, maybe you can avoid it by unrolling some of them.


(vereiser) #5

Now I have finished the PHP frontend script:
xrns_reorganize_instruments_notes

This script reorganizes all notes in a song, so that each instrument will use a separate track. Typically XM modules triggered multiple instruments in the same track, which would complicate any further work in Renoise.

Here you can DOWNLOAD the script:
http://www.vereiser.de/Download/xrns_reorg…ments_notes.rar

If there is an error, please contact me here.
Thanx to beatslaughter for his support.
Have fun with it.

It is nice to know, who uses the tool, so add a reply if you use it. :)


(Conner_Bw) #6

I did a few tests… A few cases worked, a few others didn’t. I got a “zend_mm_heap corrupted” message when failing to convert a VST heavy XRNS. Yes, I know the script is not supposed to be used with those but I was testing. Can I suggest you put

error_reporting (E_ALL| E_STRICT);

At the top of xrns_reorganize_instruments_notes.php and correct what it tells you? A lot of notices and warnings are thrown that should be corrected before exploring this failure, just to rule stuff out.

Keep it up!

PS: The °°°°°° characters turn to ??? at the OS X prompt. I’m sure if I set it to UTF it would work but by default it’s really showing up… Maybe change those too?


(It-Alien) #7

always wanted a script like this. very good idea!


(vereiser) #8

I got this message too with a funny result. I got a fully converted file, which was accepted by Renoise.
Nevertheless I try to fix the problem.


(vereiser) #9

Thanx Bantai. I will try it.


(Beatslaughter) #10

For people having the problem with the memory corrupted message. Please download the current development build of PHP 5.2 from here:

http://snaps.php.net/

Extract “php5ts.dll” and “php.exe” into the “php” subfolder of the Frontend.

This seems to be a bug in the current official PHP version, not sure if we should distribute a dev version with the Frontend package.


(Conner_Bw) #11

Added to XRNS-PHP CVS so it doesn’t get lost.


(vereiser) #12

I made an upgrade to the script.

  • fixed: instruments with a number higher than 9 will not ignore anymore
  • fixed: empty notes of a not track owned instrument will be muted
  • adding: delete unused tracks
  • adding: every line of an instrument with a C parameter setted to 00 is defined with a note off (needed for using VSTi)

Have fun with it and a happy new year


(vereiser) #13

This year, I will convert all my best growen songs from SkaleTracker respective FastTracker ][ to Renoise, to give them a new shape while mixing them or adding some new experiences. Cause of that I have to code some more tools like the Reorganization Tool.
So I started a new project.
Cause of the working flow, while arranging the song, especially when I create drum loops, I used a short pattern length. But now, in the time of finishing the songs, a short pattern length is not very handy for me. So I need a tool which makes the one beat pattern structure becomes a 4 beats per pattern or 8 beats per pattern structure. Don’t know, how long it takes.

By the way, why I have 512 lines per pattern only? Is it that hard to give some more lines in a pattern :-); why not a pattern length FFF? :slight_smile:


(vereiser) #14

If somebody wants a new version of this skript, please post here. :slight_smile:

I think, it is final. Or is not?


(vV) #15

If it operates ok with the new document version, i guess.
(final until Renoise changes the whole instrument structure again :P)


#16

Just what I was looking for. Great stuff. However, it says:
Script error: exit code: 255.
Maybe because I use VSTi in this song?

If choosing an existing file name as destination file it will say exit code 2. Could say: “Really want to overwrite?”

In a clean (and more simple) xrni based song it worked. But there’s note OFF’s all over the place and the song sound completely different with lots of truncated notes. Too many note OFF’s.
Also it deleted a speed setting.


#17

Does this mean it only works properly with 1.9 xrns files?

Btw: This tool is not listed among the “Renoise XRNS-PHP Scripts” here: http://www.renoise.com/download/tools/.
The same goes for a few other tools present in the xrns-scripts-1.07.


(Conner_Bw) #18

All XRNS-PHP scripts are here:

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

These forum threads are merely the discussions about them.


#19

Yearh, but the average user (like me) would likely expect to find a complete (and accurate) list of all available scripts in the ‘Renoise XRNS-PHP Scripts’ section here: http://www.renoise.com/download/tools/ and not just some of them. Looks like official information (it’s not a forum thread) and should therefore be exhaustive.
Took me a few hours to find a tool I was looking for beacuse of this.


(Conner_Bw) #20

Ok, but these scripts aren’t for avegerage users. Nor are they official Renoise tools.

The tools page info about XRNS-PHP was made years ago. Since then several scripts were added, changes were made, and people lost interest in maintaining them.

I think we should remove any specifics of any tool on that page. The tools page is generic info. They are all 3rd party tools made by members of the community, for fun (and profit?). Not officially supported by Renoise at all.

Bug reports are appreciated though.