getting Simpler parameter names via API - they vary!

Learn about building and using Max for Live devices.
Post Reply
peboer
Posts: 37
Joined: Wed Sep 02, 2009 5:25 pm
Location: San Jose, CA
Contact:

getting Simpler parameter names via API - they vary!

Post by peboer » Fri Jan 13, 2012 8:04 pm

I have a script that tells me the name and parameter number of all the parameters of a device in a chain. With Simpler, I keep getting different reports, I suppose depending on the type of samples loaded and what is enabled. I have a M4l patch where I always want a knob to attach to the Envelope Attack parameter, for example. However, this index seems to vary in different instances of Simpler. Sometimes it is parameter number 26, sometimes 36, sometime 56. I have no way of knowing. Other Instrument classes, like Operator and Collision seem to always report the same number of parameters. Any hints?
I crossposted this on the C74 forums - sort of desperate for a good solution:
http://cycling74.com/forums/topic.php?id=37533
If you download the stuff there, you'll see, some have 26 parameters, some have 64. This makes it so I can't rely on a good way to always latch to a particular parameter in Simpler!!
You can try it yourself - just load the drum rack and the m4l device, and press the button.

I guess what I'd like to know is what is going on - where do all these extra parameters come from???
work:
http://www.lividinstruments.com
play:
The Lifespan Cocktail
2 oz brandy
1/4 oz orgeat
1/4 oz maraschino
3/8 oz meyer lemon juice
3/8 oz yellow grapefruit juice
Shake with ice, strain, and serve in an absinthe-rinsed cocktail glass.

willyc
Posts: 13
Joined: Tue Feb 12, 2008 4:07 pm

Re: getting Simpler parameter names via API - they vary!

Post by willyc » Sun Jan 15, 2012 9:29 am

I can reproduce what you are seeing - it appears the number of parameters reported over the api by simpler increases as you turn more of its features on. I was able to get from 27 parameters up to 52 by doing the following:

New simpler: 27 parameters (Device On, Snap, Sample Selector etc)
Turn on filter or filter envelope: 39 parameters (added Filter Type, Fe On, Fe Attack, etc)
Turn on pitch envelope: 44 parameters (Added Ve Attack, Ve Decay, etc)
Turn on LFO: 52 parameters (Added L On, L Wave, L Sync, etc)

Interestingly, when you turn the corresponding features back off, the number of reported parameters does not reduce. This suggests a bug in simpler - I would expect it to report 'all possible' parameters when it initialises (not just 'all currently available').

As for working around the issue - I noticed the order of the reported parameters is consistent, regardless of the order in which you turn on features. You could therefore (via API or otherwise) turn on and back off again the various features (filters, envelopes, etc) to fully populate simplers api parameter list, before trying to interact with it. You could also hack a fix by iterating over the devices parameters and matching on name rather than id - not ideal, and this will still fail if the parameter you are trying to match (e.g. Fe Attack) doesn't exist yet!

I'd suggest sending an email to support...

Post Reply