Old 12-11-2008, 03:19 AM   #1
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default Channel->Keyswitch converter [now operational, and regenerating limbs]

Hi there, JSwamis.

I use many virtual instruments, and generally I find changing MIDI channels to be easier than using keyswitches which are outside of the instruments’ playable range, and thus tend to require lots of zooming and/or scrolling to see what’s going on. After prolonged exposure, this can lead to reap rage.

To remedy the situation, I’ve started fiddling around with some basic JS code in an attempt to use MIDI channels (that are not 1) to trigger keyswitches.

It’s working to some extent, but rather intermittently, and I have some questions.

1. Has anyone tackled this problem before, and has one working out of the box?
2. How long does a manufactured keyswitch have to be (in samples) to trigger an instrument change response?
3. Can the MIDI engine handle two events starting/finishing at the same sample time, or one starting/one ending? If not, what sort of distance does there need to be?
4. As a result of these factors, am I going to need to use memory buffers to bleed data over into the next block?
5. Is there anything else I’m missing or need to bear in mind?

Thank you in advance for any elucidation,
Julio

UPDATE: It’s here and working: you can download the latest version at https://stash.reaper.fm/2134/Midi_Channel_Keyswitcher

Last edited by Julio; 01-09-2009 at 02:39 PM.
Julio is offline   Reply With Quote
Old 12-11-2008, 05:40 AM   #2
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default

Probably a dumb question but what's a keyswitch? I've never heard that term before.

I think the MIDI engine can probably handle whatever you throw at it but I can't answer technical questions.
IXix is offline   Reply With Quote
Old 12-11-2008, 02:47 PM   #3
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default

Hi IXix, and thanks for replying.

A keyswitch is basically a special note that you can play on a virtual instrument: instead of producing a pitch/scrape/whatever, it silently changes the sound set for actual notes when you play them later. An example would be switching between legato, staccato, non vibrato and sul ponticello articulations for a solo violin. Typically they live around C0,C#0 etc or way up high™ for bass instruments.

Does that make things clearer?

Julio
Julio is offline   Reply With Quote
Old 12-12-2008, 04:33 AM   #4
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,891
Default

Why not re-map some playable keys to the keyswitch notes? You could do that very easily with several existing plugins. You could selectively transpose a set of notes with MIDI Tool II or do precision remapping of individual keys with MIDI KeyMap II (get it here) or MIDI KeyMap which is included with Reaper but isn't as flexible. There are others too but those are the only ones I can think of right now.
IXix is offline   Reply With Quote
Old 12-12-2008, 06:05 AM   #5
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

In ye olde Logic I took yet another route.
I built a macro that converted controller events to the keyswitching notes. That way I could use a controller lane in the MIDI editor (or from the MIDI keyboard) to trigger the appropriate keyswitch note events with different values of cc19.
I was even able to build a tiny display that showed the current articulation in plain text. Of course I had to label a dedicated display for the different instruments, which is why I quit using that display when the number of keyswitch instruments grew. Still it was smooth sailing. Good old environment... miss ya.

I am sure you can do that with JS fairly easy, and wouldn't have to struggle with timing issues. It is very likely that there is already a JS that does controller to note conversion, didn't check that.

That said, with the named notes I am very happy with directly using keyswitches apart from the zoom issue. I'd dream of having seperate note panes in the PRV that have seperate vertical scroll/zoom...

Last edited by gofer; 12-12-2008 at 06:07 AM.
gofer is offline   Reply With Quote
Old 12-12-2008, 12:10 PM   #6
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default

Thank you for your help, IXix and gopher!

IXix: Thanks again. That could work; the only thing is that typically I have around 10 keyswitches and need all the playable range I can get my grubby mitts on. Also, if channels work, it’ll unify my workflow across instruments.

gopher: Yeah, that sounds like the style, and independent zoomy-zoom could be really handy. If there are no timing issues then, in theory, the approach I’m taking should work fine(?), aka it may just be quirky/buggy for some reason. I’ll post my JS code here after today’s matrimonial missions, and maybe someone can show me the error of my ways, or suggest an alternative that’s more reliable.

Julio
Julio is offline   Reply With Quote
Old 12-14-2008, 02:09 AM   #7
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default It’s working … even better than before!

Okay folks, after discussing the underlying engine details here and on the VSL forum, and finding out just how amazingly robust the keyswitch response is, I delved into the code some more and finally got it working.

If you are interested, you can download the latest version here: https://stash.reaper.fm/2134/Midi_Channel_Keyswitcher

PS Little tip: mixing up the NOTE_ON and NOTE_OFF values can waste loads of time.

PPS Something else I learned: it helps knowing that NOTE_ON messages with velocity 0 mean NOTE_OFF: updated in version 0.9.0107.

Last edited by Julio; 01-06-2009 at 07:15 PM.
Julio is offline   Reply With Quote
Old 12-14-2008, 06:29 AM   #8
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,572
Default

great idea, thank you very much.
Jae.Thomas is offline   Reply With Quote
Old 12-14-2008, 12:56 PM   #9
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default

Thanks JBM, you’re very welcome.

Hope you find it useful.
Julio is offline   Reply With Quote
Old 01-06-2009, 07:18 PM   #10
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default

This is an short announcement that version 0.9.0107 has been released, with some minor optimizations and one major bug fix (aka taking care of the NOTE_ON Zero Velocity Conspiracy®).

Again, here is the link: https://stash.reaper.fm/2134/Midi_Channel_Keyswitcher

All the best,
Julio
Julio is offline   Reply With Quote
Old 01-08-2009, 04:28 AM   #11
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default

Okay, another update, dubbed version 0.9.0108, which fixes an potential slider value initialization bug.

That link again: https://stash.reaper.fm/2134/Midi_Channel_Keyswitcher

Plus I have combined the Midi Channel Keyswitcher with the Midi Length Controller (q.v.), to produce … … … Midi Length Controller + Midi Channel Keyswitcher!

Here’s the fella, now weighing in at 0.9.0110:
https://stash.reaper.fm/2219/Midi_Len...l%2BChannel_Ks

This recent addition to the family serves two main purposes:
  1. Reducing the need for two separate plugins chained together if and when you want combined functionality (which I, for one, often do).
  2. Paving the way for future integrated additions, such as legato and performance-repetition detection/handling. These will be made available as they fly off the assembly line.

Regards,
Julio

Last edited by Julio; 01-09-2009 at 02:33 PM.
Julio is offline   Reply With Quote
Old 01-09-2009, 02:32 PM   #12
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default

Another bug fix release for Dr Julenstein’s latest monstrosity (version 0.9.0110):

https://stash.reaper.fm/2219/Midi_Len...l%2BChannel_Ks

Now events should be synchronized, like all decent tubulidentata-related wristgear…
Julio is offline   Reply With Quote
Old 01-12-2009, 03:00 PM   #13
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default

The Beast has now been certified as Domesticated: Level 2, following attempts to make it use the delay functionality only during playback and recording as well as the bugfix, which are now both featured in the Length Controller arm as well, version 0.9.0113.

Another question: with the play_state of 5 (record), I imagine this is the global transport state, and not per-track based on armament and so on? Is there any way in JS to find out whether or not the track is armed? Or another way to achieve this? That way, disabling delay when expecting live input could also be done.

And … how would I get the delay slider numerical value to update when an value outside the range is entered, sent to JS for processing and then re-updated (to an accepted number) in code? At the moment, it still shows the out-of-bounds value until it is forced to update, one way or another.

Thanks,
Julio
Julio is offline   Reply With Quote
Old 01-12-2009, 03:14 PM   #14
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,572
Default

this should be included in the installer
Jae.Thomas is offline   Reply With Quote
Old 01-12-2009, 03:34 PM   #15
Julio
Human being with feelings
 
Julio's Avatar
 
Join Date: Jun 2007
Posts: 204
Default

Quote:
Originally Posted by Jason Brian Merrill View Post
this should be included in the installer
Thanks Jason, I’m glad you find it has its purposes.

Other optional features (and bugfixes) will be added over time, to the Channel Keyswitcher and the Midi Megalith.

Last edited by Julio; 01-12-2009 at 03:40 PM.
Julio 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 04:53 PM.


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