View Issue Details

IDProjectCategoryView StatusLast Update
0016938MediaMonkey 5Playbackpublic2022-04-25 22:13
Reporterpeke Assigned To 
Status closedResolutionfixed 
Product Version5.0 
Target Version5.0.3Fixed in Version5.0.3 
Summary0016938: OUTPUT Plugin: ability to set consistent gaps between tracks
Description1. Even current MM output settings allow that user archive almost Gapless playback with setting Crossfade to 0.1 it is still not fully gapless and it can happen that due the loading of files at track end. Some apps prevent that by preloading next track and also cutting few milliseconds (<10ms) of next track beginnings to make seamless gapless transition.

2. Other common request is that MM make gap before next track is played and that it is configurable

Solution would be to add Radio group where user would able to set desired setting:
(x) Gapless playback
(_) Add Gap before next track [________2] Seconds
(_) Crossfade tracks [_______4] Seconds
    [_] Fade In new track
Additional Information
Fixed in build2607


related to 0016940 closedmichal MediaMonkey 5 Plugin in_mfaudio does not use gapeless info contained in MP3 files 
related to 0010461 newmichal MediaMonkey 4 Fading of audio tracks for video 
related to 0018181 assignedmichal MediaMonkey 5 Playback Rules: Crossfade handling improvement 
related to 0015051 feedbackjiri MediaMonkey 5 Native (DSP) plug-in support (e.g. Pitch/Tempo Control) 
related to 0009533 assignedLudek MediaMonkey 4 Output Plugin: When crossfade is enabled MM forces Fade out playing track 
related to 0018869 closedmichal MediaMonkey 5 'Remove silence at the beginning/end of track' option can't be enabled 



2020-09-23 17:05

developer   ~0059664

Last edited: 2020-09-23 17:06

View 2 revisions

1) should be resolved by 0016940, we should cut audio only based on gap info in the file, could be combined with current "Remove silence at the beginning / end of track" setting, I think this should be enough.
2) I see no reason for "Gapless playback" setting, we should play gapeless automatically based on info from file and Remove silence and crossfade setting. We could add "Add gap" setting to 5.0.1.


2020-09-23 20:40

developer   ~0059670

Last edited: 2020-09-23 22:08

View 3 revisions

1) Agree, that should fix it.

2) Term "Gapless playback" is just term I used instead of "Normal playback", because like you said gapless playback is default so instead of "Normal Playback" I just used that term to be clear that in all cases MM uses file info (fixed in 0016940). Term and wording needs to be cleared out, but as you said it is plain/normal playback mode when crossfade is disabled, thus radio button selection from three modes to be clear taht only one can be used.


2020-12-10 02:26

administrator   ~0060672

Why would we need a new configuration setting to 'Add gap'? Isn't unchecking 'Remove silence' sufficient?

Or is it because you want to have a Gap of x MS consistently between tracks (no matter how much silence exists at the beginning/end) ?


2021-11-25 16:56

developer   ~0066124

User's answer from

We need removing existing silence at the start/end of all tracks (diverse) and replace it with a fixed-time gap.

Different tracks have different begin/end silence time. The "remove silence" function is great but it reduces silence to zero, which is not acceptable in some
Eg. each Tango-DJ in the world has to provide a fixed interval between tracks (3-5 s). That's why I had to add warning "Do not buy MM5" to my Tango Guide for DJ's. :-(


2022-01-13 17:52

developer   ~0066614

Fixed in build 2601.


2022-01-14 22:04

developer   ~0066628

Last edited: 2022-01-14 22:10

View 2 revisions

Reopen few issues found.

Functionality issues:
i) Add Gap and Crossfade should be Radio group as both can't be enabled at same time\
ia) Radio group should be named as "Advanced playback" or "Playback rules" (assign to @Rusty if wording correction is needed)

ii) When set to 2 sec it adds GAP but part of last track is played before new track starts (attached result with sample track sent offline)

UI Issues:
iii) There is no NONE (previously suggested as Gapless) option which should be part of Radio Group (as noted in above as that option will be more consistent with MMA options [None, Gapless, Crossfade].

New Feature:
iv) Add new option to set preload next track before playing of current track ends. Especially useful if next track is on LAN or External Device where there is delay like Spin-up of HDD or LAN access query to fetch track. (Range should be 0.1s - 10s [current playback buffer])

v) Rename "Remove silence at the beginning / end of track" -> "Gapless playback" and as toltip we can use "Removes silence at the beginning / end of track"

NOTE: as pointed by @Ludek at 0016938:0066124 I agree that remove silence stays as separate option as some users need it.


2022-01-14 22:04

developer   ~0066629

bug16938.mp4 (440,939 bytes)   


2022-01-15 08:23

developer   ~0066634

Last edited: 2022-01-15 10:40

View 2 revisions

i), ia) it collides with our Player - Crossfade checkbox, I think it is not needed to complicate the dialog more, it can coexist and even has some advantages, see iv).

ii) ok, seems to be WASAPI only problem

iii)+v) it would be confusing, I do not see much sense in this, it is not clear what option what in fact does and needs additional tooltips. User now has clear possibilities - set gap before next track, set crossfade with the next track, and remove silence. It is I think best and self-explaining.

iv) it would be quite problem how to implement such thing reliably. It would need to change standard Winamp plugins behavior and interface and "teach" all possible input plugins this feature. Something similar could be probably achieved by combination of crossfade (i.e. start decoding next track sooner) and gap (i.e. 2s crossfade with 2s gap, would start decoding 2s before the end of the previous track, but in fact would not crossfade). Peke could test it.

Assigning to Rusty for his opinion.


2022-01-16 01:04

administrator   ~0066635

Based on the fact that crossfading can work with 'remove silence (=gapless)' and/or 'Add gap' (i.e. to fade out / fade in the audio), would the following UI work?
[ ] Smooth stop

Fade out: . . 0s ------------o--------------- 10s (TT: none needed)
Fade in:. . . 0s o--------------------------- 10s (TT: none needed)
Gap/Overlap: 10s -------------|--------o----- 10s (TT: Sets the size of the gap or overlap between tracks)

[ ] Remove silence at the beginning / end of track (TT: Removes silence introduced by some lossy encoders so all tracks play with consistent gaps/overlap)

(Dragging the slider would show e.g. xs Gap / 0s gap/overlap / xs Overlap.)

An alternative approach that doesn't use sliders is shown below. It's a little less intuitive, but it could also work well:

[x] Fade out: _4_s
[ ] Fade in: _4_s
Gap/Overlap: _Gap/[Overlap]_v: _0_s (TT: Sets the size of the gap or overlap between tracks)
[x] Remove silence at the beginning / end of track (TT: Removes silence introduced by some lossy encoders so all tracks play with consistent gaps/overlap)

- The slider-based approach might be a bit more intuitive and removes the possible confusion that there's no difference in the combo-box-based approach for 0s Gap or 0s Overlap.
- It is assumed that playlist rules that disable crossfading apply to all of the settings in the crossfading section. If they don't or if there's a reason why they shouldn't, then the proposed UI would have to be rethought.
- I also thought about changing 'Remove silence at the beginning / end of track' --> 'Remove silence within tracks (at the beginning / end)' to better distinguish this setting from the 'Gap/Overlap' setting, but I'm not sure that it would actually help.


2022-01-16 02:45

developer   ~0066636

I like the idea of Slider "Gap/Overlap: 10s -------------|--------o----- 10s " but for more precise setting would also add "Gap/Overlap: 10s -------------|--------o----- 10s [Up/Down]" to Precise tweak position by 0.1s

As this functionality is global output setting and most users either need Gap or Crossfade maybe it would be clear to keep Output plugin settings as clear as possible just with Global settings.

That said, after reviewing I think that adding Gap at that exact place, but as we are adding new features and redesigning (For functionality it would just move control from one UI to other) I would rather also address reports from Classical users where Silence on end/beginning is part of track and it is desired to be present.

Adding new functionality to Output Plugin settings UI additionally complicate quick switching of settings on track basis, also we already have "Playback rules" that address such behavior per type.

Another benefit is that we are unifying Playback behavioral rules off Output/Audio engine to MM control no mater what type of engine we use in future (eg. Winamp/BASS/F Audio/...)
bug16938.jpg (180,639 bytes)   
bug16938.jpg (180,639 bytes)   


2022-01-16 17:33

developer   ~0066638

Re global setting - just note, that this functionality is implemented by output plugins, it cannot be "outside" output plugin, output plugins do the work. So even though we would move some settings to the main GUI, it would affect implementation minimally.
I like the idea of gap/overlap slider.
Not sure, whether we should split crossfade interval to "Fade in" and "Fade out", the best results will be probably always with using symmetrical setting (as it works now, if "Fade in" is checked).


2022-01-16 18:00

administrator   ~0066639

Peke: The proposed UI was intended for the _currently_implemented_functionality_--i.e. to fix the UI issues described in the bug and not to add new functionality. That's why it doesn't make any of the changes global (in the Playback rules).

Michal: Re. splitting crossfade interval to fade in/fade out, some users prefer a longer fade in/shorter fade out (or vice versa) rather than symmetrical, and it makes for a clearer/more consistent UI if this is already supported in the plugins. But if not, I suppose you're suggesting something like this?

[x] Fade out . . . . [ ] Fade in
Fade duration: 0s ------o---------------------- 10s
Gap/Overlap: 10s -------------|--------o----- 10s (TT: Sets the size of the gap or overlap between tracks)

[ ] Remove silence at the beginning / end of track (TT: Removes silence introduced by some lossy encoders so all tracks play with consistent gaps/overlap)


2022-01-16 18:51

developer   ~0066640

Rusty: ok, if you think it could be appreciated, I think I can implement the first proposal, split fade in and out times, it should not be problem, I was only not sure if this is needed.


2022-01-16 21:40

administrator   ~0066641

Last edited: 2022-01-16 23:32

View 3 revisions

Michal, to re-iterate: I haven't seen many users asking for better fade-in/fade-out control; the main benefit is that it results in a cleaner more understandable UI, and a side benefit is that it would benefit some users who prefer that level of control. So if it's non-trivial, I'd take the simpler approach.

Also, part of the reason for the change implemented in this bug is to support e.g. Tango music, but as far as I can tell, the current/proposed implementations won't fully satisfy that usecase because it's not possible to add a new Type (e.g. 'Tango'). We can continue that discussion at #18756.

As far as Peke's suggestion: I understand the merits of allowing per Type overrides of certain audio settings, but it seems to be something that only makes sense once all our output plugins support it.


2022-01-17 04:33

developer   ~0066643

Last edited: 2022-01-17 23:38

View 4 revisions

First point of Ludek adding GAP in output is to make MM2/3/4 plugin available in MM5. My point of removing from Output into Per type setting is mainly because it was never needed in output plugin as global setting and no one asked for it global, but per need amd as noted in plugin Crossfade is Auto disabled when GAP is enabled so "Gap/Crossfade: 10s -------------|--------o----- 10s" design fit 100% in that,

Further feature/functionality is explained in #18756 and reasoning behind it (based on 12 years of active DJ-ing ['90-'02] and 25+ years in Radio broadcasting, audio authoring/engineering, both hardware and software) and should be handled there as making that opens MM further to enhancements.

Re other things:
a) For now I would Leave Fade in and Fade out as is (I leave new track fade in 99% of times disabled, as I need I control that using Crossfade time or GAP).
b) Adding "Gap/Crossfade: 10s -------------|--------o----- 10s" and remove silence to Playback rules as pointed do not change much in current output function for normal users, because they will not change defaults. BUT For those that want little bit of control it will change the world. Explained in example below. Michal Please correct me if I am wrong.

I am using default MM playback rules settings and playback behavior.
Setup used: 4 tracks in Now playing (AudioBook, Music track, Music Track, Classical track put on playlist in that order and Playlist repeat is enabled), Crossfade set to 8 seconds, Fade in disabled, enabled remove silence.

Current: Start playing Audiobook (output checks Type, disables crossfading -> Music track is played without crossfade -> Music track is played with 8s crossfade -> Classical track crossfade for 8s and silence is removed -> Audiobook is played with no crossfade, but end silence on classical track is removed -> ..... solution for most classical music users is to manually open Player options -> Output -> Configure -> disable remove silence -> OK -> playback ruled -> Classical -> enable disable crossfade and finally enjoy track till end and then goo over all settings again to continue listening regular music tracks

Proposed UI: only changes where and when output will read settings so with new UI same thing will look like this: Go to Options playback rules -> Classical -> Set "Gap/Crossfade: 10s -------------0-------------- 10s" (0s Gap, 0s Crossfade eg. disable both) -> Disable Remove Silence -> Go to Music Playback rules -> Set "Gap/Crossfade: 10s -------------|----------o-- 10s" (Crossfade 8s), leave Remove Silence -> OK to Apply options. Start playing Audiobook (output checks Type, disables crossfading -> Music track is played without crossfade (Gapless) -> Music track is with 8s crossfade -> Classical track is played without crossfade with clean silance end part (common for many classical tracks) -> Audiobook is played with no crossfade -> .... No further interaction from user and settings are persistent per type and easy to adjust and will work for both WASAPI and DS.

Output will still work as before, only difference is that along Track Type and Disable crossfade setting it woudl also read and set other parameters per Track instead of per output settings change ( @Michal from what i briefly looked it should be no issue implemented and will be easier to maintain later because options are removed from two places [WASAPI/DS] into single place under Playback rules).

So for 5.0.3 I would suggest only to move UI from Output plugins -> Playback rules (Defaults for all types will be copied from user current selected plugin if they do not exist/have never changed). Only thing that would change in output is that instead of per output plugin settings read on track playback it is fetched along with track type crossfading state. Which should be minimal change and would clear things for users.

@Michal Please correct me, but based on what I briefly looked in code should be both not to complicated and low risk change due the fact core output functionality is not changed.


2022-01-17 04:47

developer   ~0066644

Last edited: 2022-01-17 04:48

View 2 revisions

Note: Fade in/out separations was already tackled in 0009533


2022-01-17 17:35

administrator   ~0066647

Re. moving crossfading settings to the playback rules: this might makes sense over the long term, but not as long as we need to include the wav output plugin. If we can get rid of it, then I'd have no objection to moving crossfading settings. BUT, I would suggest doing that as a separate bug (i.e. getting rid of wav out and moving crossfading settings from the current output plugins to playback rules is really a different / more complex issue).

Peke wrote that crossfading is auto-disabled if GAP is enabled. Michal can you confirm (afaik, that's not the case):
- 'remove silence' can co-exist with crossfading
- 'Gap/Crossfade 10s-----------------o--------------10s' will work regardless of whether fade in / fade out is enabled (crossfading in this case just means that the tracks will overlap)

Re. the crossfading UI:
I'm ok with either proposal: The slider UI in 0016938:0066635 is cleaner/more understandable for users but requires some changes whereas the proposal at 0016938:0066639 is probably simpler to implement since it uses existing settings, but not as simple for users to understand.


2022-01-17 18:00

developer   ~0066648

I can confirm.
Remove silence can co-exist with the rest.
Fade-in/fade-out settings can be easily separated (I would do it at once with GUI change) and can exist independently on gap/crossfade setting. Fade-in/out changes volume of the ending/starting audio streams, crossfade mixes audio streams together, gap adds silence between audio streams.


2022-01-17 18:18

developer   ~0066649

One note to "Precise tweak position" - we do not need additional buttons, arrow keys can move slider by 0.1s, mouse wheel by 0.5s and Shift+wheel by 0.1s, sliders have this small/large step already implemented.


2022-01-17 19:31

developer   ~0066653

I prefer Cleaner design from 0016938:0066635

@Michal re Gap/Crossfade 'Gap/Crossfade: 10s-----------------o--------------10s' wil in TT show Something like '5s Crossfade' during grag and on mouse enter?


2022-01-18 09:53

developer   ~0066657

Last edited: 2022-01-18 09:55

View 3 revisions

After discussion with Peke, I would suggest this:

1) move UI for setting gap/crossfade, fade in/out and remove silence to Options - Playback rules (we change GUI to sliders and it is even easier for me to create and debug new controls directly in Options instead of adding them to both plugin settings dialogs and move later). Output plugins will get these settings the same way they get "disable crossfading" checkbox value now, it is minor change.

2) waveOut will not support them, it can be solved by tooltip, that only WASAPI/MMDS output plugins support these settings, or disable settings in case waveOut is active (and show tooltp, that current output plugin does not support them, Rusty could you specify wording?)

3) current settings (saved now to persistent.json to output plugin specific section) should be automatically imported to playback rules section for each track type. I.e. if setting does not exist (when needed), import it from active output plugin, and if active output plugin does not have it saved, take e.g. in order WASAPI - MMDS - default. If track type has current setting "Disable crossfading" checked, it will have priority and set fade in/fade out and gap/crossfade to zero during import.

This way we solve problem with setting these things for both output plugins separately, and remove duality, where we have part of settings in playback rules and part in output plugin settings.


2022-01-21 12:45

administrator   ~0066707

Last edited: 2022-01-21 15:13

View 3 revisions

So how will we deal with the issues raised in #18756 ?

Taking this approach (of basing all audio behavior on Types) effectively means that we'll need to support custom Types (or pre-configured custom Types).... Which is fine--I just want to make sure that you're ok with this.

EDIT: following discussion with Michal, this proposed implementation doesn't preclude the ability to exclude crossfading within a playback rule.


2022-01-24 03:28

administrator   ~0066734

Note: re. waveout not supporting certain settings:
- those settings should be greyed out if an unsupported output plugin is used
- if the user hovers on the greyed out settings MM can show:
 Unsupported by <NameofCurrentOutputPlugin>.
 Please change "Audio Output" ("plug-ins").

Note: this is written the way it is because 3 substrings already exist (pluginname, Audio Output, plug-ins).


2022-02-03 22:09

developer   ~0066846

Mostly fixed in build 2605. Tooltips and disabling for waveout will be added soon.


2022-02-04 14:56

developer   ~0066851

Fixed in build 2606.


2022-02-06 19:55

developer   ~0066869

Last edited: 2022-02-07 01:16

View 2 revisions

a) Small tweak. Disabling for waveout do not work if Waveout was not saved as active plugin.

0. Select WAVEOUT as active plugin -> OK -> Reopen Options -> Playback rules are Grayed and tooltip shows correctly
1. Select WASAPI as active plugin -> OK -> Reopen Options -> Playback rules options are shown and available -> OK
2. Reopen Options
3. Select WAVEOUT as active plugin
4. Switch to Playback rules Crossafading options are not grayed

b) Tooltips are still missing for options when they are enabled.


2022-02-07 14:22

developer   ~0066875

Fixed in build 2607. Now it also can take not yet saved value of the output plugin.


2022-04-20 21:48

developer   ~0067633

Verified 2615