Hi Bob,
I look at trying to get what I wanted with CHORD first but I hit a problem with strum direction was either UP or DOWN or BOTH but BOTH _always_ alternated. I wanted a "down down up down up down" pattern. Also I could not find out a way make CHORD to play all six notes of a chord like on a guitar (and then just the top four strings of an up strum). CHORD only seemed to want to play only 3 notes of the chord.
Good points.
CHORD plays the notes in the current chord. So, if it's a triad (ie C,
D, Em, etc) it plays 3 notes. A 7th chord will play 4 notes, etc. But,
you are correct saying that this is a problem.
As far as up/down. You could define a longer sequence (ie, 8 bar
sequence). Then set the pattern like:
Direction Down Down Up Down Down Up Down Up
I read carefully the thread "Acoustic guitar style" on this forum. The resulting mma looked very complicated. involving defining two instruments. I wanted something that was very easy to use and behaved exactly like a real guitar for example a Gmaj is g-- b-- d- g- b- g on a guitar and not g-- b-- d- g- b- d.
Yes, I agree.
The other difficulty was CHORD needed the note duration for every note involving a lot of very complicated maths. This brings me on the reason for adding the method addNoteOnToTrack to midi.py.
I do not know the duration of the note until the next chord is played (and if that note is not plucked or muted it could be even longer before the duration is known). There where two choices either add addNoteOnToTrack to midi.py or alternatively delay sending the note pair until the duration is known. But this would involve messing with Beatadjust because the notepair is sent late.
Just looking quickly at the code ... am I right that the notes are
turned off the next time though the playbar code (ie, the next
beat/chord)? I avoided this with addPairToTrack() ... you are right
that prediction is hard and just waiting around for the next strum is
much easier.
There is still some issues with the code that I do not know how to
fix. no note offs are send when changing to a different groove or at
the end of the piece. patPlectrum endAllVibrations should be called to
do this.
I'll have to think a bit about the eof of file and groove change
problem. I'd like to think they can be handled at the same time, but I
don't think so. For now, I'm thinking that some special flags need to
be set:
- for the eof of file. You could do something in main.py, similar
to the code at line 296. Or, change doMidiClear() to check the new
track-type. That might be easiest:
if self.type == ... turn off notes
- for the groove change? Not sure without tracing a bunch of
code. But, similar I'd think?
I also have a another thought about the chord syntax could be changed to accept barre chords perhaps "^5Gmaj" would play a barre Gmaj chord on the 5th fret, ie the chord would be raised by five semitones. So "^12Gmaj" would be identical to "+Gmaj". Negative fret number could also be allowed ^-5Gmaj which would be impossible on a real guitar. To do this you need to set the value barreChordFretNo to patPlectrum fretboardNote
Louis
What happens to "other" tracks? It was my thought at one time to have
the ability to set differnt chords for different tracks. Still not
sure if this would be a silly thing, and needlessly complicated.
But, here's another thought: if you expand PLECTRUM a little bit could
we combine the cappo and barre? So, using a silly example, we could
have a data line:
C / Gm
and above that a special plectrum line:
PLECTRUM-V1 barre 3
Now, this would apply to all the chords, forever.
So, to effect just the 3rd/4th beat:
PLECTRUM-V1 barre 0,0,3,4
or, you could even set this for patterns:
PLECTRUM-V1 barre 0 0 4 5
And, then when you want "normal"
PLECTRUM-V1 barre 0
Note the difference between 0,0,4,0 and 0 0 4 0 !
Also, I'm not excited about the terms PLECTRUM or BARRE. Is there
something better?
If not, we'll stick with this.
I'll let you work a bit more at your end. Then we'll try to do a merge
into my main code. Then a beta release.
Best,