Go Back   Cockos Incorporated Forums > REAPER Forums > MIDI Hardware, Control Surfaces, and OSC

Reply
 
Thread Tools Display Modes
Old 05-14-2013, 07:23 PM   #1
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default "correct overlapping notes" does the exact opposite of what I want. Any tips?

There have been some issues in the past, which involve 'overlapping notes', i.e. cases where the note-off event for a specific note comes *after* the note-on event of a subsequent note with the exact same note number. There currently is an option "Automatically correct overlapping notes" that is supposed to address these issues (see e.g. here and here).

However, it does the exact opposite of what I want. There are two ways to correct this: one is to shorten the overlapping notes so they do not overlap anymore; the other is to join all overlapping notes into a single, continuous note. REAPER currently does the former, while I want the latter (for something I'm working on currently, at least).

Is there perhaps any way to achieve this easily, that is, not requiring me to join such groups of overlapping notes manually (as that would be *very* tedious)? Preferably, I want to transform the MIDI destructively.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-14-2013, 10:53 PM   #2
Win Conway
Human being with feelings
 
Join Date: Dec 2010
Posts: 3,826
Default

'Join notes' doesn't work for you ?
Shortcut 'j' is default
__________________
Stop posting huge images, smaller images or thumbnail, it's not rocket science!
Win Conway is offline   Reply With Quote
Old 05-15-2013, 04:45 AM   #3
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by gpunk_w View Post
'Join notes' doesn't work for you ?
Shortcut 'j' is default
Thanks for the suggestion. I thought of that too, but I would still have to select groups of overlapping notes individually. I can't do this for e.g. all middle C's at once, or they'd become a single long note - while I want to join only strings of overlapping notes into single notes. So the Join function is certainly quite useful for manually 'cleaning up' a bit faster, but it still is pretty tedious.

Perhaps I should just try to create a little JS thingie or so myself. I was just hoping there is a quicker way I haven't thought of yet. I think I should try to play the sequence through some arpeggiator plug-in and play with its settings, if I'm lucky, that might just work well enough.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-15-2013, 09:58 AM   #4
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by Banned View Post
Perhaps I should just try to create a little JS thingie or so myself. I was just hoping there is a quicker way I haven't thought of yet. I think I should try to play the sequence through some arpeggiator plug-in and play with its settings, if I'm lucky, that might just work well enough.
Heh heh, while you're at it maybe you could come up with a way to eliminate duplicate adjacent midi events.

I wonder if that can be done.
Tod is offline   Reply With Quote
Old 05-15-2013, 10:45 AM   #5
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Link removed - new version in a later post.

Is it worth merging only a specific channel?

And how would you define adjacent?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 05-15-2013 at 01:37 PM.
DarkStar is offline   Reply With Quote
Old 05-15-2013, 11:38 AM   #6
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by DarkStar View Post
Give the attached prototype a go (remove the .txt extension).

NB: it doesn't handle CCs yet

Is it worth merging only a specific channel?

And how would you define adjacent?
Hi DarkStar, this is for the overlapping notes right?

Was your "And how would you define adjacent?" addressed to me?

If so:

Going from left to right, if a CC event that follows a preceding event has the same value as the preceding event then it should be deleted.

Do you think it's possible to put something together for eliminating the same CCs?
Tod is offline   Reply With Quote
Old 05-15-2013, 12:47 PM   #7
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Yep, that one just does overlapping notes.

Redundant CCs? Sure can ... go get a coffee or two.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 05-15-2013, 01:15 PM   #8
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by DarkStar View Post
Yep, that one just does overlapping notes.

Redundant CCs? Sure can ... go get a coffee or two.
Wow DarkStar this would be great. This will work on CC lanes right?

Also it needs to include all the duplicate CC events that immediately follow the starting event until there is a change in the value one way or another.

Looking forward to what you can do with this.
Tod is offline   Reply With Quote
Old 05-15-2013, 01:35 PM   #9
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default



Before and after: the red/green MIDI events are on channels 1 and 2


Link removed - new version in a later post.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 05-20-2013 at 07:12 AM.
DarkStar is offline   Reply With Quote
Old 05-15-2013, 01:52 PM   #10
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Thanks DarkStar, I'm a little confused, is this for both overlapping notes and redundant CC events?

Also, do I add the "py" extension to make this work?
Tod is offline   Reply With Quote
Old 05-15-2013, 02:03 PM   #11
Ollie
Super Moderator (no feelings)
 
Ollie's Avatar
 
Join Date: Dec 2007
Location: On or near a dike
Posts: 9,834
Default

DS for president (for many reasons)!
Ollie is offline   Reply With Quote
Old 05-15-2013, 02:05 PM   #12
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

@Tod,
Yes, it does both.

.py ? Nope, it's a JS FX, so remove the .txt extension and put it in your AppData\Roaming\REAPER\Effects folder (that's on Windows).
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 05-15-2013, 02:24 PM   #13
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Awesome, DarkStar. Looks like *exactly* what I need, will test as soon as I'm back behind the DAW. Thanks!! Saved me at least two extra large mugs of military grade espresso.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-15-2013, 03:00 PM   #14
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by DarkStar View Post
@Tod,
Yes, it does both.

.py ? Nope, it's a JS FX, so remove the .txt extension and put it in your AppData\Roaming\REAPER\Effects folder (that's on Windows).
Okay, did that, I'm on a portqable so I just loaded it in the Effects, how should this come up in FX browser? I don't think I see it there at the moment.
Tod is offline   Reply With Quote
Old 05-15-2013, 03:47 PM   #15
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Tod View Post
Okay, did that, I'm on a portqable so I just loaded it in the Effects, how should this come up in FX browser? I don't think I see it there at the moment.
I placed in inside the "DarkStar" subfolder of Effects (which I have symlinked into some Dropbox folder), renamed it to lose the .txt extension, and it shows up as "DarksStar/DS_MON", entirely as expected. I did a search for "MON" to find it in the FX Browser.

It also works as expected. After one test run on some of the 'offending' material - at 960 BPM, because I'm very efficient at making espresso:
Quote:
Originally Posted by JS: DarkStar/DS_MON
Notes merged: 2834


Playback and visual inspection shows everything as desired, nice overlaps for legato synth triggering. Thanks again, DarkStar - I owe you a bucketload of coffee.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 12:01 AM   #16
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

... you're welcome.


(But not everyone has a DarkStar folder )
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 05-16-2013, 08:50 AM   #17
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by DarkStar View Post
... you're welcome.


(But not everyone has a DarkStar folder )
Well, everyone *should* have one.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 10:50 AM   #18
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

I will make a DarkStar folder, beside bang, Banned, boreg folders. No TonE folder at all.

This also looks like another "note tracker" for preventing hanging notes? True? Yes, no? If yes, I can mention it also here: http://forum.cockos.com/showpost.php...87&postcount=8
TonE is offline   Reply With Quote
Old 05-16-2013, 11:32 AM   #19
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by TonE View Post
I will make a DarkStar folder, beside bang, Banned, boreg folders. No TonE folder at all.
Well, get creative. What's stopping you?
Quote:
Originally Posted by TonE View Post
This also looks like another "note tracker" for preventing hanging notes? True? Yes, no? If yes, I can mention it also here: http://forum.cockos.com/showpost.php...87&postcount=8
I haven't analysed it very well yet, but it seems to be conceptually related, yes. It does seem to track the note-on/off events for individual note numbers. However, the problem it solves here is different than hanging notes: with a hanging notes, you are missing a note-off event where it should have been. In my case here, I was having too many note-off events, which could be cutting off notes that should have still been playing. But I guess this JS would lend itself to modification to suit your purposes with a bit of work, or is at least a good example to study for purposes of creating a JS that does what you need to prevent hanging notes.

Fwiw, bang's idea of using a separate class for note tracking is perhaps a bit more difficult to modify / reuse if you're not very confortable with JS, but seems to be much more elegant, conceptually at least.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 11:38 AM   #20
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Yes, now we have two options to modify, to solve the problem of hanging notes after crazy real-time transpose bypassing.
1. bang's note tracking classes
2. DarkStar's very short and elegant example

Number 2 is easier to understand and modify.
TonE is offline   Reply With Quote
Old 05-16-2013, 12:07 PM   #21
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by TonE View Post
Yes, now we have two options to modify, to solve the problem of hanging notes after crazy real-time transpose bypassing.
1. bang's note tracking classes
2. DarkStar's very short and elegant example

Number 2 is easier to understand and modify.
Looking forward to seeing a folder/JS "TonE/TransposeWithoutHangingNotesMuhahahaha".
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 12:34 PM   #22
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Yeah, in two years maybe, why not. I am waiting for this more than two years already. It seems nobody cares of hanging notes, during transposition, except me, in real-time use. This is such an elementary operation for live fun. Anyway, is it just me who knows this? You just throw in a few transposed notes, into the normal melody flow, depending on the patch it can create all kind of crazy, unexpected, often also cool effect, to spice up the melody, bassline or chords for pitching up to create more tension, in the chorus usually.

If you apply parallel transposition to multiple tracks you can even define the entire progression, imagine 12 transposition effects, +1..+12 on 12 different keys which all transpose always ALL musical tracks. You could change the pitch-feeling of the whole song whenever you want, as you want. Ok maybe adding another set of 12 buttons for -1..-12, having all together 24 keys for real-time pitch manipulation on the entire song.

From a normal root-notes structure you could quickly create a blues progression if you want. Just use the pitches +5 and +7 in the right moments.
TonE is offline   Reply With Quote
Old 05-16-2013, 12:48 PM   #23
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by TonE View Post
Yeah, in two years maybe, why not. I am waiting for this more than two years already. It seems nobody cares of hanging notes, during transposition, except me, in real-time use. This is such an elementary operation for live fun. Anyway, is it just me who knows this? [...]
No of course not. I do this all the time myself. I just don't have much need to use REAPER JS to do that sort of stuff at all. For modular sequencing setups where I modulate/automate note pitches, I much prefer to use tools like Numerology (also as a plug-in with REAPER, or ReWired / connected via virtual MIDI and/or audio ports), Max/MSP, Pure data, etc. Imho it would be very cool to see more of that sort of stuff in REAPER / JS as well, so I'm definitely in favor of such things - it's just not much of a priority for me personally, as I already have suitable alternatives.

I'm sorry to hear about your long wait. And indeed, getting deeper into making your own JS may take some time. But you may be surprised at how quickly you can get to grips with it, if you have a few good examples that come close to what you need, and spend some time hacking them.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 01:15 PM   #24
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Hi Guys,

So far I'm not having much luck with this. First of all trying to put in overlapping notes in Reaper is almost impossible. In the picts below, #1 shows how much I'm overlapping the notes, a little less than a 16th. #2 shows them overlapped and #3 shows how they look after I exit the ME and come back in or simpley open the Event Filter.



After sending the Midi track to another track and recoreding the output, dthe overlapped notes did indeed join, however, all the CC data was deleted? What am I doing wrong?

Tod is offline   Reply With Quote
Old 05-16-2013, 01:18 PM   #25
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Yes, now with bang's and DarkStar's very close examples it might be quicker. Actually, all the time I have also an alternative solution, which is external to Reaper. It is using triggering Reaper's action to send all-notes-off, it is ok, for stopping hanging notes, even the sound interruption can be used as a nice effect, if recorded via audio in real-time (too badly, all-notes-off triggering can not be recorded INTO Reaper, so it would sound the same even after rendering compared to real-time use).

Sometimes I wished there is also a perfect-inside-Reaper solution, which would be having the right js. Then we could record tracks note output as midi and do our transposes and all notes would look still perfectly, leading to expected results, no matter which synth you are using for playing.

This js I want to use as a template in every Reaper track, always four instances with the pitch tranpose settings +12,+24,-12,-24.
TonE is offline   Reply With Quote
Old 05-16-2013, 01:29 PM   #26
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Tod, the code defines
Code:
CC_rcvd       =  (msg == CC_MSG && note_num != ALL_NOTES_OFF
                             && (in_channel == 0 || in_channel == msg_channel));
Anything else is filtered out. Input channel has to be 0 or msg_channel. msg_channel is defined as
Code:
msg_channel = 1 + msg1 - (msg * 16);
Welcome to the secret js talking world. If you want things to look mysterious, use js.
TonE is offline   Reply With Quote
Old 05-16-2013, 01:33 PM   #27
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by TonE View Post
Welcome to the secret js talking world. If you want things to look mysterious, use js.
Actually: use JS to speak raw MIDI bytes.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 01:35 PM   #28
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Tod View Post
So far I'm not having much luck with this. First of all trying to put in overlapping notes in Reaper is almost impossible.[...]
To create some offending MIDI, you can use arp!0 with note lengths >1.00 and play just a single note. That's one of the sources of some MIDI that prompted me to the question in the OP.

It's a good thing that REAPER doesn't let you easily create such overlapping notes, imho.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 01:45 PM   #29
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Quote:
Originally Posted by Tod View Post
After sending the Midi track to another track and recoreding the output, dthe overlapped notes did indeed join, however, all the CC data was deleted?
Does midi track routing inside Reaper route also cc events, beside notes? I am not sure about this, how cc is handled during routing, in all the possible cases, parent track, child track, sub track, subsub track, channel set to all or specific? Maybe there are some hidden settings somewhere in the options which can change the behaviour here?

Did you record the output also without routing to another track? Were the cc also deleted there? This could help you finding out the source of the problem.
TonE is offline   Reply With Quote
Old 05-16-2013, 02:06 PM   #30
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by TonE View Post
Does midi track routing inside Reaper route also cc events, beside notes? I am not sure about this, how cc is handled during routing, in all the possible cases, parent track, child track, sub track, subsub track, channel set to all or specific? Maybe there are some hidden settings somewhere in the options which can change the behaviour here?

Did you record the output also without routing to another track? Were the cc also deleted there? This could help you finding out the source of the problem.
Thanks TonE, Heh heh, you had me wondering so I just checked. With the JS FX bypassed the CC data was indeed recorded so it has to be the FX.
Tod is offline   Reply With Quote
Old 05-16-2013, 02:08 PM   #31
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by TonE View Post
Does midi track routing inside Reaper route also cc events, beside notes? I am not sure about this, how cc is handled during routing, in all the possible cases, parent track, child track, sub track, subsub track, channel set to all or specific? Maybe there are some hidden settings somewhere in the options which can change the behaviour here?
Yes, sure, CC# gets sent along with other MIDI between tracks. I'm not 100% sure about how to tweak the exact behavior; I occasionally have trouble with automatic CC# reset spam.
Quote:
Originally Posted by TonE View Post
Did you record the output also without routing to another track? Were the cc also deleted there? This could help you finding out the source of the problem.
Yes, played back through JS, send to other track which records MIDI (output), iirc. I wasn't deleting any CC#s though, but lengthening notes (i.e. deleting some undesirable note-on/off events). Tod was asking for the CC# cleanup behavior - very useful for me as well, but haven't used it myself for that purpose yet.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 02:23 PM   #32
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

I think the problem could be following, as both cc and notes use the same variable note_num, any following note would also change note_num, thus leading to confusing unexpected results. One trick would be using separate note_num for both cc and notes. Maybe naming them as note_num_notes and note_num_cc. Just one idea. You see, there are many places to make errors.


Code:
// .... Control Change
            CC_rcvd ? (
                note_vel != active_value[msg_channel * 16 + note_num] ? (
                    midisend(mpos, msg1, msg23);
                    active_value[msg_channel * 16 + note_num] = note_vel;
                ): CCs_removed +=1;
TonE is offline   Reply With Quote
Old 05-16-2013, 02:35 PM   #33
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by TonE View Post
I think the problem could be following, as both cc and notes use the same variable note_num, any following note would also change note_num, thus leading to confusing unexpected results. One trick would be using separate note_num for both cc and notes. Maybe naming them as note_num_notes and note_num_cc. Just one idea. You see, there are many places to make errors.


Code:
// .... Control Change
            CC_rcvd ? (
                note_vel != active_value[msg_channel * 16 + note_num] ? (
                    midisend(mpos, msg1, msg23);
                    active_value[msg_channel * 16 + note_num] = note_vel;
                ): CCs_removed +=1;
I'd say you're already well on your way to understand JS well enough to create your own solution, TonE, if you can spot poor variable naming and even anticipate what sort of bugs you could get just from reading the code.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-16-2013, 02:45 PM   #34
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Tod, did you also try with another set of notes and cc values, is it blocking always, or just in your example, where you had unlucky values? Try some lucky values.

Every message with a "msg23" will change note_num, if two are same bad luck.
Code:
note_num = msg23 & 127;
TonE is offline   Reply With Quote
Old 05-16-2013, 02:47 PM   #35
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by TonE View Post
I think the problem could be following, as both cc and notes use the same variable note_num, any following note would also change note_num, thus leading to confusing unexpected results. One trick would be using separate note_num for both cc and notes. Maybe naming them as note_num_notes and note_num_cc. Just one idea. You see, there are many places to make errors.


Code:
// .... Control Change
            CC_rcvd ? (
                note_vel != active_value[msg_channel * 16 + note_num] ? (
                    midisend(mpos, msg1, msg23);
                    active_value[msg_channel * 16 + note_num] = note_vel;
                ): CCs_removed +=1;
Okay TonE, so you're suggesting it needs another variable?

That would make sense however, I did run this without the notes just to see what might happen with the CC events and it didn't matter, they were still all deleted.

Actually I wonder if these shouldn't be two different FX, they really are very different and aren't related in any way.

Either way, it would be great to have both working well.
Tod is offline   Reply With Quote
Old 05-16-2013, 03:01 PM   #36
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by TonE View Post
Tod, did you also try with another set of notes and cc values, is it blocking always, or just in your example, where you had unlucky values? Try some lucky values.

Every message with a "msg23" will change note_num, if two are same bad luck.
Code:
note_num = msg23 & 127;
Thanks TonE, I'm quite familiar with some programming and the use of variables but I know nothing about JS or it's programming. So I don't have a clue how note_num = msg23 & 127 relates to the rest of the script or program.

Heh heh, sorry but I'm kind of depending on you guys to figure this out.
Tod is offline   Reply With Quote
Old 05-16-2013, 03:05 PM   #37
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

What I am not sure yet, does every midi_send return a previous midirecv(mpos, msg1, msg23)? I think so, but I am not sure. If not, at which point it will be returned?

If it returns, another try might be:
Code:
// .... Control Change
            CC_rcvd ? (
                note_vel != active_value[msg_channel * 16 + note_num] ? (
        active_value[msg_channel * 16 + note_num] = note_vel;            
        midisend(mpos, msg1, msg23);
                ): CCs_removed +=1;
Meaning reversing the order, first updating the array, then midisend, as this midisend would return? Who knows? I did not read the js documentation fully.

Tod, if I would know js, I would solve the note hanging problem during real-time crazy transposition bypassing. I am just philosophing here around js. jsophing.
TonE is offline   Reply With Quote
Old 05-16-2013, 03:32 PM   #38
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,745
Default

Quote:
Originally Posted by TonE View Post
What I am not sure yet, does every midi_send return a previous midirecv(mpos, msg1, msg23)? I think so, but I am not sure. If not, at which point it will be returned?

If it returns, another try might be:
Code:
// .... Control Change
            CC_rcvd ? (
                note_vel != active_value[msg_channel * 16 + note_num] ? (
        active_value[msg_channel * 16 + note_num] = note_vel;            
        midisend(mpos, msg1, msg23);
                ): CCs_removed +=1;
Meaning reversing the order, first updating the array, then midisend, as this midisend would return? Who knows? I did not read the js documentation fully.

Tod, if I would know js, I would solve the note hanging problem during real-time crazy transposition bypassing. I am just philosophing here around js. jsophing.
Heh heh, okay, well after looking at the initialization variables and arrays it appears that mpos, msg1, and msg23 are all built in variables. right? I don't have a clue what it all means.
Tod is offline   Reply With Quote
Old 05-17-2013, 01:53 AM   #39
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Phew ...public dissection and diagnosis :shock:

@Tod
Yes, the MIDI Editor does not display overlapping MIDI notes correctly when you re-open it.
-- to test the FX, I create a C2 and C#2 overlapping then moved the C#2 to C2
-- you need the updated version to handle CCs, removing them is working OK here; can you post a test project?
-- mpos, msg1, and msg23 are just names for variables (I borrowed them from the very first JS FX handling MIDI that I looked at - all credit to the author, can't remember who it is).

@TonE
"both cc and notes use the same variable note_num" should not be a problem. note_num is just the place to store the data extracted from the received message. Change it throughout to msg_value if you wish. I was too lazy, but might do that it the next version
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 05-17-2013 at 02:15 AM.
DarkStar is offline   Reply With Quote
Old 05-17-2013, 02:03 AM   #40
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

DarkStar says everything works ok, Tod said CC's are not working. Let us wait what Tod will say again, if also ok, then probably it is ok. Where is the updated version?
TonE is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.