Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: sciurius on April 26, 2020, 01:18:31 PM



Title: Trigger question
Post by: sciurius on April 26, 2020, 01:18:31 PM
This works:

Drum-SnareDrum1 Trigger Beats=4 Measures=8 Sequence={ 4 0 90; 4.25 0 70; 4.5 0 70; 4.75 0 70 }

But this does not:

Drum Define Fill 4 0 90; 4.25 0 70; 4.5 0 70; 4.75 0 70
Drum-SnareDrum1 Trigger Beats=4 Measures=8 Sequence=Fill


Title: Re: Trigger question
Post by: bvdp on April 26, 2020, 04:07:07 PM
I think it might be an oversight on my part (well, I KNOW it is). I'll work on this as next item to fix. Thanks for pointing it out.


Title: Re: Trigger question
Post by: bvdp on April 29, 2020, 02:28:15 AM
I _think_ this might work :)

At line 254 (or so) in trigger.py add the "elif opt" stuff:

Code:
elif cmd == 'SEQUENCE':
            if sequence:
                sequence = sequence.rstrip('; ')
                trigger.seq = self.defPatRiff(sequence)

            # we didn't extract a {} pattern earlier, so if opt
            # is something we have to assume it's a defined pattern
            elif opt:
                trigger.seq = MMA.sequence.trackSequence(self.name, [opt])
            else:
                error("%s Trigger Sequence expecting {patterns...}." % self.name)


I'm not doing a diff just now for you since there is a bunch of other stuff which depends on other files :)


Title: Re: Trigger question
Post by: sciurius on April 29, 2020, 05:54:31 AM
Hmm. Not sure. When run with -dpsen I get:

Code:
Drum Define Fill 4 0 90; 4.25 0 70; 4.5 0 70; 4.75 0 70
MIDI channel 10 buffer created
MIDI Channel 10 assigned to DRUM
Creating new track DRUM
Drum pattern FILL created: 4 1t 90 ; 4.25 1t 70 ; 4.5 1t 70 ; 4.75 1t 70
Drum-SnareDrum1 Trigger Beats=4 Measures=8 Sequence=Fill
MIDI Channel 10 assigned to DRUM-SNAREDRUM1
Creating new track DRUM-SNAREDRUM1
DRUM-SNAREDRUM1 sequence set: Fill
Set DRUM-SNAREDRUM1 TRIGGER:  Beats=4.0 CNames=[] CTypes=[] CTonics=[]
    Bars=[]Count=1 Truncate=False Override=False Sequence={}

The final debug message does not show a sequence.

Could ne a problem with the debug message, it also does not show the Measures value.


Title: Re: Trigger question
Post by: bvdp on April 29, 2020, 04:13:57 PM
Yes, it appears to be a debug issue. I'll fix that.

Assuming that the defined seq is working for you?

BTW, it should have worked all along simply by putting FILL in {}s :) I think.


Title: Re: Trigger question
Post by: sciurius on April 30, 2020, 09:48:00 AM
Correct. { Fill } works as well.


Title: Re: Trigger question
Post by: bvdp on April 30, 2020, 05:56:42 PM
I don't think that yesterday's fix actually works ... and if it does that is is just luck :)

Let's do it this way (and that fixes the debug as well).

Code:
elif cmd == 'SEQUENCE':
            if not sequence and opt:
                sequence = opt
            if sequence:
                sequence = sequence.rstrip('; ')
                trigger.seq = self.defPatRiff(sequence)
            else:
                error("%s Trigger Sequence expecting {patterns...}." % self.name)

I got the measures fixed in the debug and that will show in the next devel release later this week. Got a couple of other goodies as well I'm just finishing off :)