Jump to content


Photo

[Solved] Help: Does this thing exist: renoise.app():load_midi(xxx.xrnm

load midi file

  • Please log in to reply
3 replies to this topic

#1 Raul (ulneiz)

Raul (ulneiz)

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 760 posts
  • Gender:Male
  • Location:Spain

Posted 03 January 2017 - 14:24

Is there a way to load a file xrnm (MIDI file) with renoise.app()? Or in any other way?

 

I know I can use "renoise.app():load_song(filename)" with the midi configuration saved in it. But I just want to load the midi file "xrnm", without create a new song.

 

Is complete this list for Renoise 3.1?:

--------------------------------------------------------------------------

renoise.app():load_song(filename)
 
renoise.app():load_track_device_chain(filename)  -> [boolean]
renoise.app():load_track_device_preset(filename) -> [boolean]
renoise.app():load_instrument(filename) -> [boolean]
renoise.app():load_instrument_multi_sample(filename) -> [boolean]
renoise.app():load_instrument_device_chain(filename) -> [boolean]
renoise.app():load_instrument_device_preset(filename) -> [boolean]
renoise.app():load_instrument_modulation_set(filename) -> [boolean]
renoise.app():load_instrument_phrase(filename) -> [boolean]
renoise.app():load_instrument_sample(filename) -> [boolean]
renoise.app():load_theme(filename)
--------------------------------------------------------------------------
 
renoise.app():load_midi(filename), does not exist??? Could it be included in a future version?
 
Thanks!

Edited by Raul (ulneiz), 05 January 2017 - 16:02.


#2 Raul (ulneiz)

Raul (ulneiz)

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 760 posts
  • Gender:Male
  • Location:Spain

Posted 05 January 2017 - 14:01

Please, is there any way to load an .xrnm file with the API? (...without using "renoise.app():load_song(filename)" )

 

This .xrnm is a .xml format.

 

EDIT: I ask this because I want to avoid loading an entire song (xrns). I tried to manipulate the formats, but logically, it returns an error in the load.


Edited by Raul (ulneiz), 05 January 2017 - 14:21.


#3 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1358 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 05 January 2017 - 15:20

Never used. Is that what this does? https://github.com/r...ng.API.lua#L220



#4 Raul (ulneiz)

Raul (ulneiz)

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 760 posts
  • Gender:Male
  • Location:Spain

Posted 05 January 2017 - 15:59

Never used. Is that what this does? https://github.com/r...ng.API.lua#L220

 

Wow! Perfect! 

 

I thought it should be in renoise.app (): load_blablabla. Even I had tried with renoise.app().load_midi_mapping("xrnm/midi-input.xrnm") :blush:, that does not work.

 

renoise.app():load_song(filename)
renoise.app():load_track_device_chain(filename)  -> [boolean]
renoise.app():load_track_device_preset(filename) -> [boolean]
renoise.app():load_instrument(filename) -> [boolean]
renoise.app():load_instrument_multi_sample(filename) -> [boolean]
renoise.app():load_instrument_device_chain(filename) -> [boolean]
renoise.app():load_instrument_device_preset(filename) -> [boolean]
renoise.app():load_instrument_modulation_set(filename) -> [boolean]
renoise.app():load_instrument_phrase(filename) -> [boolean]
renoise.app():load_instrument_sample(filename) -> [boolean]
renoise.app():load_theme(filename)
 
for MIDI files:
renoise.song():load_midi_mappings(filename)  -> [boolean, error_message or nil]
---
renoise.song():save_midi_mappings(filename) -> [boolean, error_message or nil]
renoise.song():clear_midi_mappings()
 

renoise.app(): and renoise.song(): , ok!

 

Thanks Joule!!!

 

I am using preferences.xml file to be able to load different profiles when starting my tool (GT16-Colors). With it you can automatically load: pattern templates, sequence templates, selection of various metronomes, and also different midi profiles, being able to combine them or to mix them to the taste of the user.

 

A detail of interest: a normal xrnm file can occupy 13KB, and compressed in zip occupies 1KB (a xrnm is a xml without compression). It is possible to compress to read it. I just checked and it works. Just change the "zip" extension for "xrnm". Very happy about this. I had never tried it. These tricks come well to optimize.