The Api Wishlist Thread

To set initial focus in the relevant GUI elements:

vb:textfield {  
  
focus = true  
  
}  

enables complete keyboard control in for example, search tools

My “most wanted” list (not in any particular order)

  • Access to the list of scheduled patterns (could be read-only). More info
  • A way to properly clear text from a ViewBuilder object -> e.g. supply “nil” to return it to initial, empty state
  • A way to detect which matrix slot has been muted (pattern_slot_mutes_observable). More info
  • Make the pattern_assignments_observable tell us what pattern was changed, and from what index
  • More control of the recording dialog: FX track, sync to pattern, create new instrument etc.
  • Default value for Slider, MiniSlider, RotaryEncoder (reset to this position when double-clicked)
  • Bipolar support for Slider, MiniSlider, RotaryEncoder (like e.g. the Cabinet Simulator EQ’s)
  • Range slider (like the zoom slider of the waveform editor)
  • Fix: declaration of loop points in a song using transport.loop_range_beats will snap to coeff. More info
  • Ability to retrieve the current volume level at any point in a DSP chain (imagine a mixer application using this)
  • Access to thecurrently playing voices- whether a sample is playing, it’s current playback position etc.
  • Access to the status of a sample - whether it’s currently being loaded from disk
  • Ability to show/hide the (detached) instrument editor
  • Ability to start/stop phrase playback “preview”(independently of the song)
  • Access to UI theme colors (e.g. to set a button to the “selected” state)
  • Ability to detect when a key has been released (dialog keyhandler)
  • Access the selected phrase index when the instrument isn’t selected (selected_phrase/_index is a global property)

Features that have been implemented
~~* A way to determine which slots are selected in the matrix

  • “is_midi_mapped” property for parameters (like “is_automated”)
  • A way to determine mixer PRE/POST state~~
1 Like

Get the currently selected device index in the automation editor.

renoise.song().patterns[].tracks[].selected_automation_device_index, _observable  

I request a “column by column” iterator.

The closest thing I can see is renoise.song().pattern_iterator:lines_in_track()

The problem I’m having, which I will work around with cheap hacks, is that the above iterator will cycle through each column before moving to the next track.

ideally, some sort of “vertical iterator, left to right” would be a life saver.

Or, am I missing something obvious?

Cheers.

renoise.app():show_custom_dialog(“Title”, dialog_content,keyhandler_func, close_function)

[b]

close_function[/b] is fired when you press the [x] on a dialog to close it.

Would be greatly useful when trying to release all relevant notifiers.

Brainstrom warning :) :

Ability to attach invisible scripting meta data id`s into the song. i.e.

renoise.song():add_id (“Song_in_A#”)

renoise.song().pattern[1]:add_id (“Miss_this_pattern”)

renoise.song().pattern[1].track[2]:add_id (“true”)

These id`s get saved in the renoise song invisible to the user, with maybe a user preference in renoise to allow this?
Silently in the background renoise could maybe prefix the ids with the script xml id?

Now you can use these id`s to trigger events with observable transport, save per song preferences etc.

The advantage of this over simple preferences would be that when a user deletes/ clones a pattern in the song all the meta data is destroyed or cloned accordingly??

I would like to have the possibility to make a key handler function respond to a key release as well as a key press. So that I could do something like this:

  
if key.name == "z" then  
 trigger_note(instrument, track, note, velocity)  
elseif key.name == "z_off" then  
 trigger_note_off(instrument, track, note)  
end  
  

Also, this:

I’d like to request a function named dbug() be added to Lua.Standard.API.lua. Basically a compliment to oprint, rprint, and print.

Example:

  
function dbug(msg)  
 if _MAGIC_FUNCTION(msg) == 'object' then oprint(msg)  
 elseif type(msg) == 'table' then rprint(msg)  
 else print(msg) end  
end  
  

This would save me a lot of grief.

oprint is not really an equivalent to rprint. It does not print an objects “state” but its available functions and properties.
If this nevertheless would be useful, you can use something like to roll up your own “dbug”:

  
function is_class_object(object)  
 local is_base_type = {  
 ["nil"]=true, ["boolean"]=true, ["number"]=true,  
 ["string"]=true, ["thread"]=true, ["table"]=true   
 }  
 return (not is_base_type[type(object)])  
end  
  

For me, it’s better than the script crashing because I chose the wrong variation of print.

I just needed a quick all-in-one for debugging purposes.

The code snippet will do the job.

Thanks!

Sample Recorder:
"more control of the recording dialog: FX track, Sync to pattern, Create new Instrument, etc. ( fromhttps://forum.renoise.com/t/the-api-wishlist-thread/29285)

renoise.song().transport:sample_recorder.sync.none()
renoise.song().transport:sample_recorder.sync.pattern()
renoise.song().transport:sample_recorder.record_dry()
renoise.song().transport:sample_recorder.inputch.left()
renoise.song().transport:sample_recorder.inputch.right()
renoise.song().transport:sample_recorder.inputch.both()
renoise.song().transport:sample_recorder.monitor()
renoise.song().transport:sample_recorder.input.list()
renoise.song().transport:sample_recorder.input.1 to X according to list
renoise.song().transport:sample_recorder.fx.list()
renoise.song().transport:sample_recorder.fx.1 to X according to list

Focus + Expansion in Window:
Disk Browser (+focus), Master Spectrum, DSP loader expanded “extended” setting

renoise.app().window.diskbrowser.focus = true
renoise.app().window.diskbrowser.expanded = true
renoise.app().window.upperframe.masterspectrum.expanded = true
renoise.app().windows.lowerframe.trackdspload.expanded = true

Resize Window sizes:
LUA control over resizing window sizes.
Control over size of upper frame and lower frame


ReWire functions:

Api function for saying “Renoise in ReWire mode true/false” -> then can detect rewire and set master to bus1/2 and carry on.

Show available Audio input / output devices:

renoise.app().audioindriver.show_all_available
renoise.app().audiooutdriver.show_all_available
renoise.app().audioindriver = LineInput (sets from the all_available.)
renoise.app().audiooutdriver = Soundflower(2ch) (sets from the all_available.)

Renoise Native Plugins -listing

renoise.song().instruments[].plugin_properties.available_plugins[] -> Renoise native plugins listing

Instrument Settings:

“Instrument Settings -Tab -like control for Disk Browser”.

renoise.app().window.active_upper_frame.tab = DISK_BROWSER_SONG
renoise.app().window.active_upper_frame.tab = DISK_BROWSER_DSPCHAIN
renoise.app().window.active_upper_frame.tab = DISK_BROWSER_INSTRUMENT
renoise.app().window.active_upper_frame.tab = DISK_BROWSER_SAMPLE
renoise.app().window.active_upper_frame.tab = DISK_BROWSER_THEME

Midi-mapping

  • Possibility to bind a midi-mapping to a regular keybinding, such as CC#XX to “Pattern Editor->Player->Play Current Line”

Cursor Focus in GUI:
Script is allowed to set cursorFocus on a specific button, or window in the Script GUI

Direct function call for “play current line of current track” or “play current line of current pattern”.
just like if you pressing return for playing only one line. Without any position scrolling. And without enabling the play symbol! And please BEFORE the playing of keyboard or midi input happens!!! So it plays like it wasn’t edited.

renoise.song().transport:play_one_line_at(pos)

Bind “Pattern Editor:Navigation:Toggle Play On Edit” to a shortcut.

Phrase Editor:
Possibility to select a phrase, or set the selection in phrase to null.
Possibility to set where the cursor is in the phrase.
Possibility to follow pattern playback.
Possibility to have wrapped phrase editing (like in wrapped pattern editing)

renoise.song().phrase.selection_in_phrase = nil
renoise.song().instruments[].phrases[].lines[selected_phrase_index] == current_phrase_index is readable / writeable
renoise.song().phrase.follow_pattern
renoise.song().instruments[].phrases[].lines[].note_columns[].delay_value
renoise.song().instruments[].phrases[].lines[].note_columns[].delay_string
renoise.song().transport.wrapped_phrase_edit
renoise.song().selection_in_phrase

Sample Editor:
Functions for converting Stereo sample to Mono. Sample Rate, or Bit Depth.

Autofade control:

renoise.song().selected_sample.autofade
renoise.song().selected_sample.autofade_observable

“Keep/Mute” API functions for #send and #MultiSend - the other parameters can be called from the API but not keep/mute states.

renoise.app().window:select_preset_observable:add_notifier(foo)

“and a way to tell which preset it moved to from the defined foo notifier function”

Automation control:

renoise.song().patterns[].tracks[].selected_automation_device_index, _observable

from https://forum.renoise.com/t/the-api-wishlist-thread/29285

what Joule requested athttps://forum.renoise.com/t/the-api-wishlist-thread/29285:

renoise.app().window.selected_focus_index = 0

and I echoed at "I too would love to set TrackDSP_focus , TrackDSP_loader_focus , DiskBrowserFiles_focus , DiskBrowserFolders_focus , InstrumentBox_Focus , PatternMatrix_Focus… and many others. "

True control over DC Offset Auto On/Off mode in LUA scripting:

renoise.song().selected_track.devices[2].parameters[2].value=1 (when DC Offset is Device#1 (aka 2), changing this does not create a new dcoffset device that would automatically have autoDC on.

#Line-In Device updates with more API functions:

Setting of Channel, input-channel (left-right-stereo)


  • Load & Save DSP Chains (.xrnt)
  • Load & Save Instruments (.xrni) -> having these allows for mapping shortcuts to load both an instrument and a dsp-chain. priceless.
  • External macOS Clipboard access (if sample data is in clipboard, can paste to Renoise – if sample data is copied in Renoise to clipboard, can paste to another app)
  • Pattern Sequence Matrix Visible True/False (maybe this is possible nowadays?)
  • “API for access to Renoise’s 4 clipboards would be awesome”
  • possibility to add menu entries into this row:
  • 7890 onlyrequest.png
  • Read LFO device setting (amount) and make that amount available as a input in scripting (
  • Script can map a LFO device to the Sample loop start & sample loop end parameters.)

renoise.app().window.upperframe.masterspectrum.drawingmode = (selection of the 4 possible drawing modes)

7891 post-6443-0-42783000-1419341643.png




moved tohttps://forum.renoise.com/t/the-api-wishlist-thread/29285

Allow retreival of the exact position of the cursor on ins/pan/vol/delay column level:

renoise.song().selected_note_column_object(renoise.song().selected_note_column_index) returns:
1: cursor is in the notecolumn
2: cursor is in the instrument column
3:cursor is in the volume column
4:cursor is in the panning column
5:cursor is in the delay column.

My ‘simple’ requests:

  • Currently we have sample_buffer:set_sample_data(channel, frame, value). Iterating over this in Lua is slow. I think it would be great if we could read/write a channel of data as a Lua table. e.g. sample_buffer:set_sample_data_block(channel) = {0,0,1,1}. This would fail if #table is not equal to sample_buffer.number_of_frames.
  • API access to instrument parameters (as frequently requested).
  • Access to a FFT and IFFT function. Presumably they must exist due to the frequency spectrum view. This can be implemented in Lua but it’s not the fastest method in the world.

I would need a function that pauses the recording of undo, and one that resumes it.

Sometimes you make scripts that temporarily alters a lot of parameters, but you don’t want these actions to clutter the users undo buffer.

renoise.song().sequencer.selection  

returns a table of the pattern numbers selected in the sequencer:

2245 selected.PNG

i.e above returns {188,183,194,196}

Ledger, It might be better to return the sequence number instead of the pattern numbers? The API is lacking access to selected sequence range, and pattern numbers can then be obtained via renoise.song().sequencer.pattern_sequence

  1. Listbox
  2. Canvas

How can I know whether a feature is already planned? :)

You can only figure out whether a feature “was” planned.
And that moment will be when the next beta is released :)

A listbox would be nice indeed, but only if it also would support mulitple selections (with shift or control pressed)

The ability to use the leverage advanced edit properties and functions.

This would be immensely helpful and save much time and effort.