Helpful ReplyCAL Script: Is there arrays?

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

CAL Script: Is there arrays?

Is there any kind of array of variables in CAL Script?

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
msmcleod
Max Output Level: -72 dBFS
  • Total Posts : 920
  • Joined: 2004/01/27 07:15:30
  • Location: Scotland
  • Status: offline
Re: CAL Script: Is there arrays? 2018/08/08 22:46:14 (permalink)
no arrays.
 
CAL is very basic as a scripting language. 
 
This is about the most comprehensive guide out there:
http://members.ziggo.nl/t.valkenburgh/Cakewalk%20Application%20Language%20Programming%20Guide.pdf
 

Mark McLeod
Cakewalk by BL | ASUS P8B75-V, Intel I5 3570 16GB RAM Win 10 64 + Win 7 64/32 SSD HD's, Scarlett 18i20 / 6i6 | ASUS ROG GL552VW 16GB RAM Win 10 64 SSD HD's, Scarlett 2i2 | Behringer Truth B2030A / Edirol MA-5A | Mackie MCU + C4 + XT | 2 x BCF2000, Korg NanoKontrol Studio
#2
msmcleod
Max Output Level: -72 dBFS
  • Total Posts : 920
  • Joined: 2004/01/27 07:15:30
  • Location: Scotland
  • Status: offline
Re: CAL Script: Is there arrays? 2018/08/08 22:57:07 (permalink) ☄ Helpfulby rogeriodec 2018/08/08 23:24:50
Thinking about it, if you really needed arrays you could temporarily create a MIDI track and use MIDI data to store your values. It's a very nasty hack though, but might work, and it'll probably be dead slow.
 
To index a particular value you'd need to traverse the array from the beginning each time - i.e.  use a combination of forEachEvent and a counter variable.
 

Mark McLeod
Cakewalk by BL | ASUS P8B75-V, Intel I5 3570 16GB RAM Win 10 64 + Win 7 64/32 SSD HD's, Scarlett 18i20 / 6i6 | ASUS ROG GL552VW 16GB RAM Win 10 64 SSD HD's, Scarlett 2i2 | Behringer Truth B2030A / Edirol MA-5A | Mackie MCU + C4 + XT | 2 x BCF2000, Korg NanoKontrol Studio
#3
rogeriodec
Max Output Level: -75 dBFS
  • Total Posts : 753
  • Joined: 2004/04/09 13:55:04
  • Location: Brazil
  • Status: offline
Re: CAL Script: Is there arrays? 2018/08/08 23:26:49 (permalink)
Thanks again Mark! Don't you think that after decades, it's time to (now CbB) have a decent script language? 

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
#4
KPerry
Max Output Level: -44 dBFS
  • Total Posts : 3120
  • Joined: 2011/04/26 15:13:15
  • Location: London, UK
  • Status: offline
Re: CAL Script: Is there arrays? 2018/08/09 11:34:04 (permalink)
Or use a string with delimiters and parse out the value between delimters x and x+1 (not sure if doable either, but...)?

Windows 7 x64 SP1
SONAR x86/x64
 
Intel Q6600/8GB
MOTU UltraliteMk3 (USB/ASIO)
Edirol PCR300
#5
msmcleod
Max Output Level: -72 dBFS
  • Total Posts : 920
  • Joined: 2004/01/27 07:15:30
  • Location: Scotland
  • Status: offline
Re: CAL Script: Is there arrays? 2018/08/09 12:42:23 (permalink)
KPerry
Or use a string with delimiters and parse out the value between delimters x and x+1 (not sure if doable either, but...)?


Unfortunately there's next to no string handling routines in CAL either.
 
I've got a rough design for a LUA replacement for CAL, using the Control Surface API as this gives access to most of the menu based routines that CAL does. It would also involve programatically writing CAL scripts on the fly, running them, then picking up the results via files (not sure if these could be memory based or not). It would also rely on the fact that a control surface DLL is kept in memory, so state can then be passed between subsequent calls to the CAL DLL function.
 
However, not only is it a fairly big job, I seriously doubt I'll have the spare time to work on this any time soon.
 
If I do get anything working though, I'll make it available.

Mark McLeod
Cakewalk by BL | ASUS P8B75-V, Intel I5 3570 16GB RAM Win 10 64 + Win 7 64/32 SSD HD's, Scarlett 18i20 / 6i6 | ASUS ROG GL552VW 16GB RAM Win 10 64 SSD HD's, Scarlett 2i2 | Behringer Truth B2030A / Edirol MA-5A | Mackie MCU + C4 + XT | 2 x BCF2000, Korg NanoKontrol Studio
#6
Jump to:
© 2024 APG vNext Commercial Version 5.1