Loading a phrase does not apply name of the phrase

R3.1.1 x64 Win10 x64.

It seems that I have found an incongruity/absurd when reading or importing a phrase.

  1. From Renoise, phrase editor, import phrase, Renoise take the name of the file, not the name of the phrase.
  2. From the API,renoise.app():load_instrument_phrase(filename), the API take the name of the file, not the name of the phrase.

Both cases are the same, but it does not make sense!!!

An example: a file named 001.xrnz (which is an XML file).This file contains the following information:

<?xml version="1.0" encoding="UTF-8"?>
<InstrumentPhrase doc_version="2">
  <Lines>
    <Line index="0">
      <NoteColumns>
        <NoteColumn>
          <Note>C-4</Note>
        </NoteColumn>
      </NoteColumns>
    </Line>
    <Line index="4">
      <NoteColumns>
        <NoteColumn>
          <Note>D-4</Note>
        </NoteColumn>
      </NoteColumns>
    </Line>
    <Line index="8">
      <NoteColumns>
        <NoteColumn>
          <Note>E-4</Note>
        </NoteColumn>
      </NoteColumns>
    </Line>
    <Line index="12">
      <NoteColumns>
        <NoteColumn>
          <Note>F-4</Note>
        </NoteColumn>
      </NoteColumns>
    </Line>
  </Lines>
  <Name>Phrase 01</Name>
  <Autoseek>true</Autoseek>
  <LinesPerBeat>4</LinesPerBeat>
  <ShuffleIsActive>false</ShuffleIsActive>
  <ShuffleAmounts>
    <ShuffleAmount>0</ShuffleAmount>
    <ShuffleAmount>0</ShuffleAmount>
    <ShuffleAmount>0</ShuffleAmount>
    <ShuffleAmount>0</ShuffleAmount>
  </ShuffleAmounts>
  <NumberOfLines>16</NumberOfLines>
  <VisibleNoteColumns>1</VisibleNoteColumns>
  <VisibleEffectColumns>0</VisibleEffectColumns>
  <NoteColumnNames>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
    <NoteColumnName/>
  </NoteColumnNames>
  <NoteColumnStates>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
    <NoteColumnState>Active</NoteColumnState>
  </NoteColumnStates>
  <InstrumentColumnIsVisible>false</InstrumentColumnIsVisible>
  <VolumeColumnIsVisible>true</VolumeColumnIsVisible>
  <PanningColumnIsVisible>false</PanningColumnIsVisible>
  <DelayColumnIsVisible>false</DelayColumnIsVisible>
  <SampleEffectsColumnIsVisible>true</SampleEffectsColumnIsVisible>
  <TriggerOptions>
    <BaseNote>48</BaseNote>
    <KeyTracking>Transpose</KeyTracking>
    <Loop>true</Loop>
    <LoopStart>0</LoopStart>
    <LoopEnd>16</LoopEnd>
  </TriggerOptions>
</InstrumentPhrase>

Phrase 01 is the name of the phrase, not the 001.xrnz.Why, when loading a new phrase, does it take the name of the phrase, and replace it with the name of the file? This makes no sense!!!Renoise should load the name of the phrase, not the name of the file.

So, what is the use of changing the name of the phrase and saving it, if afterwards it does not load the name of the phrase and take the name of the file?

Apparently, the problem is not when saving the file. When you export a file, the XML has successfully saved the the_name_of_the_phrase, but then there is no use to import the file.

Please, is there any way to get the name the_name_of_the_phrase</ Name> through the API or will we have to wait for a new version of Renoise with the correction?

Please, confirm that this really works like this, and I am not confused.I need to be able to load the name of the phrase from the API. Any way to do it?I’m stuck right now for this reason.

Thanks!

Seems like a bug.

You can quite easily load the name from the file into a Document by using the renoise.Document:load_from(file_name) method.

(We discussed something similar not long ago.)

EDIT: I would imagine something like this

local xrnz_data = renoise.Document.create("InstrumentPhrase") { Name = "string" }

xrnz_data:load_from("filename.xrnz")

local the_real_name = xrnz_data.Name

Seems like a bug.

You can quite easily load the name from the file into a Document by using the renoise.Document:load_from(file_name) method.

(We discussed something similar not long ago.)

EDIT: I would imagine something like this

local xrnz_data = renoise.Document.create("InstrumentPhrase") { Name = "string" }

xrnz_data:load_from("filename.xrnz")

local the_real_name = xrnz_data.Name

Yes, it seems an error of focus in the programming inside Renoise. It really should not work like this.

I have been able to use an xrnz_data to solve it. Fortunately!

However, I insist that this issue should be reviewed internally in Renoise.

Is it possible that phrases are very little used by users? I wonder that for so long, nobody has reported this error. The libraries of named phrases must be chaotic. No phrase will carry its name (specifically because of importing an XRNZ phrase).

Thanks for the help!

Edit:Renoise has an “intelligent” way to automatically rename phrases following this scheme: Phrase 01, Phrase 02 … and following, for example, when iterating to load multiple phrases. This must be kept in mind when building tools. For example, phrase 6 will not be able to take the name of “Phrase 01”. It will take the name of “Phrase 06”. To avoid this, it would be necessary to use a string other than “Phrase XX”.

+1. I was actually dabbling with phrase names yesterday for the very first time. I hadn’t quite noticed that you could name them the same way you can other tracks/columns. Probably seems like a luxury to most users, but sometimes it really makes sense.