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

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

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

revision 3311 by schoenebeck, Wed Apr 29 00:22:59 2015 UTC revision 3312 by schoenebeck, Sat Jul 15 17:04:05 2017 UTC
# Line 10  Line 10 
10        Prints the provided text to the sampler's terminal. This function is        Prints the provided text to the sampler's terminal. This function is
11        merely for script development and debugging purposes.        merely for script development and debugging purposes.
12      </p>      </p>
13            <note class="important">
14          The message() function is not appropriate for being used with your final
15          production sounds, since it can lead to audio dropouts.
16          You should only use the message() function to try out things, and to spot
17          and debug problems with your scripts. Same applies to all text string
18          variables in general. Don't use any
19          <a href="nksp.html#string_variables">string variables</a> in your final
20          production sounds.
21          You may use <a href="nksp.html#preprocessor_statements">preprocessor statements</a>
22          to handle this effectively.
23        </note>
24        <p>
25          Since it is a common requirement to switch a script between a development
26          version and a production version, with either debug messages turned on or
27          off, there is a dedicated built-in preprocessor condition to handle this
28          conveniently for all <code>message()</code> calls: By simply adding
29          <code>SET_CONDITION(NKSP_NO_MESSAGE)</code> to your script, all subsequent
30          <code>message()</code> calls will be filtered out by the parser on
31          preprocessor level. You can also revert that behavior at a subsequent
32          section in your script by adding <code>RESET_CONDITION(NKSP_NO_MESSAGE)</code>,
33          so all subsequent calls to <code>message()</code> will be processed again.
34          This way you can easily also just disable <code>message()</code> calls in
35          certain sections of your script.
36        </p>
37    
38      <h3>Function Prototype</h3>      <h3>Function Prototype</h3>
39      <p/>      <p/>
40      <code lang="nksp">      <code lang="nksp">
# Line 48  on controller Line 72  on controller
72    message("MIDI Controller " & $CC_NUM " changed its value to " & %CC[$CC_NUM])    message("MIDI Controller " & $CC_NUM " changed its value to " & %CC[$CC_NUM])
73  end on  end on
74      </code>      </code>
       
     <note class="important">  
       The message() function is not appropriate for being used with your final  
       production sounds, since it can lead to audio dropouts.  
       You should only use the message() function to try out things, and to spot  
       and debug problems with your scripts. Same applies to all text string  
       variables in general. Don't use any  
       <a href="nksp.html#string_variables">string variables</a> in your final  
       production sounds.  
       You may use <a href="nksp.html#preprocessor_statements">preprocessor statements</a>  
       to handle this effectively.  
     </note>  
75    
76    </body>    </body>
77  </html>  </html>

Legend:
Removed from v.3311  
changed lines
  Added in v.3312

  ViewVC Help
Powered by ViewVC