New Tool (3.0): Batch export samples from all instruments

Quick answer to:
http://forum.renoise…919#entry287919

-Right click in the instrument area.
-Select “Save All Samples as…”
You will get a dialog to define your first location, once set, it won’t ask you any more (unless you click the browse button).
-Either pick wav or flac and then click save.

If an instrument has samples, it will save them into a folder named after the instrument.

Whoops, first edit already required…
The renaming schedule was broken if the same sample filename already existed…

V1.4
-Extended autorenaming scheme
-Folders are saved with instrument numbers
-When instrument contains only one sample, instrument names will be used and samples will be stored in root folder (not instrument folder)
-Autoname instruments and samples when they have no name.
-Save all samples to one folder. (option)

V1.1 is available…
Decided to also use the idle notifier. (Renoise was quite often nagging the script turn unresponsive)
The status bar now shows some form of progress while exporting.

http://www.renoise.c…xportallsamples

it works for me on windows 7 32 bits it’s pretty cool :w00t: because i was thinking about a thing like this but i’m not aware of programming for now
perhaps can you add the fact that once the sample are save the window will be close.

Done, plus a few cleanup stuff added as well.
Download from the tools page or update through the tool updater.

Excellent work vV! :drummer:

thank’s again :w00t:

If it only has a single sample does it take the name of the sample or of the instrument? Only wondering due to the initial request from zerxes, where I believe he has renamed the instruments and would like to be using that name over the actual sample name. It is definitely easy to go through and edit these too, if you are one of those people who generally uses single sample instruments, as it’s a lot less mouse clicks or key presses…

Currently it saves under it s instrument folder. The problem is more or less the renaming of filenames as it currently only checks one time for existence.
It can be easily resolved though, but haven’t had time for it.
I could perhaps add some functionality where all samples are dumped to one folder instead of multiple, but using the instrument name as parent folder seemed logical to me.
though multiple instrumentslots carrying the same name aren’t currently covered in the autorenaming either.

Great tool man!

Request: give unnamed instruments/samples a number like 001.wav instead of just .wav
also it would be cool to have an option to just have them all go into the same folder

I have updated the tool.
The unnamed samples will get a name. (Unnamed instruments as well)
Saving to one folder is now possible. (uncheck box)
Also instruments with only one sample will get their instrument name as requested per Xerxes.

I tried finding out whether save to flac or to wav always save as flac, but the .flac and .wav really have different file-sizes!

Hello vV,

this tool is a great idea, but it seems to be broken in Renoise 3.
I get this Error message :

  
'C:\Users*Username*\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.vvoois.Exportallsamples.xrnx\main.lua' failed in one of its notifiers.  
The notifier will be disabled to prevent further errors.  
  
Please contact the author (v.voois) for assistance...  
  
main.lua:216: attempt to index field '?' (a nil value)  
stack traceback:  
 main.lua:216: in function <170><br>
<br>```

<br>
I hope i could help and it will get fixed too <img src="https://files.renoise.com/forum/emoticons/default/smile.gif" class="bbc_emoticon" alt=":)"><br>
<br>
Thank you !</170>

[quote=“Tamtam, post:10, topic:37981”]
Hello vV,

this tool is a great idea, but it seems to be broken in Renoise 3.
I get this Error message :

  
'C:\Users*Username*\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.vvoois.Exportallsamples.xrnx\main.lua' failed in one of its notifiers.  
The notifier will be disabled to prevent further errors.  
  
Please contact the author (v.voois) for assistance...  
  
main.lua:216: attempt to index field '?' (a nil value)  
stack traceback:  
 main.lua:216: in function <170><br>
<br>```

<br>
<br>[/quote]<br>
<br>
It's quite strange, because the line it is referring to should return True or False, never nil...<br>

```<br><br>
if samples[current_sample].sample_buffer.has_sample_data then<br>
<br>```

<br>
<br>
Is it giving this error in a specific song of yours or do you encounter this everywhere?<br>
[s]Perhaps pm a dropbox link for a song where the problem occurs with[/s], it might also be something stupid with "current_sample" being nil.<br>
<br>
I can reproduce here, i'll look into it...</170>

Should be fixed now. (update with tool updater / check for updated tools)

Thank you, i will try it right now.

Edit :

Seems it’s still not working.
I try to export a multisample Insturment to wav files.
Win7, Renoise 3 Beta.

  
'C:\Users\Username\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.vvoois.Exportallsamples.xrnx\main.lua' failed in one of its notifiers.  
The notifier will be disabled to prevent further errors.  
  
Please contact the author (v.voois) for assistance...  
  
No matching overload found, candidates:  
void show_error(Application const&,custom [class String] const&,lua_State*)  
stack traceback:  
 [C]: in function 'show_error'  
 main.lua:237: in function <170><br>
<br>```

</170>

[quote=“Tamtam, post:13, topic:37981”]

  
'C:\Users\Username\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.vvoois.Exportallsamples.xrnx\main.lua' failed in one of its notifiers.  
No matching overload found, candidates:  
void show_error(Application const&,custom [class String] const&,lua_State*)  
stack traceback:  
 [C]: in function 'show_error'  
 main.lua:237: in function <170><br>
<br>```

<br>[/quote]<br>
<br>
Okay, now i need a good xrni or xrns example because i cannot reproduce this one with any of my own songs. If you can pm me a link to somewhere i will try have a look at it somewhere this weekend or next week.</170>

Problem solved it was a user fail error ! :rolleyes:

Thank you very much for this helpful and nice tool! :)

:walkman:

Hi, why not add an option that export also all instruments xrni of a song?

Currently the API does not provide an option to save instruments, chains and e.g. color themes.
It does provide a simple and fast option to save samples or the song. Anything else is a wheel having to be reinvented from scratch. Since renoise can do this perfectly fine himself, i rather wait for a native save_instrument() and save_instrument_as() functions.

I believe there may be some name caching issue in 1.42 of the tool running in Renoise 3.01

If I “save all samples as…” it correctly saves the samples based on their instrument name (for instruments with one sample only).

If I then change the instrument name and “save all samples as…” again, it uses the original name - not the new one.

I believe it’s a caching issue for two reasons:

  1. if I quite renoise and re-open the .xrns and save all samples again, it saves with the new name

  2. if I keep renoise open and create a new .xrns and “save all samples as…” then it uses the instrument names from the previous .xrns ! With the names corresponding to the slots from the previous .xrns

I went through the .lua code and nothing jumped out at me - but I don’t really know anything about lua!

Is it possible that some other tool is interfering with the behavior? Or are other people experiencing this bug as well?

Got this bug;

‘C:\Users\plugexpert\AppData\Roaming\Renoise\V3.0.1\Scripts\Tools\com.vvoois.Exportallsamples.xrnx\main.lua’ failed in one of its notifiers.
The notifier will be disabled to prevent further errors.

Please contact the author (v.voois) for assistance…

main.lua:218: attempt to concatenate local ‘ins_folder’ (a nil value)
stack traceback:
main.lua:218: in function main.lua:174