► Api Changes + Fixes In 2.6 Beta 7

Added:

  • List for renoise.DocumentNodes + a more OO approach to complex doc structures:
    [added] renoise.document.document.create(“DocumentModelName”) -> acts as document constructor now
    [added] renoise.document.document.instantiate(“DocumentModelName”) -> create new instance of document model “DocumentModelName”
    [added] renoise.document.DocumentNode can be used as super class (inherit from it to create document nodes with Lua classes)
    [added] renoise.document.DocumentList (create dynamic lists of renoise.document.DocumentNode’s - can hold any document nodes created via document.create or Lua classes which inherit from renoise.document.DocumentNode)

  • Key handlers get virtual key repeats passed
    [added] renoise.tool():add_keybinding: “invoke” function now gets a boolean argument passed -> “repeated”. which indicates if the key event is a virtual key repeat (auto-repeat when holding down the key a bit)
    [added] renoise.Views.Dialog key_handler. key argument in the keyhandler now has boolean property -> “repeated”. which indicates if the key event is a virtual key repeat (auto-repeat when holding down the key a bit)

  • MIDI mapping in XRNX tools
    [added] renoise.tool():has_midi_mapping, add_midi_mapping, remove_midi_mapping -> create new MIDI mappings with XRNX tools.
    [added] renoise.Views.Control: midi_mapping -> add custom or Renoise default MIDI mappings to GUIs created with scripts

  • External plugin editior changes/additions:
    [added] renoise.song().tracks[].devices[].external_editor_available, external_editor_visible -> open/close/check for DSP device plugin editors

  • A few new observables:
    [added] renoise.tool().app_release_document_observable -> fired right before a song gets released (new one will be loaded or created soon)
    [added] renoise.tool().app_saved_document_observable -> fired right after a song was successfully saved
    [added] renoise.song().transport.loop_pattern_observable

Changes:

  • Doc related
    [changed] renoise.document.DocumentNode: “add”/“remove” is deprecated now, use “add_property”/“remove_property” instead
    [changed] renoise.document.document.create() { } is deprecated now, use renoise.document.document.create(“DocumentModeName”) { } instead
    [changed] renoise.document.DocumentNode.load_from/save_to no longer have a document_type argument (the model name or Lua class name is used as doc_type)

  • plugin_device.external_editor
    [changed] renoise.song().instruments[].plugin_properties.plugin_device.external_editor_available (moved from plugin_properties to plugin_properties.plugin_device)


Examples:


Important backward compatibility notes:
A few changes have been made which are NOT backwards compatible to the previous betas. In future we have a renoise.API_VERSION const to deal with such changes, but for now, as we are still in beta, I think its OK if we manually fix them now “by hand”. Not many tools will be affected. Here’s an overview of what changed in detail:

If your tool uses key handlers (either key_bindings or dialog key handler functions), check if the new “repeated” arguments do the right thing for your tool.

That’s it.


Sorry for the few non backward compatible changes, but this was the last chance to do so, get things straight. I don’t think many tools need to be updated at all. If you have any questions, need any help, let us know please!

Thanks a lot taktik :) … I will integrate and test the new observables ASAP.
The Midi mapping possiblity is of great value, too.

These are some fine new things !

loop_pattern_observable works as expected ! Great. Next will be the app release thing

renoise.tool().app_release_document_observable works also as expected. Now I can properly close / release my controller. THANKS !

Some way to just get key_pressed and key_released info would be highly appreciated so one could keep track on which keys are being held.

If someone is looking for more renoise.Document OO examples, take a look at Beatslaughters Mixer Tools. Beatslaughter helped designing and testing the new doc stuff and thus used it very deeply in this tool set.