VST preset list to tabs
the Umenu works very easily with the preset list output from the VST` object, but I use a touchscreen and need a way to select presets without scrolling. I’d like to use a grid of buttons displaying names of 32 presets at a time, with paging buttons.
Elsewhere on these forums, I read about using a set of tabs for this. It looks like it would work great for me. But being a noob, I can’t figure out how to populate the tabs from the presets. The preset names seem to be sent out as a series of separate items, and I guess ‘tabs’ needs them all as a list? Instead of creating a tab for each preset, it creates one tab and just renames it… I looked at ‘join’, but that is showing up as ‘bogus’ in max 5, although there is documentation for it. Has it been deprecated? I figured there would be some way to get the delimited text out of a umenu, but it looks like that is not possible either.
And since presets sometimes contain commas or quotes, would these then need to be escaped? Maybe I need to dive into JS, to make this work.
Any tips welcome!
What about using jit.cellblock?
----------begin_max5_patcher---------- 662.3ocyXtsbZCCDF9ZySgF0o2QIV9LoW0Wf9BzoSGispiRrknH4DRyj9rWc vd.ZvJlShNLbPqk096Ou6u.dYhGbAaMlCA2B9Fvy6kIdd5Pp.dci8fM4qKpy 45oAo3mXKtGN0bHAdsPGV.V.H8QWlKJtiPq9wJbgvr3ymOyeJHHzW8VXvrX4 .4mAeu6T9IiJ3jeiUyFEHmjILssg0JpwBcxC5hZBIddI1r3vE4zJ3T.jPkoq eIIkZkIU6mPIvsxCMuQehvurhjWC2jJBsOSHUrWmLQ8xzSiL2.hrvEDJSQDz 7jSALng.yf.I5.ARv4CHezNPhQFfD6VfDd8.hp2gaEI5lGDJRijPcmz4u4Y+ bAc85bJXsTAdEHDYsAJUCmXMbROR3DYqdQwltmCV93efXJ97gok4EO.3XAvW 9f+biMWXsKSPl1EF4iNNXMXy0dQy7CjLQmOxPjUO1JcRUWgfLCTRcALbw9PM XNOuB+15jpFUFs6zjzSAYujoJI6xRjXG36NHQpaqrPiLisaxFW2KMLth6J+H W7GaUFFyh3NmC+iqYIcHZvIUT0031eR8rlvE89t81v6CbAGJ35BxyerWBe3q pU2fAYhY4ksTxuZwxrLEHuZgeVl4if22SDyJv00KpYEOXgvgcegGMZiSBLfN 8X2IqfUqGmMDx6Q6a45J1S6rTauO2ITfpWeYZo+6O3PCCU7coHm0tpnWsc6j .1PiRLWPn4BBit0bP6Lm6HkkX8g6gUCobISVM0IgAtiNVEo9cEuqjl6dIgFg jPtSRQi4FWhawj+XzTja0T3HqlB9OCSgtESnwnIe2qowz0E5LIMFqIjasKk6 RCheGIcf1.nT8+eRh9KlcRhaLlTANEWwWXEIG75j+pcUQRL -----------end_max5_patcher-----------
Yeah, I looked into cellblock, but I like the look of the tabs better….
Is it a big deal to make this conversion?
Okay, I looked into the Coll object. Unfortunately, it doesn’t have an ‘append’ command(?) so I had to use ‘insert’, and now my preset list is in reverse order, but it is now in the coll object.
But I’m not sure I’m any closer. The ‘dump’ output seems to send individual messages, and the TAB object doesn’t seem to have any programmatic way to address the name of a single specific tab.
Judging from the text in the inspector in the tabs help example, I need to put quotes around any preset name that has spaces in it, and then join all the separate messages from a ‘coll’ dump (or the original vst~ output–I don’t think coll is helping) into a single list. Doesn’t sound hard, I just can’t find the objects to do it with…
I’m trying to understand Symbols. If I convert text with spaces into a symbol, do I still need quotes around it? Will a symbol work as the input to TABS? How do I know which it wants? The docs say symbol, but don’t indicate if the whole list is a single symbol or each item is a symbol.
Thanks in advance for any insight,
Just try a list with multiple symbols, it should work…maybe…haven’t tried it. You could use sprintf for a list of symbols, and use "symout" to make the whole shebang into one symbol. I don’t have Max here but maybe it’ll work…I don’t think you need quotes in the sprintf or afterwards, it knows it’s a symbol if you use "symout".
I personally would like Tab to take its list using commas like umenu does, it would make these things easier. But maybe there’s an "under-the-hood" reason for doing it with spaces.
Doesn’t sprintf require you to know the number of arguments? And surely you can’t have 128 of them? The problem is going from many discrete messages to one message.
I’ll look and see if I missed something about sprintf….
thanks for the patch using cellblock! It will work for the moment….
I’d still love a solution for tabs, though.
Okay, as I thought, the
iter module in Roger’s cellblock solution is unnecessary, because the
vst~ is already putting out separate items.
What I need is the INVERSE of
Is there one? It occurs to me now that the
vst~ object doesn’t give any indication of when it is done sending out presets (in the case of Synth1 with its 12,000 presets, that’s not a trivial issue…)
I could do with counting, though, and selecting the first n elements. Indeed, I’ll need to do something like that to get different pages.
I note that the help file variously lists the program output as "a list" and as "a series of symbols". This is an important distinction, right? Seems like it is the latter. If it was the former, the
iter module would be needed. [?]
oh the irony.
The answer is in the VERY NEXT post to this forum!
merge 0 with a
coll object. Max creates the list correctly, and a message of 0 retrieves it.
prepend tabs and it works perfectly.
Hope this helps somebody else.
[zl group] will let you collect a sequence of items into a single list, suitable for populating a tab object
----------begin_max5_patcher---------- 534.3ocyU0rbaBCD9L7TnQ4JMCRX6DZO0j6s8TuzoSGAnhUGPhfDotIS5ydk V.an0w1Xm3oG.gVD62O650O56gSTq3ZL5snuf77dz2yCB4B30s2CWxVkVvzv wvFVBNnMdEyjtTHy+VMO0zlCB8pKCCPz4ycKQDXgPnWFh9Z2W8ckzHYkbHau uVvJ5ympwTvMleUwaSFVHM3.DFtF88ZwCvYHg172FVjAITk7i2Pl0mQYSoPZ yIPcRWPqB5TL9ypTUFu1A.YA5FlLCMHzGKFs81kpZVwvHehs4.q4mEyVg.fD 4B9juu6VvAZwR9OsxnWCF9JvbwU07Jtkg.+2eIfNysrHFp.WebEfI45Q6z0G aKjivVRZLFkbmJGjbDHYZX+80Z3ejWBSluQhC0B8UVKOSI9gBTdspoZ+kWRL rLawIUdm5OrB2psP2psPe4rECJAUkW5TkFUUzju+lf1993Sxdf1CqE0CM7rC 8IXYwSnQ5EbVw8Zyu2gI00CQHvRX3o3RZQtz85gO4tJDZX58wNDeBsZW0EUy tumUW7AGfs1fkKJVViTbWC2hP.xpV76rjYfeCLyxY4e+ugf64hOtHnUM0o8f 0UnQz05KiqMBIyHrCr1bFhC60mYoHKiCutW9khrJk0u5nvHBFbTLh7eEibiU G.21oT7Y2j1Gibi8NmtTzgvoYmWNEdHbJ57xIKZyeMKc1MO4+GPIJaIf -----------end_max5_patcher-----------
Forums > MaxMSP