Calculate duration of MP3 files and getting a timecode list

Hi! I’m making a Keyboard Maestro macro for merging x amount of MP3 files and trying to add chapters to the final MP3 file based on duration of each MP3 file. I get both title and duration of files with shell script. What I can’t figure out is how to calculate those durations and get a timecode list for adding as chapters to the final MP3 file.

For example:

List with duration of MP3 files:

0:00:00.000
00:00:09.33
00:00:50.10
00:00:37.15
00:00:19.83

Calculating sequentially mp3 file durations and getting the timecode list:

0:00:00.000
00:00:09.33
0:00:59.430
0:01:36.580
0:01:56.410

I get the timecode result using Numbers, but would prefer to do it in background by using Keyboard Maestro, shell script or something else.

Does someone have any tips?

Solved with Command Line & Automation - Soulver 3 for Mac