Device parameter names in M4L API – Simpler seems to vary it's parameters!

Jan 13, 2012 at 7:45pm

Device parameter names in M4L API – Simpler seems to vary it's parameters!

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’ve attached a Drum Rack made of simpler sounds, the printout of all the parameters for each Simpler in the chain, and the amxd + js that I used to do this. As you can 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???

Attachments:
  1. SimplerReport.zip
#61233
Jan 19, 2012 at 8:05am

This is a crazy one. I’m with the guy on ableton’s forum; enable all the features in Live over the API (like, turn on the filter and such) and then turn them back off where needed, so that your param list gets fully populated.

Kind of a silly bug, innit?

#220677
Jan 24, 2012 at 5:39pm

What I ended up doing is just using JS to search through the reported parameters of Simpler and Sampler and stopping when all the desired parameters are found. For other instruments, I can rely on static reports and a lookup table.
I spoke to someone at Ableton this weekend, and he confirmed that it is just Simpler and Sampler that do this, and it is not a bug, but was done for the sake of saving some memory, apparently. Now, when you are dealing with potentially gigabytes of audio files in memory, I’m not sure why a few parameters’ worth of memory matters, however, software can be a temperamental beast, and, given that they know more about what they are doing than I do, I’ll accept this reason!

#220678

You must be logged in to reply to this topic.