This has been around for a long time, here is something I was working on in 2014; it was a very simple experiment. It worked as far as I can remember, but I haven’t done any scheduling since then.
I have kind of found a way to minimise the song being cut off by using the attached template. I must stress that I have only used it for 1960s music, which has a lot of instrumentals. The “rules” being: try not to fade an actual song too much, however, it is fully acceptable to fade an instrumental track at any duration.
The template (so far) is:-
Fixed Start of hour.
Specific item (jingle) with a hard fixed time 0f 00:00:00
Fill with Random items from folder = 60s. With Normal timing.
Random item from instrumental folder with a Soft fixed time of 00:58:00
Specific item (a jingle) which is Backtimed
End of hour marker.
Although this indicates an under-run, it actually works in practice.
The results - either the last song fades reasonably and then the fixed jingle, or the last song completes in it’s entirety and the instrumental fills the gap up to the fixed jingle.
Yes, that’s a possible solution. Edit item #4 (the filler) and enter 00:02:00 as the estimated duraion, it will make the Underrun go away.
(At the time you set up the template, mAirList does not know the duration of the song that will be picked later - so you have the option to enter an “estimated duration” to make a rough calculation on template-level possible.)
I have investigated the “last song” optimization in the meantime. The updated algorithm works quite well. There are some interesting side effects though. I have some rather long songs in my pool, 6 minutes or longer. With the new “try to find a single song that fills the gap” policy, the scheduler tends to pick one of those very long songs, rather than two 3:30 songs. That’s the downside of this “greedy” approach. Perhaps we should make the whole thing optional. I’ll keep thinking about it.