@encryptedmind. If you want to investigate more, install the demo of this software:
Sublime HD : https://www.supramotion.de/software/downloads
It is a video editor for Blu ray and DVD, which has blatant similarities with Renoise. You look at the GUI. The last version 2.1.1 is in 2012, price 242€ (include VAT).
Manual: https://www.supramotion.de/Download/Sublime_HD_Manual.pdf
Yeah the software is nice and some elements of the UI have parallels with Renoise
Am getting into Lua 4th chapter now and will start filling the scripting forums very soon with noob questions and I have a couple of tool designs already in place… will start rolling them out now ?
Btw @raul, are you comfortable with XStream models scripting? I think the chord analyser logic is all set with me but getting into Lua, XStream, APIs at the same time will not be too productive. I can focus on Lua and Renoise tools, but XStream seems to go on a related but deeper tangent. Maybe you can write a mini chord analyser model and I can take it from there? Or else I will just have to wait for me to turn up with it in time ?
For a mini chord analuzer, the workflow is read midi input and process the input to display a text string that tells the chord type. Midi input is processed by Xstream, also the note selection arrays etc are readable, but some amount of Lua programming needs to be done to make the basic logic work. It can work just on C,F,G, Am chords for now. The simplest way is to read the note string only and ignore the octave, search for the preset chord note sequence in an array or list and for every correct match in the table it prints out the chord name. The octaves are not needed since they can be all normalised to the note name itself. This would mean inversions are taken care of but for now a ‘simplifying chord analyser’ would just be perfect step in the right direction. So when user presses A,C,E he reads Am from the model output.
Btw I already figured out how to make my own Renoise tool keybindings and menu entries where I see that I can change the menu strings or menu placement just by editing the script text. I moved the Tap Tempo tool from the tools menu to my Pattern Editor context menu, exactly as I would like it and I changed the menu strings of some tools to funny names or acronyms, nice to play with this stuff-location and description. I also can read all the renoise.song() objects and print all string values obtained. I also ran many of the functions from the math library and the os class like os.execute() which I made execute the calc.exe just by feeding “calc.exe” as the string which means it reads the environment variables and can run system application directly; the os.clock(), and io class functions. rprint() and oprint() for recursive and object displays of Renoise objects. I checked the invoke parameter in the tool script to call the main function. Also am using the scripting terminal with its superb ease of use in terms of tool integration,reload all tools feature, Lua syntax colouring, XML viewer and simple key commands for run(Ctrl+R), editor(ctrl+E) and terminal(ctrl+T). You access the tool scripts that Renoise loads, on the left, where in addition to the resources the main.lua is where all the action happens and the manifest.xml file is where you set the tool description properties. I also read the note vales from the terminal by feeding the Renoise.song() properties and
functions like, pattern [1].track[1].line[1].column[1] (if I remember correctly while typing now) where I can see the note string and the note number (in another parameter) of the note column and the line in query. Great stuff! I can also set the value similarly just by feeding a string like ‘C-4’ or a number like 60 to the same line. Thus if I encapsulate the setter/getter inside a print() function I can query it and without using print I can set the values as in a regular function. Also all the indexes are from 1. The changes are immediately reflected in the Renoise Patten editor. Similarly transport controls are done programmatically by start stop functions. A start from line number function is also there and I can also change the tempo using one of Renoise.song() functions. Super deep library for sure, certainly in terms of supporting the core Renoise features.
Really having fun reading all the work done so far. @joules tools are the simplest and very informative, as well as the Tap Tempo tool and Ledger scripts. Finally I get to see what the Find and Replace tool is working behind like and a peek at the more daunting ones from @danoise and yourself and a few others.
The viewbuilder object is used to populate GUI elements and the example tools show well enough how to use them. Suddenly Renoise tooling looks very feasible for newcomers as well
So now if I want to make a tool that can increment or decrement a value, all I need to do is store the ‘selected lines’ range value and use that length to read the lines to a table. Once in the table, the column types can be individually accessed as 3,4,5,6,7,8 from a single line. If there are single note columns the V/P/D/FX follow a linear incrementing index system making programmatic access easy. From there a bit of sorting and just feeding the new set of values and writing the table back should work. Much like the Find and Replace kind of codes but with a few more changes.
Now I just need to practice enough Lua to know how to read tables and how to feel comfortable doing it. Also a few nice things about Lua, you read the length of a string by a #prefix. Sweet. You can use long strings by using double square brackets [] and putting any thing between that to display exactly as intended. Lua is also quite deep so I have just scratched the surface.
I have one question(of many) though right now, how do I feed the path of a file in order to use the File.readbytes() function since I am giving a fully qualified name like C:\1.svg but it is not reading anything. Is it only reading files from the current tool directory or maybe it needs a specific path format string?