def married_type(mdata):
    """return whether there are modulators or durations
       (need only check first non-empty element, as consistency is required)

       return a bit mask:

          return 0 : simple times
          return 1 : has amplitude modulators
          return 2 : has duration modulators
          return 3 : has both
    """

    rv = 0
    for lind in range(len(mdata)):
       line = mdata[lind]
       if len(line) > 0:
         ttok = line[0]
         if len(ttok[1]) > 0: rv |= 1   # has amp mods
         if ttok[2] > 0:      rv |= 2   # has dur mods
         break
    return rv