AnsweredCAL Script: How to insert RPN?

Author
rogeriodec
Max Output Level: -75 dBFS
  • Total Posts : 753
  • Joined: 2004/04/09 13:55:04
  • Location: Brazil
  • Status: offline
2018/08/17 01:28:08 (permalink)

CAL Script: How to insert RPN?

In CAL I can insert some events:
(insert time channel NOTE key velocity duration)
(insert time channel CONTROL number value)
(insert time channel WHEEL value)
(insert time channel PATCH number bank) ;The ‘bank’ variable is optional
(insert time channel KEYAFT key value)
(insert time channel CHANAFT value)

 
But how can I insert RPN events?

rogeriodec.com.br


* Cakewalk By Bandlabs (always lastest versions), Window 10 x64
* Focusrite Scarlett Solo Audio Interface
* Intel i7-4790K CPU @ 4.00 GHz / ASROCK EXTREME 4 Z97 Mobo
* 2 SSD Samsung Evo 250 Gb (RAID-0) + 1 Western Digital 2 Tb + 1 Seagate 1 Tb
* Onboard video / 16 Gb RAM HyperX Fury 1600 Mhz
* 3 LCD Monitors
* Axiom 61 MIDI Controller, Tapco S5 Active Studio Monitors
#1
promidi
Max Output Level: -66 dBFS
  • Total Posts : 1220
  • Joined: 2014/11/21 18:46:39
  • Location: South Australia
  • Status: offline
Re: CAL Script: How to insert RPN? 2018/08/17 03:09:55 (permalink) ☼ Best Answerby rogeriodec 2018/08/17 04:10:43
The way I get around this is to work out what combination of Controller events result in the equivalent RPN events.

CC 6     Data Entry Most Significant Bit(MSB)    
CC 32   Data Entry Least Significant Bit(MSB)
CC 100 Registered Parameter Number LSB (RPN)
CC 101 Registered Parameter Number MSB (RPN)

For instance, if I want to enter a Yamaha XG pitch pitch bend range (which is done via a RPN 0 event), I use the following

(do
    (int pitchbendrange 2)
    (getInt pitchbendrange "Please enter pitchbend Range" 0 24)
    (insert Now 0 CONTROL 100 0)
    (insert (+= Now 1) 0 CONTROL 101 0)
    (insert (+= Now 2) 0 CONTROL 6 pitchbendrange)
)

I also use a specially crafted Studioware panel that does the same thing but without needing CAL

Hope that helps.



Windows 10 64bit fully patched, 16 gig ram . 
PCR-800 Controller.  (Working in Win 10 1809 64bit)
CPU: i5 4670. 
Video: Nvidia GTX560ti (latest drivers).
Audio IF: Focusrite 2i2 2nd Gen

Internet always on.

Software
: Cakewalk by Bandlab (2018.09 B29)
ASIO mode. 24bit 48khz 256 samples 
Rapture Pro, AAS GS2, VS-3, EP-4, VA-2, Chromophone 2, Z3TA+ 2, Addictive drums 2, Addictive Keys, Mpowersynth (latest), Iris 2, GPO5, Sampletank 3,
#2
Jump to:
© 2024 APG vNext Commercial Version 5.1