View Issue Details

IDProjectCategoryView StatusLast Update
0001177OpenMPTAudio I/Opublic2018-12-16 14:31
ReporterASIKWUSpulse Assigned ToSaga Musix  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionno change required 
Product VersionOpenMPT 1.27.11.00 / libopenmpt 0.3.13 (upgrade first) 
Summary0001177: Physical mix-channel allocation in vicious circle
Description

I've noticed this when listening repeatedly on a soundtrack-module with looping tunes and instruments that have long releases. The physical mix-channel meter just keeps going up until eventually hitting the 256 limit, and I know that it's not the actual amount of channels the tune should use. To me, it seems that the player gets blind to previous mix-channel, and keeps using new mix-channels when it could have used the old "now free" channels.

I understand that polyphony is harder to accomplish than non-programmers may think. Now, I'm not a advanced programmer, but let me guess what may cause the problem: audio allocation-pointer issues? :-)

Minimal testcase will be provided soon, or if you contact WouterVL, I've sent him a message about this.

Steps To Reproduce

Listen to the testcase-module, repeatedly. Watch the mix-channel meter in the right-bottom corner, it will rise (even when you think it shouldn't). When it eventually reaches the 256 channel-limit, you'll start hearing audio-misbehaviour, in form of instantly dropping sample-voices at the release of an instrument (like the NNA-cut behaviour). How could it be fine just the two tuneloops before!? :-P

Additional Information

I don't know if this bug has been solved already, but I searched through the report-issues, and it may have actually been a report on this, but with a differently described title.

TagsNo tags attached.
Attached Files
testcase.zip (311,471 bytes)
Has the bug occurred in previous versions?No idea
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2018-12-15 12:48

administrator   ~0003753

OpenMPT adds any sample-based channels playing at a non-zero volume to the displayed number of mixed channels. So if the number keeps rising, chances are high that at least one envelope doesn't end at zero volume in that particular module and OpenMPT just shows you exactly what is happening.

ASIKWUSpulse

ASIKWUSpulse

2018-12-15 18:21

reporter   ~0003754

Yes there is instruments in this module that has a volume envelope that doesn't end on zero, but they have fade-out at 128 or larger, so it kind of makes the last slope of the envelope. I can understand why I would run out of voices if I could hear notes getting stuck infinitely.

Saga Musix

Saga Musix

2018-12-15 18:44

administrator   ~0003755

Well, without an example module I cannot give you a definite answer but it's unlikely that there is a bug. Your assumption about what is happening is incorrect because OpenMPT's mixer is allocation-free; all channels are pre-allocated and if all NNA channels are used up, a couple of heuristics (mostly about channel volume but also loop status and envelope position play into this) are applied to find a channel that is most suitable to be killed (sometimes there is none). Of course that can mean that sometimes an NNA channel is cut off that would sound to you like it shouldn't be cut off, but there is no one correct way to kill background channels. Note that commands like S7x could cause any instrument play indefinitely, even if it would normally be faded out. Since such notes can stack up over time, this explains why it doesn't necessarily happen on the first repetition of the module.

Saga Musix

Saga Musix

2018-12-16 14:31

administrator   ~0003759

Have a close look at instrument 1. Its NNA is set to Continue, and it has a silent loop at the end of the sample. It's those bass drum hits that keep stacking up, because with no volume envelope they will just keep playing forever, and at least some of them will be prioritized over other channels because they play at full volume. The problem is not OpenMPT-specific, and the solution is not to put a loop on that bass drum sample.

Issue History

Date Modified Username Field Change
2018-12-15 08:20 ASIKWUSpulse New Issue
2018-12-15 08:22 ASIKWUSpulse Description Updated
2018-12-15 08:24 ASIKWUSpulse Steps to Reproduce Updated
2018-12-15 12:48 Saga Musix Note Added: 0003753
2018-12-15 12:48 Saga Musix Assigned To => Saga Musix
2018-12-15 12:48 Saga Musix Status new => feedback
2018-12-15 18:21 ASIKWUSpulse Note Added: 0003754
2018-12-15 18:21 ASIKWUSpulse Status feedback => assigned
2018-12-15 18:44 Saga Musix Status assigned => feedback
2018-12-15 18:44 Saga Musix Note Added: 0003755
2018-12-16 14:14 ASIKWUSpulse File Added: testcase.zip
2018-12-16 14:31 Saga Musix Status feedback => closed
2018-12-16 14:31 Saga Musix Resolution open => no change required
2018-12-16 14:31 Saga Musix Note Added: 0003759