extract waves

Hello,

Sorry, it’s a bit off-topic since technically it’s not renoise-scripting (I was reluctant to learn yet another language and prefered to go with my favorite tool)

I had my own itch to scratch (to feed my hardware samplers thanks to the wonderfull plugin grabber feature and the great sample editing ) I needed an easy way to mass export samples from xrns files with loop points in file and also those points positions in the file name. So here’s a little script that does the trick, just in case anyone finds it useful: https://github.com/desfrenes/xrns-tools

Usage:

./xrns.py extract path-to-your-project.xrns

Will export all waves to a waves dir

example:

MacBook-Pro:renoise_projects md$ ./xrns.py extract sylenth.xrns
MacBook-Pro:renoise_projects md$ ls waves
I01-SY_chicago_S00-AU__Sylenth1_(Init)0x7F_C-3_66150-132297.wav
I02-SY_crystal_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I03-SY_fifth_S00-AU__Sylenth1
(Init)0x7F_C-3_66113-132223.wav
I04-SY_house_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I05-SY_orchestra_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I06-SY_panflute_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I07-SY_pizzi_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I08-SY_ampere_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I09-SY_hydrosphere_S00-AU__Sylenth1
(Init)0x7F_C-3_66148-132293.wav
I10-SY_inurface_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I11-SY_lost_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I12-SY_megalead_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I13-SY_tele_S00-tele_66147-132290.wav
I14-BS_trance_S00-AU__Sylenth1
(Init)0x7F_C-3_0-0.wav
I15-KK_hardcore_S00-AU__Sylenth1
(Init)0x7F_C-3_66031-132059.wav
I16-KK_noize_S00-AU__Sylenth1
(Init)0x7F_C-3_66147-132290.wav
I17-TM_electro_S00-AU__Sylenth1
(Init)0x7F_C-3_0-0.wav
I18-SY_minor_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I19-SY_starchild_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I20-SY_starchild2_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I21-SY_stonevalley_S00-AU__Sylenth1
(Init)0x7F_C-3_66150-132297.wav
I22-SY_tekbitz_S00-AU__MonoPoly
(Init)0x7F_C-3_66149-132294.wav
I23-SY_mellotronic_S00-VST__U-No-62
(Organ_Lead)0x7F_C-3_66150-132297.wav
I24-SY_dark_S00-AU__MonoPoly
(Init)_0x7F_C-3_187305-374610.wav
I25-AES_115_Ashp_Ethereal_Atmos_18_S00-AES_115_Ashp_Ethereal_Atmos_18_72169-324168.wav
I26-AES_115_B_Dark_Atmos_05_S00-AES_115_B_Dark_Atmos_05_21003-250319.wav
I27-AES_115_Fshp_Ethereal_Atmos_22_S00-AES_115_Fshp_Ethereal_Atmos_22_14125-186678.wav
I28-hi_string_S00-Synth14_1320-35205.wav
I29-lo_string_S00-Synth15_18978-57099.wav
I30-Groove_Detroit_7_S00-Groove_Detroit_7_194541-389081.wav
I31-Groove_Detroit_8_S00-Groove_Detroit_8_130879-263179.wav
I32-SOR_CR1_Breaks_140bpm_001_S00-SOR_CR1_Breaks_140bpm_001_0-0.wav

Some warnings:

  • only tested with python3.4, it may work with 2.7 but I don’t know

  • all samples are converted to 16bit

  • you need flac and sox binaries at your prompt

  • flac will choke on 32bit files (well, at least on my machine)

You don’t need Renoise to be installed to use it on xrns files.

Probably best Theo to quickly mention your python script relies on the ‘argh’ package, so people might have to manually install that. Also it seems that you must give a name to both the instrument and the samples in Renoise, otherwise your script might fail to find the instrument/sample file name (Renoise tags the file/directory with (Unnamed) ) Not sure if you want to take that into consideration to make your script a little bit more ‘bullet proof’ or not. Actually Theo your little script/tool doesn’t seem like a bad candidate to go into the XML section of the forum -> https://forum.renoise.com/c/renoise-tool-development/renoise-xml-fileformats-tools :slight_smile:

Thank you for the feedback.

I may remove argh dependency soon as now there is only one command anyway… if I have to add more tools later I’ll provide pip support. I’ll check the names issue tonight.

I there a way to move the post to the right section of the forum ?

I suppose it is always best to try and have as little dependencies as possible Theo :slight_smile:

Is there a way to move the post to the right section of the forum ?

Err, no not us mere mortals/peasants Theo. But if we ask Mr Dblue, Mr Danoise or God to move this topic into the XML section for you we may get lucky? I figured because it is a separate python XML parse and not a Renoise/Lua xrnx it may sit better. But it is out of our hands Theo :slight_smile:

Moved.

Looks like a bit of luck was on our side Theo. The wrath of Dblue uttered just one word and has thus moved mountains :slight_smile:

ahaha ! great, thank you ^^