Eq10 Hz - Can It Be Read And Set?

Hi, can the EQ10 HZ settings be read - and can they be set by the API? :)

The hz values can’t be set, although they can technically be read via the names of the eq10’s parameters (“50 Hz”, “100 Hz”, etc.). The channels to apply to (“L”, “R”, “L-R”, “L+R”), as well as the Q’s of the bands can’t be accessed/read through the API either. :(

Edit: none of these can be accessed with the device.parameters table, but are easy to set via device.active_preset_data. See post below.

Boohoohoo. It would’ve been great to say set 50hz and autogenerate harmonics for said freq for the rest of the EQs in EQ10 :)

Never mind what I said earlier, as I spoke too soon. Although changing the hz’s isn’t possible with the device.parameters table, it’s definitely possible by modifying device.active_preset_data. Here’s a snippet I just wrote up.

Click to view contents
function get_nth_frequency(device, freq_number)  
 freq_number = freq_number - 1  
 local captures = string.gmatch(device.active_preset_data, "<frequency>(.+)</frequency>")  
 return captures()  
function replace_nth_frequency(device, freq_number, new_value)  
 if (not tonumber(new_value)) then  
 if (tonumber(new_value) > 20000) then -- emulate Renoise GUI behavior  
 new_value = 20000  
 elseif (tonumber(new_value) < 20) then  
 new_value = 20  
 freq_number = freq_number - 1  
 device.active_preset_data = string.gsub(device.active_preset_data,"<frequency>(.+)</frequency>", "<frequency>"..new_value.."</frequency>")  

You can use it like this:

example_device = renoise.song().tracks[1].devices[2] --- assume I have an EQ here  
get_nth_frequency(example_device, 1) -- returns the 1st frequency of the EQ  
replace_nth_frequency(example_device, 1, 75) -- sets the 1st frequency of the EQ to 75  

While it’s a sort of a workaround, it should be suitable.
Edit: code is a-changin’

Thanks, got it working! Setting the EQ is a real doddle with this, and setting harmonics of the fundamental eq freq is easy too. Thank you :)