/[svn]/doc/docbase/instrument_scripts/nksp/reference/functions/nksp_same_region_function.html
ViewVC logotype

Diff of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_same_region_function.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3233 by schoenebeck, Sun May 28 16:09:56 2017 UTC revision 3264 by schoenebeck, Thu Jun 1 00:00:24 2017 UTC
# Line 68  same_region(??key1??, ??key2??) Line 68  same_region(??key1??, ??key2??)
68      </note>      </note>
69    
70      <h3>Examples</h3>      <h3>Examples</h3>
71      <p>None yet.</p>      <p>
72          Note that it is also indeed valid and useful sometimes to pass the same
73          note number to both arguments of this function, which allows you to check
74          whether one certain key is mapped to a region.
75        </p>
76        <code>
77    on init
78      declare const $NO_REGION := 5
79    end on
80    
81    on note
82      if (same_region($EVENT_NOTE, $EVENT_NOTE) = $NO_REGION)
83        message("Key " &amp; $EVENT_NOTE &amp; " does not have any sample mapped. So you won't hear anything!")
84      else
85        message("Key " &amp; $EVENT_NOTE &amp; " is mapped to a region, and thus you should hear its sample now.")
86      end if
87    end on
88        </code>
89    
90      <h3>Availability</h3>      <h3>Availability</h3>
91      <p>Since LinuxSampler 2.0.0.svn53.<p>      <p>Since LinuxSampler 2.0.0.svn53.<p>

Legend:
Removed from v.3233  
changed lines
  Added in v.3264

  ViewVC Help
Powered by ViewVC