MSB LSB Bank fill Program Menu from text possible?


    Apr 19 2019 | 4:27 am
    I am trying to create a bank select menu that fills a program select menu. Both menus some how need to use the same text file to populate both menus.
    The bank select is a combination of MSB and LSB numbers. Once a bank is selected it fills program select menu. I would like to break this up into two menus Bank select then fill a Program menu. The example text below is how I would like to setup the text.
    Bank 0 12 XG Bank 12 - Fast Decay { LSB 12 MSB 0 PGM 31 DstRthmG } 30 31 DstRthmG 39 40 Seq Bass 62 63 QuackBr 98 99 SynDrCmp
    Bank 0 14 XG Bank 14 - Double Attack 61 62 SfrzndBr 98 99 Popcorn 102 103 EchoPan
    Bank 0 16 XG Bank 16 - Bright 24 25 NylonGt2 25 26 SteelGt2 52 53 Ch.Aahs2 56 57 Trumpet2 58 59 Tuba2 87 88 Big&Low 89 90 ThickPad
    This patch is an example of what I can get to work only one menu though. Any help on this would be great thanks.

    • Apr 19 2019 | 10:04 am
      I think you would be better served by using the dict object (dictionary). See the queries tab of the dict.maxhelp file. It shows the use of the dict object with umenu.
    • Apr 20 2019 | 2:33 pm
      Thanks Pedro for pointing out dict.object works great. Only hurdle I have now is converting a .txt file into .json I would like to load a .txt file instead of a .json file into dict object. I tried dict.deserialize but couldn't get it to convert and load properly into the dict object with the right format. This isn't 100% necessary because I can opt to just use .json file instead of .txt file, but it would be nice to just use a .txt file for Bank presets.
      Thanks again Pedro for helping steer me to the right object.
    • Apr 24 2019 | 7:37 am
      I found it easier to format text for max over json for bank lists in dict. With this patch we can use max to format json for dict based off coll loaded from text file. Text file is less unique to format just quotes a comma and a semicolon.
      Then use dict to make the sub menu using a variation of See the queries tab of the dict.maxhelp file . I think using absolute paths for text folders is working fine although coll can be picky about loading or reading text files in a standalone? I think referencing the folder absolute path and not the file is helping.
      I wanted text file based preset system for Synthesizer, Bank, MSB, LSB, PGM with three menus Synthesizer, Bank, and PGM#name and it's here. The issue now is building the text files. The only other thing I really would like to get going is Cakewalk .ins, Reabank or Cubase Instrument Patch direct import. The closest format looks like reaper.
      To convert by hand takes about 10 to 20 min per synth longer more broken up ins maps would take longer. Any thoughts on importing Instrument Definition Maps directly I would appreciate it thanks.