Filtering a parameter
- abject39
- Member
- Posts: 319
- Joined: Sat Jan 17, 2015 8:20 pm
- Location: Ventura, Ca
- Contact:
Filtering a parameter
Does anyone know how it's possible to filter out the options for a parameter? What I want to do is use the clean filter but not have so many filter shape as options for the end user. Is there a way to write a script in order to filter-out/only use specific filter shapes?
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.
-
- Member
- Posts: 869
- Joined: Sun Oct 05, 2014 12:18 am
- Contact:
Re: Filtering a parameter
Yes there is.
Load any Anima preset and inspect the script. It's using only a subset of available filters. Then you can apply the same logic to filter shape or any other parameter that is using indexed string array.
Load any Anima preset and inspect the script. It's using only a subset of available filters. Then you can apply the same logic to filter shape or any other parameter that is using indexed string array.
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44
-
- Member
- Posts: 201
- Joined: Fri Nov 14, 2014 11:41 am
- Contact:
Re: Filtering a parameter
I had a situation where this was needed.
Came up with this:
Came up with this:
Code: Select all
function onFilterList()
if filterList > 5 then
filterList = filterList + 8
end
zone:setParameter("Filter.ShapeA", filterList)
end
filters = {[0] = "LP24", "LP18", "LP12", "LP6", "BP12", "BP24", "BR12", "BR24"}
defineParameter("filterList", nil, 0, filters, onFilterList)
Cubase Pro 8.5.2
Halion 6
HSO
Padshop Pro
Dark Planet
Halion 6
HSO
Padshop Pro
Dark Planet
- abject39
- Member
- Posts: 319
- Joined: Sat Jan 17, 2015 8:20 pm
- Location: Ventura, Ca
- Contact:
Re: Filtering a parameter
Awesome! You guys are a life saver!
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.
- abject39
- Member
- Posts: 319
- Joined: Sat Jan 17, 2015 8:20 pm
- Location: Ventura, Ca
- Contact:
Re: Filtering a parameter
This code is perfect for filtering. Do you know of a way to reorder the filters? I'm sorry if I'm asking too much. Coding isn't my strong point.AposMus wrote: ↑Fri Aug 18, 2017 3:44 pmI had a situation where this was needed.
Came up with this:
Code: Select all
function onFilterList() if filterList > 5 then filterList = filterList + 8 end zone:setParameter("Filter.ShapeA", filterList) end filters = {[0] = "LP24", "LP18", "LP12", "LP6", "BP12", "BP24", "BR12", "BR24"} defineParameter("filterList", nil, 0, filters, onFilterList)
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.
-
- Member
- Posts: 869
- Joined: Sun Oct 05, 2014 12:18 am
- Contact:
Re: Filtering a parameter
Hi abject39.
Try this:
The only thing you need to modify is the "filterShapes" array. Add more lines or reorder them.
Try this:
Code: Select all
zone=this.parent:getZone()
filterShapes={
{name="LP24", index=0},
{name="HP24", index=10},
{name="BP24", index=5},
{name="BR24", index=15},
}
function getFilterShapeNames()
filterShapeNames={}
for i=1,#filterShapes do
filterShapeNames[i]=filterShapes[i].name
end
end
getFilterShapeNames()
function filterShapeChanged()
zone:setParameter("Filter.ShapeA",filterShapes[FilterShape].index)
end
defineParameter("FilterShape",nil,1,filterShapeNames,filterShapeChanged)
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44
- abject39
- Member
- Posts: 319
- Joined: Sat Jan 17, 2015 8:20 pm
- Location: Ventura, Ca
- Contact:
Re: Filtering a parameter
You seriously are the best! Thank you so much! Is there a parameter index list hidden somewhere? Whenever I need to index something I've been screenshooting the list and counting the positions on the list. Is there a faster to way to get that? I feel like I'm probably doing it wrong lol.misohoza wrote: ↑Tue Aug 22, 2017 3:35 pmHi abject39.
Try this:The only thing you need to modify is the "filterShapes" array. Add more lines or reorder them.Code: Select all
zone=this.parent:getZone() filterShapes={ {name="LP24", index=0}, {name="HP24", index=10}, {name="BP24", index=5}, {name="BR24", index=15}, } function getFilterShapeNames() filterShapeNames={} for i=1,#filterShapes do filterShapeNames[i]=filterShapes[i].name end end getFilterShapeNames() function filterShapeChanged() zone:setParameter("Filter.ShapeA",filterShapes[FilterShape].index) end defineParameter("FilterShape",nil,1,filterShapeNames,filterShapeChanged)
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.
-
- Member
- Posts: 869
- Joined: Sun Oct 05, 2014 12:18 am
- Contact:
Re: Filtering a parameter
There's no hidden list that I know.
You can use parameter list or zone editor.
Modulation sources and destinations are listed here:
https://developer.steinberg.help/displa ... urce+Types
I find that very helpful if you want to limit modulation matrix options to those relevant to your instrument.
Edit:
You can print them if you want to.
You can use parameter list or zone editor.
Modulation sources and destinations are listed here:
https://developer.steinberg.help/displa ... urce+Types
I find that very helpful if you want to limit modulation matrix options to those relevant to your instrument.
Edit:
You can print them if you want to.
Code: Select all
element=this.parent:getZone()
parameter="Filter.ShapeA"
parameterDef=element:getParameterDefinition(parameter)
if parameterDef.type=="integer" then do
for i=parameterDef.min, parameterDef.max do
local displayString=parameterDef:getDisplayString(i)
print("{name= \""..displayString.."\", index= "..i.."},")
end
end
else
print("Parameter is not integer")
end
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44
Who is online
Users browsing this forum: No registered users and 2 guests