Fix for Issue 106

3 views
Skip to first unread message

Foerster, Thomas

unread,
Jun 18, 2011, 5:09:13 AM6/18/11
to mingus...@googlegroups.com
The problem is that sustained notes are replayed on every tick. cur still points to the already playing note. However, the start_tick is far back in the past and will always fulfill the condition. What we really want is to only start note containers "around" the tick.


Fix is simple, just change mingus/midi/sequencer.py:240 (in play_Bars()) from


if (start_tick <= tick):


to


if (start_tick <= tick) and (start_tick > tick - 0.00001):


For style reasons I'd also introduce a module wide constant named EPS (= 0.00001) to avoid that magic number smell in the floating point comparisons.


Thanks for this great software,


Thomas


P.S. No google account, not subscribed on list. PM me for more info.

Reply all
Reply to author
Forward
0 new messages