/[svn]/linuxsampler/trunk/src/scriptvm/examples/polyphonic.txt
ViewVC logotype

Contents of /linuxsampler/trunk/src/scriptvm/examples/polyphonic.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2727 - (show annotations) (download)
Tue Mar 31 17:46:11 2015 UTC (9 years ago) by schoenebeck
File MIME type: text/plain
File size: 654 byte(s)
- Just added API doc comments to Script VM code.

1 { Polyhonic variables are, in contrast to all other variable types, not global
2 variables, but instead they exist separately in each event. Which circumvents
3 the problem that (global) variables may be altered undesiredly if event
4 handlers are called in "parallel". Downside: polyphonic variables need to be
5 allocated as many times as events exist in the system. Thus: one single
6 polyphonic variable takes a lot of memory! Due to this reason, only integer
7 variables are allowed to be declared as polyphonics ATM. }
8
9 on init
10 declare polyphonic $p
11 end on
12
13 on note
14 message($p)
15 $p := $p + 1
16 message($p)
17 $p := $p + 1
18 message($p)
19 end on

  ViewVC Help
Powered by ViewVC