Save / Export all XRNI from XRNS?

Is there a way to easily export all Instruments of a Song instantaneously to a single folder?

thought there was a Tool for this but might be mistaken

trying to easily “merge” multiple tracks

and would like an easier way to use previously made XRNI’s in new jams.

1 Like

I also would love being able to directly load xrni from an xrns into another project.

It is like, I design my instruments in dedicated xrns projects, with multiple stages/versions of the design in them. Right now I have to try to load from a 2nd renoise instance if I want to use one, or go throgh hassle to saving as .xrni or into a preset first. Also the copy&paste is hit and miss as renoise seems to be buggy in that regard and often fails to copy the instrument. And no, I do not wish to add all versions to user library…it is too much constat evolution and different versions suitable for different purposes going on for each instrument.

Yes we need a tool to batch export xrni from xrns for re using our sounds and phrases!
We need a tool to batch export phrases to. If somebody needs to export 10 phrases from an instrument, he has to go to menu: Phrases->export phrases for each one! …

2 Likes

This should be really easy to implement under the hood, directly from the navigation in the instruments (I suppose you would have to register all the necessary data of the XRNI instrument, which I suppose would be enough with an XML file). There could be a selection option to choose between samples (flac, mp3 …) or xrni in each song, or even all at once.

However, there is a trick, a bit absurd, that can alleviate this request. You are supposed to be building a song (I guess you do it that way). Follow these steps:

Load a new instance of Renoise. You will have Renoise (1), your current song, and the new instance, Renoise (2) with an empty song (or your template).

  1. In Renoise (2), load the song where you want to get XRNI instruments.
  2. In Renoise (2), select the instrument box.
  3. In Renoise (2), select the desired XRNI instrument and [CTRL C].
  4. In Renoise (1), select the instrument slot where you want to paste.
  5. In Renoise (1), [CTRL V].

With this operation you have copied an XRNI instrument extracted from another song. You can also do it with the mouse.

Limitations:

  • You need two instances of Renoise.
  • You can only do it one by one. It is a bit boring. The instrument box does not allow you to select more than one instrument to cut-copy-paste.

This trick is possible because both instances use the same clipboard. This means that you can do the same with other elements, tracks, patterns… When you know this trick, it’s like discovering Pandora!

I think this feature should be native. But if @taktik has not implemented it yet, it is because he will have had some kind of problem. I doubt that such a feature is not desired, since we are talking about native instruments, where you have absolute control of all the data.

I guess all the data is in the XML file inside the XRNS container. It’s just reading an ultrafast text file. The act of copying and pasting from the same instance should be instantaneous. That is, it is not necessary to open a second instance in order to obtain all the necessary data of the desired instrument. Even this should be possible for a group of several consecutive instruments, at least.

What I do believe is that if we don’t develop these issues, @taktik won’t even bother trying to implement them.

1 Like

Even if you use a tool, two instances of Renoise would be necessary as well (it would no longer be so practical). The problem is that the user cannot read which instruments each song contains, if not load it before.
I wonder what the excuse is for not implementing this feature natively. It probably depends directly on performance:

  • If the XRNI instrument has many samples, it will take a long time to load (not in reading the XML data).
  • If the XRNI instrument turns out to be a VSTi with a heavy library (for example with Kontakt), “copying” could be a somewhat “critical” operation.

and…

  • If the original instrument is routed with a track that does not exist in the target song. This could return some kind of error, which could be patched in some way.

Unfortunately, not everything can be solved with LUA tools, at least as we would like. And there are probably some problems that we don’t understand.

Possibly, with the phrases it is easier. At least copy phrases from one instrument to another of the same song. The 126 phrases are data contained in the XRNI. If they are phrases of another song, we are as in the previous case.

This is a tool that I wrote myself for this (you can try it yourself). However, I do not publish the packaged tool because I suppose that it will be necessary to attend to cases where the process takes too long (more than 10 seconds), where there are many instruments loaded with samples and so on … If there are few samples, it will not exceed 10 seconds and it will work perfectly. Otherwise, it will be necessary to use coroutines for the iteration.

local rna=renoise.app()
local rnt=renoise.tool()
local function save_all_xrni()
  local path_folder=""
  local song=renoise.song()
  local sii=song.selected_instrument_index
  --save all
  local function save_all_ins()
    if rnt:has_timer(save_all_ins) then
      rnt:remove_timer(save_all_ins)
    end
    song.selected_instrument_index=1
    for ins=1,#song.instruments do
      local filename=("%s%.3d-%.2X-%s"):format(path_folder,ins,ins-1,song:instrument(ins).name)
      rna:save_instrument(filename)
      if (song.selected_instrument_index<#song.instruments) then
        song.selected_instrument_index=song.selected_instrument_index+1
      end
    end
    song.selected_instrument_index=sii
    rna:open_path(path_folder)
    rna:show_status( "All XRNI instruments have been saved correctly.")
  end
  
  --search path
  local search_path=rna:prompt_for_path(("Select a folder to save all the instruments XRNI of the song:\n\"%s\""):format(song.name))
  if (search_path=="" or search_path=="C:\\") then
    if (string.sub( path_folder, -1 )~="\\") then
      rna:show_error("Please, reselect before a valid & existent path to save the files! No using a protected path (as \"C:\\\")")
    end
  else
    path_folder=search_path
    --print("path_folder:",path_folder)
    if not rnt:has_timer(save_all_ins) then
      rnt:add_timer(save_all_ins,500)
    end
  end
end

--register menu entry
rnt:add_menu_entry{
  name="Instrument Box:Save All Instruments As...",
  invoke=function() save_all_xrni() end
}

…Possibly, with the phrases it is easier. At least copy phrases from one instrument to another of the same song…
You have to copy text data only… :frowning: not object clipboard…
There is no chance to copy from another xrns, xrni or phrases, even if you load two Renoise instances.
How can I run you tool please?

XRNS is the format of the song. You can load it in another instance.

With two instances of Renoise, you can copy XRNZ phrases, one by one. But you must do it from the phrase editor, and reconfigure the number of lines. Too much work.

With two instances of Renoise, you can copy XRNI instruments, one by one, from the instrument box. This is not bad at all.

In both cases, make sure you have marked the corresponding panel to do the operation with the keyboard commands. Or, do it correctly from the drop-down menus with the mouse (right button …).

To test the tool, you should package it in an XRNX. But I should integrate the courotines so that it works in all cases. The above code is the main.lua of a typical XRNX tool. If you need XRNX packaging, tell me. For now, I can provide it without the coroutines.

It would be possible to do something similar with the phrases, to export the phrases from one instrument to another instrument inside the same song, through a tool window with selection. It would not even be necessary to use coroutines, because you are only copying text from an XML, with a total of 126 phrases at most, a very fast operation.

However, this operation is somewhat strange. It is possible to duplicate an instrument, where it contains all the necessary phrases and then modify the samples or whatever is necessary of the instrument (modulation, keyzones, etc).

All that involves copying text from XML files is very fast, although the iteration is with a very large range.

1 Like

Thanks for your reply!
Yes it would be useful for me to test an xrnx ready file:grinning:
Maybe you already know that drag-droping an external xrni file (new), would replace the old one xrni in your project. But old phrases replaced with the new too (new)

@getit
I have already created another tool for both cases, to copy all the instruments of the current song to a selected folder or to import all the phrases from one instrument to another of the same song.

As soon as I have time I will publish it in a more official way in the tools section of the renoise.com website.

This is its appearance:
image
The black bar “Destiny folder …” is also a progression bar, coordinated with the coroutines for the iteration.

At the moment I only have a problem with the instruments that have a VSTi plugin loaded. Apparently, when you save the XRNI instrument, you also try to save the VSTi. So it probably won’t be possible to save instruments with VSTi.

1 Like

Wow! Thank you Raul
The tool is written for api 6. I have v3.1.1
Would I change manifest.xml to run it? Or download more recent version?
Thanks in advance!

Edit: now I see it is for v3.2. I am a registered user till v3.1 and till v2.0 of redux
I changed v6 to v5 in manifest.xml, but geting error: … Uknown property style
Could you please downgrade it for v3.1?

Yes, I know exactly what happens here.

I can publish a version compatible with 3.1.1. No problem. As soon as I have time I will.

However, I encourage you to renew your Renoise license. It is a worthwhile software, and will continue to improve.

1 Like

I will upgrade. Yes renoise has many features.
I really like to support development group!
Thank you Raul

@getit. You have the shared tool for 3.1.1. Follow the download thread of the tool. It will work exactly the same as the version for 3.2.0

1 Like

Thank you Raul!
I tested version 3.1.1. It successfully share phrases between instruments, but can not export more than one instrument (~Save all instruments). I am getting this error:
Please make sure… No using a protected path (as “C:”)…
Native tool save single instrument, has no issues at all…

By the way, I am stuck on 32bit pc… old Winxp or Debian 9 32 bit.
New v3.2 supports only 64 bit… Is there any plan for us poor old seabirds?

This is not a error, it is a warning that comes from the tool.

Be sure to select or create and select a folder first. That is a path of a folder. Do not use a root address, such as C:/
That is to say:

  • Do not use C:/ or D:/ (this tool does not allow saving on the root address on purpose).
  • Use C:/Folder Name 1/ or D:/Folder Name 2/Song Name/ (the name of the folder you want).

The reason for this decision is that it is possible to save several files at once, up to 255. The right thing is that they are contained within a specific folder.

It seems that the head of Renoise will only provide a 64bit version of Renoise as of now (3.2.0 or higer). Honestly, I think it’s a good decision. There is not much time to invest and should focus on modern equipment. An old PC will not have a HiDPI screen. Renoise 3.1.1 will continue to work on older PCs in its 32bit version.

However, this tool should work perfectly in both versions, both 32bit and 64bit.

Thank you Raul, I know that script works in such manner C:\folder. May be there is something with my setup

I will test it in win10 and let you know. For the time I will stay at 3.1.1, as I have a lot of work to play around.
Have a nice time!