• vacuumflower@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    1 day ago

    An algorithm for them:

    set rand [clock microseconds]
    set len [mpc_pl_len]
    set to [expr {$rand%$len}]
    mpc_pl_jmp $to
    
      • vacuumflower@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        mpc as in mpd CLI client, where mpc_pl_len and mpc_pl_jmp procedures are not listed, but just call it with some other Unix commands to get playlist length and jump to a playlist position.