preloading sfplays from multiple ubumenus


    Feb 21 2006 | 5:19 pm
    hello,
    i am trying to preload my soundfiles which are located
    in several ubumenus divided according to categories
    (percussion, accordian etc.)etc..
    i can't figure out how give each file a unique cue
    number.
    for example, if the first folder has 33 files in it, i
    want these to have cue numbers 1-33. then if another
    folder has 24 files in it, the cue numbers would have
    to start from 34-57. and then if the third folder had
    72 files, then it's cues would go from 58-129 etc.
    you get the idea. i can make it work for the first
    two folders, (i think...) but after that, i'm not sure
    how to add the values so that the cue numbers increase
    according to the number of files in the menus/folders,
    adding to where previous cue number left off. i want
    this to be dynamic process because the number of files
    in each menu/folder are always changing, so i can't
    just set the number ahead of time. is this making
    sense?
    would anyone be able to help me with a solution? i've
    been starring at the screen for hours and i just can't
    figure it out. i'm sure it will be quite obvious to
    someone else out there.
    i would greatly appreciate your help. i'm attaching a
    simplified patch as an example. you will be able to
    see where i'm stuck. i've done the tutorials and read
    the docs, searched the forums and i'm still stuck.
    thanks in advance,
    kenichi
    max v2;

    • Feb 21 2006 | 5:59 pm
      One thought - do the Q numbers have to be all consecutive?
      you could number the folders, say two digits, and number the files
      starting at 01 in each folder. so your first folder would be 0101 to
      0133, and your next folder would be 0202 to 0224 - use part of your
      folder and file names (last two characters?) to provide the information
      - might work, but I don't know your circumstances.
      L
    • Feb 21 2006 | 6:25 pm
      Hi, Takami,
      Away from my machine right now, but I'd speculate that you want a
      combination of ubumenu and coll.
      ubumenu doesn't keep track of its length (well, not in a publicly
      accessible way), but coll does. So some system of multiple ubumenus
      feeding into a coll would probably solve it. (though there is the
      limit IIRC of 127-128 files on sflist~) (basically dumping the
      ubumenus into coll, using a single counter to generate the cue
      numbers.)
      Peter McCulloch
    • Feb 21 2006 | 6:57 pm
      -> ubumenu -> dumpout -> coll -> counter? depends on the the length
      of the array, tought (-~127)...
      could use muliple of these, if you want...
      */
    • Feb 21 2006 | 7:31 pm
      thanks schurer, peter and lawrence!
      i'll give it a try and let you know how it works out.
      thanks again!
      -kenichi
    • Feb 21 2006 | 8:42 pm
      sorry...how and what do i "dumpout" of the ubumenus into coll?
      file names? index numbers? i notice that right outlet of ubumenu is for dumpout, but i don't understand how to get into coll. sorry i'm confused about how to use the two together..
      thanks!
      kenichi
      -> ubumenu -> dumpout -> coll -> counter? depends on the the length of the array, tought (-~127)...
      could use muliple of these, if you want...
    • Feb 22 2006 | 9:58 pm
      hello,
      i posted the original problem below and peter and schurer came up with what sounds like a possible solution to my original problem.
      however, i can't figure out how to implement their suggestion.
      I'm having trouble "dumping out" the contents of the ubumenus into a coll. i can't figure out how to integrate the two objects. i've studied the help/ref docs for both objects, but am stuck. would anyone be willing to show me a quick example of how to dump the contents of an ubumenu into a coll? i would really apprecaite your help.
      THank you!
      kenichi
      POSSIBLE SOLUTION
      -> ubumenu -> dumpout -> coll -> counter? depends on the the length of the array, tought (-~127)...
      ORIGINAL MESSAGE
      i am trying to preload my soundfiles which are located
      in several ubumenus divided according to categories
      (percussion, accordian etc.)etc..
      i can't figure out how give each file a unique cue
      number.
      for example, if the first folder has 33 files in it, i
      want these to have cue numbers 1-33. then if another
      folder has 24 files in it, the cue numbers would have
      to start from 34-57. and then if the third folder had
      72 files, then it's cues would go from 58-129 etc.
      you get the idea. i can make it work for the first
      two folders, (i think...) but after that, i'm not sure
      how to add the values so that the cue numbers increase
      according to the number of files in the menus/folders,
      adding to where previous cue number left off. i want
      this to be dynamic process because the number of files
      in each menu/folder are always changing, so i can't
      just set the number ahead of time. is this making
      sense?
      would anyone be able to help me with a solution? i've
      been starring at the screen for hours and i just can't
      figure it out. i'm sure it will be quite obvious to
      someone else out there.
      i would greatly appreciate your help. i'm attaching a
      simplified patch as an example. you will be able to
      see where i'm stuck. i've done the tutorials and read
      the docs, searched the forums and i'm still stuck.