When I play an Em chord the following is displayed in the Script Log:
Scriptlet: on - MakeNoteMessageEx(52,69,1) NoteCount: 1
Scriptlet: on - MakeNoteMessageEx(55,85,1) NoteCount: 2
Scriptlet: on - MakeNoteMessageEx(59,66,1) NoteCount: 3
Scriptlet: off - MakeNoteMessageEx(52,0,1) NoteCount: 3
Scriptlet: off - MakeNoteMessageEx(55,0,1) NoteCount: 3
Scriptlet: off - MakeNoteMessageEx(59,0,1) NoteCount: 3
I am not picking up the NoteCount that I need? I want to know the note position within the chord for each note. IE: The NoteOnEvent is telling me that the E note is the 1st note in the chord, the G note the 2nd note in the chord and the B note the 3rd in the chord. I want to know this same information in the NoteOfEvent?
I am probably not using the term “NoteCount” correctly. What I want to do is this:
In my Scriptlet when a play a chord (C-E-G for example), each note of that chord goes to a different MIDI channel. I need to remember that the first note of the chord played was the -C-, the 2nd the -E-, and the third the -G-so I can turn it off in the NoteOffEvent. In my Scriptlet, I am using “NoteCount” to get that information, but that is most likely incorrect … so, I have to find the right function that will get me that information … otherwise the notes don’t get turned off?
When I added the ability for a user to specify an octave range for each instrument/channel, you would think this would be a piece of cake. WRONG - LOL! If the Scriptlet were dealing with a one-dimensional DIVISI scenario like the one created by @pianopaul and @schamass, it would be a piece of cake (as a matter of fact, it was @pianopaul that helped me get off the ground with my Scriptlet). However, the MATRIX DIVISI Rackspace is a 5 x 5 Matrix which means there is all kinds of sh*t going on, LOL! The problem was how the “on NoteOffEvent” dealt with multiple “offs” each with diverse note octaves.
Well, I finally figured out to make it happen, and I will be coming out with Version 2 in about a week after I test all scenarios. It would have been much easier if the GP Scripting Language supported nDimensional-Arrays. Oh well, we can’t have everything. LOL!
If anyone is listening: Is there a function to remove elements from the middle of an array? EG: SquashArray(arrayName, startingIndex, endingIndex);