Jump to content


Photo

[Tool Idea] Param Predictor (working prototypes attached)


  • Please log in to reply
21 replies to this topic

#1 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 17 February 2013 - 21:15

Edit: Best implementation of idea so far:

http://www.renoise.c...getpluginparams

Thanks vV

-=-=-

Also known as Midi learn, but this tool doesn't require Midi IMHO.

Idea taken from here. It would be cool if instead of looking for a parameter through a menu (some vsti have awfull lot of different parameters) you could have a tool tell you what parameter you are moving. You'd just hit a button named [Go] or [Learn], move the knob, and your parameter would be highlighted in the list of parameters.

One approach could be to take a snapshot of all the values of plugin_properties by iterating over 'parameters'. Then, the user clicks a Lua button that says [Go]. Then, when you move a knob one of the plugin_properties will have changed and all the others would not have changed. With that data, you can easily conclude that "Param365" was turned.

Problem: Sometimes you have an oscillator that constantly shifts values. You could compensate for this by taking a dozen snapshots when the user presses [Go]. Then you see: analyzing. Then: ready. Then: User moves a knob. Anything that was already changing is disregarded from the data set.

Highlighting is probably not possible, but displaying the name certainly is.

An so on.


Edited by Conner_Bw, 20 February 2013 - 19:18.
vV to the rescue.

  • Djeroek and KMaki like this

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#2 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 17 February 2013 - 22:07

Some code to get someone else started. A lot more todo but the concept is sound IMHO.


local data = table.create()

local selected = renoise.song().selected_instrument
local plugin = selected.plugin_properties.plugin_device
if (plugin == nil ) then
 renoise.app():show_message("Invalid selection. No plugin here!")
 return
end

local param_count = #plugin.parameters
for i = 1, param_count do
  data[i] = plugin.parameters[i].value
end

-- Your data set:
-- rprint(data)

-- TODO: 
-- A loop in a renoise.tool().app_idle_observable, compare to data, when found do:
--[[
for i = 1, param_count do
  if data[i] ~= plugin.parameters[i].value then
    found = i
    break
  end
end
]]---

local j = found;
renoise.app():show_message( "You moved the " .. plugin.parameters[j].name .. " parameter.")

-- Teardown app_idle_observable, etc.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#3 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 18 February 2013 - 02:15

Some code to get someone else started. A lot more todo but the concept is sound IMHO.



Nice start.
Some things may be possible, but not in all cases.
With the effect plugins, i suspect stuff is possible. you could figure out which parameter you are changing in the Fx plugin editor and allow a user to make the parameter "visible"in the mixer.
Even though the is_automatable parameter is read-only, this way, one can at least tag parameters for automation by rightclicking on them in the mixer-view because we can influence if parameters are shown or hidden in the mixer view.

With instrument plugins, we have a pretty serious problem because we lack two two fundamental aspects for the instrument automation device in the current API.

Just to continue on your above suggestion, i once created this snippet right after i released the pitch device plugin:


function get_active_instrument_parameters()
  local sng = renoise.song()
  local cur_ins = sng.selected_instrument_index
  
  if sng.instruments[cur_ins].plugin_properties.plugin_loaded == false then
    return -1
  end  
    
  local vsti_parameters = sng.instruments[cur_ins].plugin_properties.plugin_device.parameters

  for x = 1, #vsti_parameters do
    local func_ref = 'i'..tostring(cur_ins)..'p'..tostring(x)
    
    if device_notifiers[func_ref] == nil then
      device_notifiers[func_ref] = function()
        local ins_name = sng.instruments[cur_ins].name
        local title = vsti_parameters[x].name
        local parvalue = vsti_parameters[x].value_string
        local message = "Instrument ["..ins_name.."]  is changing parameter #"..tostring(x).." ["..title..
        "] with value ["..parvalue.."]."
        renoise.app():show_status(message)        
      end
    end
    
    if not vsti_parameters[x].value_observable:has_notifier(device_notifiers[func_ref]) then
      vsti_parameters[x].value_observable:add_notifier(device_notifiers[func_ref])
    end
    
  end

end


 renoise.tool():add_menu_entry {
   name = "Main Menu:Tools:show plugin parameters",
   invoke = get_active_instrument_parameters
}

In the above case we speak of figuring out which parameter of VSTI plugin X we need. The only way we can do some figuring out is if we can control the Inst. automation device in more details
There are however two problems that we as scripters can't overcome here.
Problem one:We cannot change the selected parameter link in the instr. automation device
Problem two:We cannot find out which parameters *are* exactly linked to the vsti instrument.

And what do i mean with problem two? Well the parameters in the instrument automation device don't have a relative link number, only a name, but the name won't help us as this painful screenshot illustrates:
Posted Image

Currently this is what we have

class: DeviceParameter
 properties:
    is_automatable
    is_automated
    is_automated_observable
    is_midi_mapped
    is_midi_mapped_observable
    name
    polarity
    show_in_mixer
    show_in_mixer_observable
    time_quantum
    value
    value_default
    value_max
    value_min
    value_observable
    value_quantum
    value_string
    value_string_observable
 methods:
    __STRICT
    record_value

We lack a parameter index (which parameter number of that plugin is frankly selected?) to do the actual comparing with what we got back from the parameter notifier of the vsti plugin that we are monitoring.
And we also need this index to be read/write enabled, else we won't be able to program the instr. automation device for the user.
So if the instr. automation device would be expanded with that one editable property, we can script a parameter-learning system for vsti plugins.
Owhyeah, ofcourse, we need to know which plugin is linked, so also the linked instrument index needs to be available for reading and writing.

Edited by vV, 18 February 2013 - 02:20.

  • Conner_Bw likes this
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#4 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 18 February 2013 - 05:26

Good stuff vV, but we do know the index. It's `i`

for i = 1, param_count do
  data[i] = plugin.parameters[i].value
end

In your example it's [x]. The order won't change.

For sure there are limitations, but with clever hacks and motivation someone could certainly build something useful if they tried?

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#5 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 18 February 2013 - 15:11

Good stuff vV, but we do know the index. It's `i`

for i = 1, param_count do
  data[i] = plugin.parameters[i].value
end


In the plugin parameters, yes we have the index.
But on the instrument automation device (we are still trying to find the right VSTI parameter to automate), what is the current index-value of the dropdown of parameter x?
We can read its name and its value. but that's it. We can't alter it, we can't match it.

Ofcourse, our code snippets are already helpful for a lot of plugins that have very cryptic parameter names and in that regard you may be able to find them, as long as their name is really unique.
But voyager has quite a few parameters called "Lfo1 -> Pitch", if you have to look that up in the instrument automation device, which one to take? The code snippets above tells someone it is for example parameter #563, but are you going to scroll down and count up to 563 manually?
You will of course perform an educated guess and pick one of the lower copies instead of the top options. But still not really user-friendly, specially not if a plugin has thousands of those Posted Image
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#6 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 18 February 2013 - 16:39

Well, I hope someone builds it up to the most usable point, then whatever is missing could be added to the API with concrete demands.

Prototyping by numbers.

Might even be me, but probably not though as I am a bit swamped these days. Also, an asshole.
  • radian likes this

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#7 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6303 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 18 February 2013 - 21:58

I like this idea, but IMHO it would need another approach than statistical sampling and educated guesses.

WHAT IF

The tool came with a dialog that automatically got populated with any & all parameters that were modified for the currently selected device, since the dialog got opened.
Then, using your (special) eyes you could easily determine which one was the knob you were currently twiddling.

Tracking with Stuff. API wishlist | Soundcloud


#8 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 19 February 2013 - 00:10

I like this idea, but IMHO it would need another approach than statistical sampling and educated guesses.

WHAT IF

The tool came with a dialog that automatically got populated with any & all parameters that were modified for the currently selected device, since the dialog got opened.
Then, using your (special) eyes you could easily determine which one was the knob you were currently twiddling.


My brand!

I disagree? Try it.



EDIT: Keep scrolling, this sucks compared to what is next.

TODO:
* Will crash if you change the instrument out from under it.
* Make this better.
* I will not work on this anymore. I just wanted to show it's not bad the way I described it. Tag, someone else is it.

Edited by Conner_Bw, 20 February 2013 - 19:24.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#9 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

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

Posted 19 February 2013 - 00:11

I've been thinking about midi learning too.

The parameter index of Instr. Automation seems to match the parameter index of the VSTi instrument, so I don't see the problem there?

My idea was to temporarily add notifiers to all parameters of a VST (not the ones already automated or controlled). Sometimes a plugin can have tons of parameters, so interpreting .active_preset_data and using a fake notifier loop could possibly be an option.

Then add the menu in the context menu of Instr. Automation: "Learn parameter #no".

Why shouldn't it work?

#10 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 19 February 2013 - 00:49

The parameter index of Instr. Automation seems to match the parameter index of the VSTi instrument, so I don't see the problem there?


The instr. automation device is limited to support only 35 parameters of a VSTI plugin. The first 35 will naturally match the first 35 ones of the linked VSTI plugin. However if you want to control a parameter beyond those first 35, you need to manually adjust one or more of those first 35 parameters.
And if these matches are manually changed, your script fails in matching if it assumes parameter 1 of the inst. automation device would be linked to parameter #1 of the vsti, after somebody altered the choice.
If you do can check this, I so far failed to find any API call that allows me to scan these parameter indexes (in the instr. automation device!) and adjust them in that device because then my parameter learn tool would have been finished for a long time.


You can't check which VSTI plugin is linked to which instr. automation device in Lua.
This means you can't alter that option either.
Again here:if somebody found an API reference, let me know, i haven't been able to find the option myself.
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#11 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6303 posts
  • Gender:Male
  • Interests:wildlife + urban trekking

Posted 19 February 2013 - 03:51

Try it.

I just did - it display a dialog, and hangs until a script timeout occurs.
Fresh install of Renoise with a (take a deep breath) selected instrument/instance of Synth1 with an Instr. Automation device attached to it, on an (also selected) track.

Anyway, I really like the idea of a smart MIDI learn. If the issues mentioned by vV are ironed out, it could become truly great.

Tracking with Stuff. API wishlist | Soundcloud


#12 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 19 February 2013 - 05:51

That's odd. It works for me. Oh well.

I was mostly talking about visual feedback. If you get this script working you will get visual feedback on your last modified knob in a dialogue box. If you turn 10 knobs it will tell you the 10 in the order that you turned them. The feedback will continue until you close the dialogue box.

I'm saying, assuming there is something to show and not --- like in Vv's screenshot, that this is quite sufficient information. There's no reason to overengineer this with some Franken interface. The whole goal at the end of this is that there is *no* interface. The only reason we do an interface right now is because we can't select items in the dropdown using Lua (yet).

But yeah, improvements welcome.

Cheers.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#13 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 20 February 2013 - 00:46

Okay Dac,

Here's one using the parameter notifiers.

http://www.renoise.c...getpluginparams


Posted Image

This one works for both DSP plugins and VST instruments.
It will automatically pop up the external editor if one is available.
Rightclick either on the DSP effect, mixer area or automation list or the instrument slots.
Depending on which area is clicked it will automatically select the DSP or VSTI learner mode.
The show in mixer button turns active in DSP mode only. in DSP mode it will also indicate parameters whether they are automated, midi mapped or combined.

Midi mapped: *no* parameter name
Automated : ^no^ parameter name
both:^no* parameter name
No attachments:[
no] parameter name

Currently nothing much possible with the Instr. automation device. I hope the devs would save us the hassle of using extra API calls and simply abuse this starter-snippet to add a learn and attach functionality in those devices and dsp frames themselves.
Another suggestion i would like to make is to add a view-trigger to only show the parameters that one learned (*if an external GUI is available!*). And if the DSP would be expanded to two columns, a horizontal scroller would allow to scroll through all the parameters rather than that we have to scroll through the whole DSP chain, perhaps even missing the end of the DSP parameter list of that DSP plugin with 5000+ parameters. Just to give DSP parameter fields a more comprehensive birds-eye view.
  • danoise and Conner_Bw like this
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#14 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 20 February 2013 - 19:12

Okay Dac,

Here's one using the parameter notifiers.

http://www.renoise.c...getpluginparams


Hey! Great work VV.

I edited the first post to mention this.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#15 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 20 February 2013 - 19:39

Bug, sort of.

I don't have any good plugins, so just imagine this one has a thousand parameters with crappy names.



* Red indicates what is always moving, ie. Mid Freq.
* Turquoise indicates params I'm moving by hand.

Expected: Selected param in dropdown changes.
Actual: It's always showing Midi Freq.

The tool should be able to ignore params that are constantly moving, and throw the data away as uninteresting.

Good times.
  • Djeroek likes this

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#16 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 21 February 2013 - 03:37

Bug, sort of.

I don't have any good plugins, so just imagine this one has a thousand parameters with crappy names.



* Red indicates what is always moving, ie. Mid Freq.
* Turquoise indicates params I'm moving by hand.

Expected: Selected param in dropdown changes.
Actual: It's always showing Midi Freq.




Ofcourse it is, the LFO is consequently triggering the Mid-Freq parameter. If you would be fast enough, you would be able to somehow review the parameters that you are manually triggering among them, but the tool cannot (well will not) distinguish what is modified by hand or a meta device.

Added a (un)mute button now so you can exclude the specific parameter for listening.
Would that suffice?
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#17 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7060 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 21 February 2013 - 18:20

Added a (un)mute button now so you can exclude the specific parameter for listening.
Would that suffice?


Tried it. Mute works great. Cheers!

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : One million clicks! »


#18 Dunks

Dunks

    Chief Above Chief Member

  • Normal Members
  • PipPipPipPipPipPip
  • 304 posts
  • Gender:Male

Posted 21 February 2013 - 22:45

This is a great tool Thanks, I know its not possible by scripting but it should be part of the vst window itself between keyboard and random.
  • Conner_Bw likes this

#19 toblerpone

toblerpone

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 902 posts
  • Gender:Not Telling
  • Location::c

Posted 11 September 2014 - 17:20

I've just remembered that I had shoehorned in automatic mapping to Instrument Automation Device, so no need for searching the list anymore. be warned: bugs and limitations.

Attached Files


  • slippycurb likes this

#20 Roppenzo

Roppenzo

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 433 posts
  • Gender:Male
  • Location:Netherlands

Posted 12 February 2017 - 22:55

Still loving this tool!!
House Music All Night Long. - Say What?

#21 Roppenzo

Roppenzo

    Big Daddy Member

  • Normal Members
  • PipPipPipPipPipPipPip
  • 433 posts
  • Gender:Male
  • Location:Netherlands

Posted 31 March 2017 - 01:09

I've just remembered that I had shoehorned in automatic mapping to Instrument Automation Device, so no need for searching the list anymore


wow this is awesome!

Edited by Roppenzo, 31 March 2017 - 01:09.

House Music All Night Long. - Say What?

#22 ffx

ffx

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2852 posts
  • Gender:Not Telling
  • Interests:Renoise Sidechain

Posted 31 March 2017 - 09:46

It's also in tuned shortcuts tool with the most complete implementation, AFAIK: http://forum.renoise...uned-shortcuts/

Simply move any handle in the vsti -> automation device is auto setuped. No additional gui involved.