Note-consistent keytracked filter via formula device

WE REALLY NEED TO BE ABLE TO UPLOAD FILES TO THE TIPS AND TRICKS FORUM

This is a key tracked filter that tries to stay on a certain harmonic of an instrument. Tries, because it’s a little buggy and not completely working as intended, does what I need of it though. I find it useful for a vast array of things.

The third parameter in the formula is a multiplier for the range of the filter, you should also probably have the 1000 in the formula as another passable parameter as well. Dirty but works is what this chain is in a nutshell.

For now, if it stops working (formula device has an error), just edit anything in the code then change it back, the issue of it is going out of range. (unless you need the full c0-c9 range this shouldn’t really be an issue most of the time)

http://www.mediafire.com/download/g7k242zau9jaxmx/keytracked_filter.xrns

Code for dumping values to console for building the lookup table:

--[[ Paste into console to locate desired device parameter  
renoise.song().selected_device.parameter[1].name  
]]  
  
--parameter number  
local param = 2  
--number of characters (digits) to use in parameter.value_string, to cut off " hz" etc.  
local rem = 4  
  
local sel_dev = renoise.song().selected_device  
local sel_par = sel_dev:parameter(param)  
  
--local tbl = {}  
  
local val_string  
  
local last_string = 0  
  
  
sel_par.value = 0  
  
while sel_par.value ~=1 do  
  
 if sel_par.value > 0.83068418502808 then rem = 5 end --when reaching a certain value, change the used string length, dirty but works  
  
 val_string = tonumber(string.sub(sel_par.value_string, 0, rem))  
  
 if val_string > last_string then  
 last_string = val_string  
 --tbl[tostring(last_string)] = sel_par.value  
  
--print(last_string)  
print(sel_par.value)  
  
  
 end  
  
 if sel_par.value > 0.9999 then break end  
  
 sel_par.value = sel_par.value + 0.0001  
end  

Then I just used excel to format into a form of a lua table.

You should be able to adapt this code for any other dsp, which includes making tuned devices with an alternative tuning or, arguably more useful, same tuning but to a different reference frequency. (as used in this filter chain)