# The Api Wishlist Thread

**URL:** <https://forum.renoise.com/t/the-api-wishlist-thread/29285>\
**Category:** Renoise Tool Development\
**Created:** [July 23, 2010, 12:02pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285 "2010-07-23T12:02:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![noisebeuter](https://forum.renoise.com/letter_avatar/noisebeuter/32/6_449c533f586939b6e5f246632a46421f.png) [@noisebeuter](https://forum.renoise.com/u/noisebeuter)\
**Post date:** [July 23, 2010, 12:02pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/1 "2010-07-23T12:02:40Z")

</div>

The title says it all. Please post only stuff that you know is not possible at the moment and where you don’t know if it will be possible in a future release (don’t post realtime dsp stuff, for example)

Okay, I’ll start:

- Attach custom events to view objects (e.g. clicking a text label, dragging a button, right-clicking a slider)
- Custom context menus for views
- Canvas-like object to draw stuff on

---

<div class="post-metadata">

**Author:** ![Suva](https://forum.renoise.com/user_avatar/forum.renoise.com/suva/32/222_2.png) [@Suva](https://forum.renoise.com/u/Suva)\
**Post date:** [July 23, 2010, 12:17pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/2 "2010-07-23T12:17:56Z")

</div>

Canvas … ![:w00t:](https://files.renoise.com/forum/emoticons/default/w00t2.gif)

---

<div class="post-metadata">

**Author:** ![epc](https://forum.renoise.com/letter_avatar/epc/32/6_449c533f586939b6e5f246632a46421f.png) [@epc](https://forum.renoise.com/u/epc)\
**Post date:** [July 23, 2010, 12:46pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/3 "2010-07-23T12:46:19Z")

</div>

[Rendering](https://forum.renoise.com/t/rendering-selection-tracks-songs-via-the-api/29181),  
Canvas (to draw curves with control points especially)

---

<div class="post-metadata">

**Author:** ![Beatslaughter](https://forum.renoise.com/user_avatar/forum.renoise.com/beatslaughter/32/236_2.png) [@Beatslaughter](https://forum.renoise.com/u/Beatslaughter)\
**Post date:** [July 23, 2010, 1:03pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/4 "2010-07-23T13:03:49Z")

</div>

- Each Renoise object should have :set\_userdata() and :get\_userdata() methods, where i can assign a table with my own values.

- Enable and disable viewbuilder controls.

- Listbox and treeview viebuilder controls.

That’s it mostly for now. ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 23, 2010, 1:04pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/5 "2010-07-23T13:04:49Z")

</div>

– +1 for rendering!! I was thinking about something that renders the song then generates a spectrogram… and if you really wanted to, I think you might eben able to create a track freezing plugin with that (!)

– Mouse input, in relation to the dialog, in screen coordinates and as raw movement (ie. if you move the cursor to the right screen edge but keep moving it still registers that movement, even though the cursos position doesn’t change)

– Hooks for keyboard input (like when you’re in a text field and press “up” or “down”, allow scripts to catch that and act on it)

– OpenGL, and I’m not joking. There is no contest between 2D and 3D drawing speed wise, 3D is about a billion times faster, and uses a lot less CPU, generally/crossplatform speaking. I realize that it would be overkill for most and would STILL require pixel perfect 2D drawing. However, if that could just be plugged in so to speak, I think it would be a really good idea. Let the scripts create their own helper functions, “just” provide access to the OpenGL API.

– A way for plugins to share scripts and data. Maybe that prefix could be used? blah.bluh.pluginname is the convention anyway, so blah.bluh could be the name of the folder where each plugin developer can put “their stuff” (common functions you use all the time, a logo for the about menu, whatever). Or would that invite sloppyness and accumulation of crud?

– Envelopes as a standardized GUI element. It doesn’t have to be extremely powerful, just what the current envelopes do, plus a vertical edition. If possible, make them all inherit from the same code, so that if they get be improved and all plugins and Renoise sections that use envelopes benefit from that automatically.

---

<div class="post-metadata">

**Author:** ![vvoois](https://forum.renoise.com/letter_avatar/vvoois/32/6_449c533f586939b6e5f246632a46421f.png) [@vvoois](https://forum.renoise.com/u/vvoois)\
**Post date:** [July 23, 2010, 1:18pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/6 "2010-07-23T13:18:17Z")

</div>

> [@Johann](#):
>
> – Hooks for keyboard input (like when you’re in a text field and press “up” or “down”, allow scripts to catch that and act on it)

This already exists:Try the key\_handler hook in the dialog creation mode…  
app():show\_custom\_dialog(title, content\_view, key\_handler\_func)

function key\_handler\_func(dialog, key)  
key read… do stuff  
end

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 23, 2010, 1:26pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/7 "2010-07-23T13:26:48Z")

</div>

> [@vV](#):
>
> This already exists:Try the key\_handler hook in the dialog creation mode…  
> app():show\_custom\_dialog(title, content\_view, key\_handler\_func)
> 
> function key\_handler\_func(dialog, key)  
> key read… do stuff  
> end

yay!!

okay, make that “me actually knowing about what the API can do” ![:D](https://forum.renoise.com/uploads/default/original/2X/4/4e279733a789da83bda5b44aedcf6a0d5178edcb.gif)

Maybe the code that marks up {lua} forum tags could be used to make the documention a bit nicer? I’m not saying it’s the fault of the docs that I haven’t read them, but it would reeeeally help.

One thing that does kinda get me is the order though:

description description description description description description  
the thing being described

Is there a reason for this? the other way around would be much more logical for me, easier to scan etc.

---

<div class="post-metadata">

**Author:** ![noisebeuter](https://forum.renoise.com/letter_avatar/noisebeuter/32/6_449c533f586939b6e5f246632a46421f.png) [@noisebeuter](https://forum.renoise.com/u/noisebeuter)\
**Post date:** [July 23, 2010, 1:26pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/8 "2010-07-23T13:26:49Z")

</div>

> [@Johann](#):
>
> – OpenGL […]

I don’t think that this would make drawing from a script faster. The bottleneck is not the Renoise software rendering engine, but Lua. C++ is orders of magnitude faster than Lua, and calling all those OpenGL functions directly from Lua would require a LOT of conversion from Lua types to C++ types (which is slooooow).

> [@Johann](#):
>
> – Envelopes as a standardized GUI element.

+1 to that!

---

<div class="post-metadata">

**Author:** ![It-Alien](https://forum.renoise.com/user_avatar/forum.renoise.com/it-alien/32/41_2.png) [@It-Alien](https://forum.renoise.com/u/It-Alien)\
**Post date:** [July 23, 2010, 1:28pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/9 "2010-07-23T13:28:38Z")

</div>

ability to access the automation curve context menu

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 23, 2010, 1:34pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/10 "2010-07-23T13:34:59Z")

</div>

> [@vV](#):
>
> This already exists:Try the key\_handler hook in the dialog creation mode…  
> app():show\_custom\_dialog(title, content\_view, key\_handler\_func)

no wait, that applies to the whole dialog… how would the dialog know I’m in textfield X when pressing cursor up/down?

so an optional key handler for all input fields would still be nice ![:)](https://forum.renoise.com/uploads/default/original/2X/f/f31646767a12ff3f4d6b8c4766d2ea41b23d4ab9.gif)

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 23, 2010, 2:07pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/11 "2010-07-23T14:07:10Z")

</div>

> [@noisebeuter](#):
>
> I don’t think that this would make drawing from a script faster. The bottleneck is not the Renoise software rendering engine, but Lua. C++ is orders of magnitude faster than Lua, and calling all those OpenGL functions directly from Lua would require a LOT of conversion from Lua types to C++ types (which is slooooow).

yeah okay you have a point there… how does LÖVE do it? I guess they have they provide high level functions written not in LUA, but accessible to LUA…

would it be feasible to just, uhm, stick LÖVE into Renoise haha?

---

<div class="post-metadata">

**Author:** ![Beatslaughter](https://forum.renoise.com/user_avatar/forum.renoise.com/beatslaughter/32/236_2.png) [@Beatslaughter](https://forum.renoise.com/u/Beatslaughter)\
**Post date:** [July 23, 2010, 2:12pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/12 "2010-07-23T14:12:04Z")

</div>

> [@Johann](#):
>
> so an optional key handler for all input fields would still be nice ![:)](https://forum.renoise.com/uploads/default/original/2X/f/f31646767a12ff3f4d6b8c4766d2ea41b23d4ab9.gif)

Could be solved by supplying additionally the originating control id to the keyhandler function maybe.

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 23, 2010, 2:20pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/13 "2010-07-23T14:20:14Z")

</div>

It turns out text input fields actually bypass the key handler completely. In a way this makes sense to not “bother” the dialog with it, but I still think it’s needed… and I’d also like the ability to register a keyboard handler for individual inputs without having to write a big function which handles them all… basically, everything that can have focus should have its own optional keyboard handler.

---

<div class="post-metadata">

**Author:** ![engine](https://forum.renoise.com/user_avatar/forum.renoise.com/engine/32/245_2.png) [@engine](https://forum.renoise.com/u/engine)\
**Post date:** [July 23, 2010, 2:37pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/14 "2010-07-23T14:37:01Z")

</div>

> [@](#):
>
> i guess im right when i say that the api (or even the way renoise handles plugins [and their GUIs])  
> isnt able to get the last touched slider in a plugin gui.
> 
> its only possible to write automation to already declared (automated) parameters, right?
> 
> would like to make a autolink -script. i think its tedious to grab that automation device and search the parameters everytime you want to automate a single knob/slider.

---

<div class="post-metadata">

**Author:** ![vvoois](https://forum.renoise.com/letter_avatar/vvoois/32/6_449c533f586939b6e5f246632a46421f.png) [@vvoois](https://forum.renoise.com/u/vvoois)\
**Post date:** [July 23, 2010, 4:09pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/15 "2010-07-23T16:09:45Z")

</div>

> [@Johann](#):
>
> It turns out text input fields actually bypass the key handler completely. In a way this makes sense to not “bother” the dialog with it, but I still think it’s needed… and I’d also like the ability to register a keyboard handler for individual inputs without having to write a big function which handles them all… basically, everything that can have focus should have its own optional keyboard handler.

Well, as far as the discussion goes about input fields, there might be coming at least a trick to force focus on specific fields.  
Based upon my nagging for having consequent input focus on the text-field in the chat script. (You can still type if the field has no focus and it ends up there, but try to make capitals or punctual signs that require a shift-key combo etc.)  
No doubt it should probably come with a tab / shift-tab to browse through these controls.

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 23, 2010, 8:00pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/16 "2010-07-23T20:00:32Z")

</div>

reading and setting the current position/zoom in the sample editor.

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 23, 2010, 10:08pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/17 "2010-07-23T22:08:09Z")

</div>

It would be cool if the selection in the sample editor could be observable.

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 24, 2010, 2:57am UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/18 "2010-07-24T02:57:19Z")

</div>

Reading and writing text files!

(Rubberband has a --timemap feature which expects a text file with two frame numbers on each line to create a timestretch that varies over time… it sounds amazing haha… but it’s not possible to create such a file with a script ![:(](https://files.renoise.com/forum/emoticons/default/sad.gif) )

Functions to copy parts of one samplebuffer to another.

---

<div class="post-metadata">

**Author:** ![Johann](https://forum.renoise.com/user_avatar/forum.renoise.com/johann/32/460_2.png) [@Johann](https://forum.renoise.com/u/Johann)\
**Post date:** [July 25, 2010, 5:24pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/19 "2010-07-25T17:24:17Z")

</div>

> [@Bantai](#):
>
> [http://lua-users.org/wiki/IoLibraryTutorial](http://lua-users.org/wiki/IoLibraryTutorial)

yay! for some reason I thought we weren’t allowed that, because of the whole document/preferences comfort. rubberband, here I come! ![:D](https://forum.renoise.com/uploads/default/original/2X/4/4e279733a789da83bda5b44aedcf6a0d5178edcb.gif)

- file dialog GUI element: a line with the file/foldername, and the common […] button next to it, in one package. with a bunch of options to only show/allow selection of folders or files with certain extensions.

```lua
renoise.app():prompt_for_filename_to_read({file_extensions}, dialog_title)  
renoise.app():prompt_for_multiple_filenames_to_read({file_extensions}, dialog_title)  
  

```

- allow png for bitmaps (!)

- permanent plugin data folders (that get deleted at uninstall) this is tricky though. I’m was thinking that it’s silly to have to download 6mb of rubberband every time 20k of script get updated, and if there is a clean way to avoid that we should find it… but then there would have to “full install” and “upgrade” versions of plugins so to speak. so yeah, it’s tricky and might be more complicated than useful, just wanted to throw it out there.

- about the previously suggested functions that copy parts of one sample buffer to another: sample\_buffer:copy\_buffer(target\_buffer, source\_start, target\_start, frames\_to\_copy(, source\_channel, target\_channel)) (ie. it would be nice to not have to think about mono vs. stereo samples and have it just work, as long as both sample buffers have the same number of channels and same bit depth (sample rate shouldn’t matter with this, strictly speaking) - but to also have the possibility to be more specific)

- functions to replace on sample buffer with another (changing the length, sample rate, channels and bit depth, adjusting loop points so they’re in range, but keeping all other data including the name intact)

---

<div class="post-metadata">

**Author:** ![esaruoho](https://forum.renoise.com/user_avatar/forum.renoise.com/esaruoho/32/795_2.png) [@esaruoho](https://forum.renoise.com/u/esaruoho)\
**Post date:** [July 25, 2010, 10:17pm UTC](https://forum.renoise.com/t/the-api-wishlist-thread/29285/20 "2010-07-25T22:17:19Z")

</div>

EDIT:

moved to[https://forum.renoise.com/t/the-api-wishlist-thread/29285](https://forum.renoise.com/t/the-api-wishlist-thread/29285)

[Next page](https://forum.renoise.com/t/the-api-wishlist-thread/29285.md?page=2)
