spl(channelindex) -- REAPER 2.018+
Context: @sample only
If you wish to programmatically choose which sample to access, use this function (rather than splX). This is slightly slower than splX, however has the advantage that you can do spl(variable) (enabling easily configurable channel mappings). Valid syntaxes include:
Currently any script which uses the "spl(channelindex)" syntax fails to compile. This makes many jsfx fail to work.
Reaper documentation, http://reaper.fm/sdk/js/vars.php#js_specialvars