Xrenoise To Mid?

(looza) #61

I didn’t think of the instrument-grouping, thanx for pointing that out. I added a request, hope you don’t mind it’s “anonymous”, I didn’t want to register just for that.

(Conner_Bw) #62

I deleted the files, and did a fresh check out, the problem persisted.

I upgraded MAMP/PHP and now the script won’t even finish running. It silently aborts after "Parsing pattern [33]: 33 … "

I will investigate on the weekend. It may be my computer.


(Transcender) #63

Where can one download v0.20? I’m totally lost in that SourceForge jungle, but it’s so great to see this wonderful script advancing!

(Conner_Bw) #64

Until this is sorted out:

  • Download XRNS-SF from this thread.
  • start the file “get_cvs_dev_version_scripts.cmd” and it will download these from the SourceForge CVS.
  • Warning! These are work in progress and probably unstable, use at your own risk.

(Conner_Bw) #65


I was using 5.2.0 up until this morning.

My MAMP upgrade was logging errors to a file instead of printing them to screen. Currently set to 8MB max memory which is why it was failing upon upgrade.

I hadn’t had time to check the script with proper adjustments, but will do so this weekend when time permits.


(Conner_Bw) #66

[17:34:11]$ php -v
PHP 5.2.3 (cli) (built: Jul 6 2007 13:31:51)
Copyright © 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright © 1998-2007 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright © 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.8, Copyright © 1998-2007, by Zend Technologies

Total execution time: 15.371 seconds

Hence, the problem was PHP, not your script. Sorry for the false alarm.

(Beatslaughter) #67

What do you mean with this? Changes in the PHP code should be reflected with each new execution of the script and GUI changes in the .cfg file are visible as soon as you switch to another script in the GUI and then back to it.

When PHP is running in SAFE mode this will have no effect. Maybe you should explicitly set it to OFF, just to be sure it works with other PHP installations.

(Beatslaughter) #68

That’s really odd. The PHP interpreter exits after the script was run, so i don’t see how it could cache files? Also tried it here and it works as expected. Might be something with your installation.

(It-Alien) #69

this is one of the issues for which I’ve been always doubtful about the possibility to perform a good XRNS-with-no-VSTi to MIDI translation.

poly aftertouch seems the only way to me.

(Beatslaughter) #70

I’m getting the second version with no retrigs here too with your testfile.

(Conner_Bw) #71
[10:15:07]$ php xrns2midi.php ~/Desktop/test/retrig.xrns ~/Desktop/test/output.midi  
Current PHP version: 5.2.6  
XRNS2MIDI v0.22 is working...  
Sun Feb 1 10:15:33 EST 2009  
Using temporary directory: /private/var/tmp  
Input: /Users/dac514/Desktop/test/retrig.xrns   
Output: /Users/dac514/Desktop/test/output.midi (+.xml, +.txt)  
XRNS Document Version: 7  
Warning: schemas/RenoiseSong7.xsd not found, skipping XML validation.  
Document has succesfully passed validation.  
 Parsing pattern [0]: 0 ...   
__Collected events from Song.xml in 9ms   
Commited global events in 1ms   
 Sending events for MidiTrack 0...  
 Sending events for MidiTrack 1...  
__Completed sending events to MIDI Class in 3ms   
Exported to MIDI file in 2ms  
Total execution time: 0.388 seconds  
xrns2midi.php is done!  
Sun Feb 1 10:15:33 EST 2009  
MFile 1 2 96  
0 Meta Marker "Pattern [0]: 0 "  
0 Tempo 468750  
1537 Meta TrkEnd  
0 Meta 0x20 0  
0 Meta TrkName "00: Unnamed"  
0 Meta InstrName "00: Unnamed"  
0 On ch=1 n=64 v=127  
1536 Off ch=1 n=64 v=0  
1537 Meta TrkEnd  

I’m using the latest version from CVS. No changes in my CPU since 2005.

(Conner_Bw) #72

I’m not sure if this script is still being maintained.

In any case, to generate something from Renoise 2.5 modules, this change can be made:

// ================================================================  
// ================================================================  
$seq = array();  
if ($sx->PatternSequence->SequenceEntries->SequenceEntry) {  
 // Renoise XSD, doc_version 21  
 for ($i = 0; $i < count($sx->PatternSequence->SequenceEntries->SequenceEntry); ++$i) {  
 for ($j = 0; $j < count($sx->PatternSequence->SequenceEntries->SequenceEntry[$i]->Pattern); ++$j) {  
 $seq[] = (int)$sx->PatternSequence->SequenceEntries->SequenceEntry[$i]->Pattern[$j];  
 foreach ($sx->PatternSequence->PatternSequence->Pattern as $p)  
 $seq[] = (int)$p;  

Now, whether or not this change generates something useful is another discussion? But, it’s better than the empty file I was getting before.

I did not commit this to SVN. I await some sort of peer review.

(Conner_Bw) #73

Alright, fux it, I committed to SVN.

  • Updated PHP Midi Classes to 175
  • The hack above has been committed
  • Some more hacks to get correct BPM from Renoise 2 modules also done.


Just what I needed. Thanks, Conner.


PHP Midi Classes 175 can be found here: http://dasdeck.com/staff/valentin/midi/downloads/

(Conner_Bw) #76

XRNS-PHP and XRNS-SF 1.08 have been released.

Fixed the XRNS2MIDI and XRNS_MERGE scripts to work with Renoise 2.5, unmaintained scripts are now in a separate “deprecated” directory, minor optimizations and bug fixes.

Shift-reload, grab it here:


Hi everybody,

i got a problem while trying to convert xrns to midi with renoise 2.5.1

here is the following error message :

Exception occured System.NullReferenceException: La référence d’objet n’est pas définie à une instance d’un objet.
à NRenoiseTools.SongIterator.Iterate(SongIteratorEvent it)
à NRenoiseTools.SongIterator.prepareTempoForSong()
à NRenoiseTools.SongIterator.get_Tempos()
à NRenoiseTools.Xrns2MidiApp.Xrns2Midi.RenoiseMidiSong…ctor(Song song)
à NRenoiseTools.Xrns2MidiApp.Xrns2Midi.ConvertFile(String xrnsFile, String midiFile, TextWriter log)

i’ve tried to turn off automation and/or delete all dsp but nothing works,

Thanks for your help !


(Conner_Bw) #78

You are using .NET/C# code. This thread is about the PHP version. They are two completely separate apps. Try with this instead: