Jump to content


Photo

[Bug] load the phrase does not read "the name of the phrase",

phrase name load_instrument_phrase()

  • Please log in to reply
3 replies to this topic

#1 Raul (ulneiz)

Raul (ulneiz)

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1490 posts
  • Gender:Male
  • Location:Spain

Posted 09 August 2018 - 10:12

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>

<Name>Phrase 01</Name> 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 <Name>the_name_of_the_phrase</Name>, but then there is no use to import the file.

 

Please, is there any way to get the name <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!

 


:excl: Development of my tools: KangarooX120SamRenderPhraseTouch  |  GT16-Colors (old)

 

:excl: My API wishlist R3.1 (updated 24 July 2017):

Spoiler

 

:excl: My Renoise 3.1 wishlist (updated 26 September 2017):

Spoiler

#2 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1781 posts
  • Gender:Not Telling

Posted 09 August 2018 - 11:19

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

Edited by joule, 09 August 2018 - 11:31.


#3 Raul (ulneiz)

Raul (ulneiz)

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1490 posts
  • Gender:Male
  • Location:Spain

Posted 09 August 2018 - 15:09

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".

Edited by Raul (ulneiz), 09 August 2018 - 15:14.

:excl: Development of my tools: KangarooX120SamRenderPhraseTouch  |  GT16-Colors (old)

 

:excl: My API wishlist R3.1 (updated 24 July 2017):

Spoiler

 

:excl: My Renoise 3.1 wishlist (updated 26 September 2017):

Spoiler

#4 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1781 posts
  • Gender:Not Telling

Posted 09 August 2018 - 15:42

+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.