How to load and play Sonar files from a midi keyboard
Hi,
2 undocumented CAL functions (found by David R Leach a long time ago) will help to do the trick. It's been tested with CAL version number 10.
Download and unzip this file in the default Sonar CAL folder.
http://www.dockandrun.com/downloads/calsongs.zip Open Song_E0.CAL and Song_F0.CAL. Put your Sonar songs name.
Settings must be done to make it run correctly.
+Sonar settings:
- Gobal options -> General -> Check "Allow only one open project at a time".
- Gobal options -> General -> Uncheck "On Stop, Rewind to Now Marker".
+Sonar X settings:
- Preferences->File->Advanced-> Check "Allow only one open project at a time".
- Track View-> options -> Uncheck "On Stop, Rewind to Now Marker".
Now let's do the Midi keyboard binding.
+For Sonar, open Options -> Key Bindings
+For Sonar X, open Preferences-> Customization-> Key Bindings
- In the Type of Keys section, select "Midi" and check "Enabled".
- In the Midi Shift Options section, select "Key" and select "C0".
- in the Bindings section:
-- Select "Db0" and bind it to "Start_Stop.CAL".
-- Select "D0" and bind it to "Rewind.CAL".
-- Select "E0" and bind it to "Song_E0.CAL".
-- Select "F0" and bind it to "Song_F0.CAL".
Once it's done, select a Midi note in Sonar.
(Sometimes CAL will not open if no midi note is selected in Sonar.)
+On your Midi keyboard:
- Hold down C0 and press E0 to load Song_E0.CAL.
- Hold down C0 and press Db0 to start playing.
- Hold down C0 and press D0 to stop playing.
- Hold down C0 and press F0 to load Song_F0.CAL.
Rename and save your Keybinding file.
Shameless plug (Sorry)
Let's say you have 40 songs binded to your Midi keyboard.
ReEvent can help you to manage, edit, and test quickly your CAL scripts.
You don't need any key bindings because ReEvent opens CAL files with Ctrl-F1.
Load the demo version
http://www.dockandrun.com/download.html +ReEvent settings:
- To open the ReEvent Main Menu, right-click on the ReEvent banner on top.
- In the Main menu, click on CAL Folder to open it.
- Unzip calsongs.zip into the ReEvent CAL folder.
- Drag and drop Song_E0.CAL and Song_F0.CAL onto ReEvent buttons.
The last step will allow to "connect" the Midi keyboard bindings with ReEvent.
This way, any CAL update done in ReEvent will "refresh" the Midi keyboard bindings.
+Sonar CAL path settings:
- Gobal options -> Folders -> Set the "CAL Folder" to the ReEvent CAL folder.
+Sonar X CAL path settings:
- Preferences-> File -> Folders Location -> Idem as Sonar setting.
Tip: Right-click on Song_E0.CAL and open the Properties window to get the path.
Have fun,
Serge