sciurius
|
|
« on: May 13, 2020, 12:10:40 PM » |
|
While trying to find out why this doesn't work: After Count=2 Drum-KickDrum2 @rhythm Seq=|3-------3-------3-------3-------| After Count=2 Drum-PedalHiHat @rhythm Seq=|--------6---------------6-------| After Count=2 Drum-RideCymbal1 @rhythm Seq=|7-------7----7--7-------7----7--|
It seems that only one After is possible for a specific location, and that subsequent Afters for the same location are silently ignored. Is that intentional?
|
|
|
Logged
|
|
|
|
bvdp
|
|
« Reply #1 on: May 13, 2020, 04:53:46 PM » |
|
No, they should not. They are supposed to be stacked. Are you using this is * repeat?
A few lines of context would help.
|
|
|
Logged
|
|
|
|
sciurius
|
|
« Reply #2 on: May 13, 2020, 05:06:35 PM » |
|
Okay. Yes, it is related to the * repeat stuff. After Count=2 print 2A After Count=2 print 2B After Count=3 print 3A After Count=3 print 3B After Count=4 print 4A After Count=4 print 4B 1 z * 6
This prints 2A, 3A, 4A. With 6 lines z instead of the * repeat it prints 2A, 2B, 3A, 3B, 4A, 4B.
|
|
|
Logged
|
|
|
|
sciurius
|
|
« Reply #3 on: May 13, 2020, 05:39:38 PM » |
|
BTW Are you still considering adding Before? Given the recent changes to After this shouldn't be so hard now .
|
|
|
Logged
|
|
|
|
bvdp
|
|
« Reply #4 on: May 13, 2020, 06:51:23 PM » |
|
Okay. Yes, it is related to the * repeat stuff. After Count=2 print 2A After Count=2 print 2B After Count=3 print 3A After Count=3 print 3B After Count=4 print 4A After Count=4 print 4B 1 z * 6
This prints 2A, 3A, 4A. With 6 lines z instead of the * repeat it prints 2A, 2B, 3A, 3B, 4A, 4B. Right then. I was scratching my head at some of the code when I was doing the * stuff and wondering why it was like it was ... guess that's the answer I'll look more!
|
|
|
Logged
|
|
|
|
bvdp
|
|
« Reply #5 on: May 13, 2020, 06:52:17 PM » |
|
Before? Ummm, not sure ... just what is the point of this?
|
|
|
Logged
|
|
|
|
sciurius
|
|
« Reply #6 on: May 13, 2020, 08:38:58 PM » |
|
Because I cannot do this: After Count=1 Drum-KickDrum2 @rhythm Seq=|3--3--3--3--| Groove A 1 z Groove B 2 z
After the 1st measure the Drum-KickDrum2 sequence is altered. But the Groove B statement restores the sequences so the change gets lost. A hypothetical Before would solve this: Before Count=2 Drum-KickDrum2 @rhythm Seq=|3--3--3--3--| Groove A 1 z Groove B 2 z
Now the sequence alteration takes place before the 2nd bar, and after the groove change.
|
|
|
Logged
|
|
|
|
bvdp
|
|
« Reply #7 on: May 13, 2020, 10:17:39 PM » |
|
Okay, I will need to digest this.
|
|
|
Logged
|
|
|
|
bvdp
|
|
« Reply #8 on: May 14, 2020, 02:02:50 AM » |
|
I think this fixes the after * problem. In after.py at line 148 out-comment the loop. Should look like this then: fd.close() afterData = [ x for x in afterData if x.bar != nn] MMA.parse.parseFile(name)
I think we were removing discarded events too many times Opps ... editing since it is not quite right. I still need to delete one event since we're getting a duplicate. Well, tomorrow.
|
|
« Last Edit: May 14, 2020, 02:04:27 AM by bvdp »
|
Logged
|
|
|
|
bvdp
|
|
« Reply #9 on: May 14, 2020, 06:59:10 PM » |
|
Hey, that was fun. Keep looking at the recursion, etc. And all along it was just that I wasn't writing all the needed data to the scratch file. The sound you hear is my head and palm connecting Anyway, here's the patch. Let me know. Next, guess I'll have to look at BEFORE
|
|
|
Logged
|
|
|
|
sciurius
|
|
« Reply #10 on: May 14, 2020, 07:19:26 PM » |
|
Are you sure this is the right patch? It seems targetted to the midi channel allocation problem, not the After behaviour...
|
|
|
Logged
|
|
|
|
sciurius
|
|
« Reply #11 on: May 14, 2020, 07:34:35 PM » |
|
While at it, would it be possible to allow zero for the Count argument, so this
After Count=0 Statement
becomes legal and equivalent to
Statement
|
|
|
Logged
|
|
|
|
sciurius
|
|
« Reply #12 on: May 14, 2020, 07:51:43 PM » |
|
Can't wait to try this... This is automatically generated out of a MIDI percussion file.
|
|
|
Logged
|
|
|
|
bvdp
|
|
« Reply #13 on: May 14, 2020, 08:53:23 PM » |
|
Are you sure this is the right patch? It seems targetted to the midi channel allocation problem, not the After behaviour...
Did you grab/process the right file? the first few lines of the file I posted read: 124,125d123 < stuff = [] < elns = [] 127c125,129 < nn = gbl.barNum --- > barNum = gbl.barNum > # Gather all the AFTER events for this point > # in the MMA file into stuff[] for pushback And this is for the AFTER problem. Nothing to do with channel allocation
|
|
|
Logged
|
|
|
|
bvdp
|
|
« Reply #14 on: May 14, 2020, 08:58:26 PM » |
|
While at it, would it be possible to allow zero for the Count argument, so this
After Count=0 Statement
becomes legal and equivalent to
Statement
Yeah ... I suppose so ... but why? If you want to do it right away why not just do it? I'm confused
|
|
|
Logged
|
|
|
|
|