Creating Microtonal Instruments

Hey ppl, I’ve decided to create an online tool for tuning xrni instruments.

My main concern is to support the use of *.tun files from Scala, as they have a relatively simple syntax. I also want to support multiple samples, which of course makes things a bit more complicated.

But in essence, I imagine that you can upload your own instrument, and specify a tuning. It will then be modified and sent back to you, ready for use.

I’ll let you know when there is something ready to see (and listen to) !


What language are you doing this in?

Have you considered making a PHP script and adding it to the XRNS Script Front End?.

Yes, I am using PHP. It would be cool to add it to the frontend, but does it include zip file support ?

I have already got a server with plenty of space, and I did a small test to see if it could read the information from the instrument XML:


Have a look at it. Currently there are four scripts. A fifth one is in the works. The functions file has zip/unzip wrappers around info-zip which does the job. There might be other code you can use as well. The xrns2midi script written by Bantai has some inspriring stuff. All of the aforementioned is PHP.

Ahh yes…I am looking forward to the finished xrns_mid script. Maybe I should go take a look, to see if Bantai has some good tricks up his sleeve :)

Edit: new version is available, go to this thread

OK, the first version is up and running now! .

I guess that means I’ve become a healthy fluffy teddybear :D

I’ve decided to go with the XRNS-PHP frontend, and it made for a really fast and easy way to develop the tuning app. Thanks to everybody involved with streamlining Renoise XRNx development !!

The alpha version 0.1 can be downloaded from this location (XRNS frontend with my script added):

It successfully translated all *.tun files I threw at it, but if you fare otherwise, please tell me. Version number is 0.1, so there is room for improvements and bug fixes.

Edit: Download Scala, and the Scale Archive if you need tuning files (there’s also a guide as to how to export *.tun files on their website) . Lots of plugins support the format as well, so a quick search on your harddrive might reveal some additional tunings

At least i get your script hanging on a simple instrument of mine using the default scale exported ptolemy.tun
It doesn’t matter wether the waves are ogg compressed or fully blown size saved along.

You can download the instrument here:…Guitar_ogg.xrni

The reason is that the sourcecode is hard coded for ‘.flac’ files, it will skip anything else. Do a search for ‘.flac’ and you’ll find the problematic line.

This needs to be changed to support the detection .ogg .wav (and possibly .aif & .aiff)

Otherwise, nice to see a new script up in here!

That was part of the reason, the reason for the real hanging is that the xrni folder in the temp folder wasn’t cleaned up after it failed to find the flac files, so when doing the second attempt the script hung in spite of what extension was set. Only after manually deleting the xrni folder from the temp folder and renaming the .flac extension to .ogg the script worked.

Great script! I know Wusikstation has a huge library of tuning files included.

Haha, I see that a few flaws have been discovered. Cool. Let’s fix em!

I haven’t been online for a few days, but I’ll surely check out how to work with CVS when I get back from vacation, so the script can be properly merged into XRNS-PHP

I am back, and have continued to develop the micro-tuning script.

Here is a question for Taktik, or anybody who know more than I do about the .xrni format:
Version 3 of the Renoise instrument format has a tag associated with each sample. How is this implemented in the software? Should I ignore it, and simply look for any sample whose filename match the tag, ending with either “.flac”, “.ogg” or “.wav” (which is how I’ve implemented it right now) ?

BTW: I would like to join the developer group on sourceforge. My account name is danoise, user name Bjorn Nesby

The way it’s now is correct. The filenames in the document are the original samples filenames, which are currently only used for undo/redo: If they are invalid (no longer present) Renoise will backup the sampledata before applying a destructive sample action, else the sample is simply reloaded again.