Title: Fix for AFTER command? Post by: bvdp on June 03, 2021, 02:05:27 AM I noticed the other day that a command like:
Code: After Repeat=1 Print Here we go again did not work. Nothing printed at all. I spent way to many hours tracking this down and have come up with a fix. In parse.py at line 346 I changed the code to read: Code: if rpt: I think it is working now. But really do want some verification before I lock it in. Thanks. Title: Re: Fix for AFTER command? Post by: bvdp on June 03, 2021, 06:27:10 PM Okay, okay ... it still is not working ::) I will do more work on this as whip it into submission.
Title: Re: Fix for AFTER command? Post by: bvdp on June 03, 2021, 07:03:19 PM I think I have it now :) The problem was my choice of variable to see if a repeat was active. So, let's try this again. In the module parse.py we need to change 2 occurrences of "rpt" to "rptcount > 1". These occur at lines 343 and 350.
Code: # if repeat count is set with dupchord we push Again, I'm hoping someone can test this and let me know! Title: Re: Fix for AFTER command? Post by: sciurius on June 05, 2021, 01:28:30 PM I get "here we go again" 4 times, while I would expect it to print only once...
Test file t.mma: Code: After Repeat=1 Print Here we go again Before the fix (mma as distributed): Code: Opening file 't.mma'. After the fix: Code: Opening file 't.mma'. Title: Re: Fix for AFTER command? Post by: bvdp on June 05, 2021, 03:45:33 PM why would you only expect it to print one time? The idea behind AFTER is that it does "something" after creating/processing each bar of music. Have a go with pre/post fix versions with this:
After Repeat=4 Print Printing a silly comment Am * 24 Title: Re: Fix for AFTER command? Post by: sciurius on June 07, 2021, 06:24:16 AM I think I got confused. I've only user "After Count" once in a while...
Title: Re: Fix for AFTER command? Post by: bvdp on June 07, 2021, 03:47:40 PM No worries ... I was confused by whole mess as well. But, I think it is solid now!
|