1 |
<html> |
2 |
<head> |
3 |
<meta name="author" content="Christian Schoenebeck"> |
4 |
<title>Instrument Scripts</title> |
5 |
<meta name="description" content="Introduction to real-time instrument scripts."> |
6 |
<link rel="stylesheet" href="http://doc.linuxsampler.org/css/preview.css"> |
7 |
<script type="text/javascript" src="http://doc.linuxsampler.org/js/preview.js"></script> |
8 |
</head> |
9 |
<body> |
10 |
<h1>Real-Time Instrument Scripts</h1> |
11 |
<p> |
12 |
The sampler technology is constantly evolving to satisfy new feature |
13 |
requirements of sound designer in order to allow them creating more and |
14 |
more realistic sounds. As an example you might look at state of the art |
15 |
orchestra libraries. They not only allow you pick one of the individual |
16 |
instrument sounds of an orchestra, they also allow you to control the |
17 |
articulation of the respective orchestra instrument while playing them |
18 |
live with your keyboard. So you might start playing an interesting intro |
19 |
with a string ensemble in |
20 |
<i title="Technique that uses a bowing style that leaves the string clearly to produce a light 'bouncing' sound.">spiccato</i> |
21 |
playing style, then you might go over into a slow bridge part where the |
22 |
string ensemble is resembling a |
23 |
<i title="Of successive notes in performance, connected without any intervening silence of articulation.">legato</i> |
24 |
articulation or even |
25 |
<i title="Portamento is a continous pitch sliding from one note to another.">portamento</i> |
26 |
in between, which makes that part of the song very calm and |
27 |
relaxed, and then you shock your audience all of a sudden with a loud |
28 |
<i title="Staccato signifies a note of shortened duration, separated from the note that may follow by silence.">staccato</i>, |
29 |
automatically supported by kettledrum and brass sounds, that wakes up even |
30 |
the last one in the back row. And the best thing: you did not switch to |
31 |
another instrument during that entire song. |
32 |
</p> |
33 |
|
34 |
<h3>Technical Challenge</h3> |
35 |
<p> |
36 |
Adding these kinds of features to a sampler had long been a challenge for |
37 |
software developers. On one hand you need to provide the musician |
38 |
additional controls to let him switch between such kind of orchestra |
39 |
articulations. Sound designers came up with various ideas to let the |
40 |
keyboard player do this. For example by |
41 |
<ul> |
42 |
<li>using continous controllers like the keyboard's modulation wheel</li> |
43 |
<li>using a dedicated keys section on the keyboard where each key selects another playing style</li> |
44 |
<li>utilizing aftertouch support of keyboards</li> |
45 |
</ul> |
46 |
and some more. And on the other hand developers needed to extend the |
47 |
sampler software and the instrument file format to deal with all those |
48 |
extensions. Thinking about <i>portamento</i> for example, the sampler not |
49 |
only has to pick the right sample for the first key the keyboard player |
50 |
hits, the sampler also has to detect the next note and needs to pick a |
51 |
special dedicated portamento sample that goes specifically from that one |
52 |
note to that other note. If the sampler would do that synthetically |
53 |
instead, then it would sound synthetically. |
54 |
</p> |
55 |
<p> |
56 |
And if that was not enough, sound designers started even to ask for very |
57 |
exotic features, specifically for just a bunch of sounds or even for just |
58 |
one single sound of |
59 |
theirs, for example |
60 |
a specific note pattern that shall automatically be added by the sampler |
61 |
to each note being played by the keyboard player. |
62 |
The requested feature set became such large, that sampler developers |
63 |
failed to put all this into their stock sampler software package. |
64 |
A completely new solution was required. |
65 |
</p> |
66 |
|
67 |
<h3>Scripts as Solution</h3> |
68 |
<p> |
69 |
Instead of bloating the sampler engine with more and more suboptimal |
70 |
features that not really suited anybody, the sampler developers turned the |
71 |
way around and opened the sampler engine for sound designers, so that they |
72 |
could add their own custom software components and bundle them with their |
73 |
sounds. These kinds of software plugins that are directly glued and |
74 |
shipped with sounds are called <i>Instrument Scripts</i>, they extend |
75 |
the sampler software with new software features required by the |
76 |
respective sound. |
77 |
</p> |
78 |
<p> |
79 |
Sound designers were finally free to add their own features to the sampler |
80 |
and used <i>Instrument Scripts</i> extensively to create stunning new |
81 |
sounds. For example they came up with a feature called |
82 |
<i title="Sympathetic resonance is a harmonic phenomenon wherein a formerly passive string responds to external vibrations to which it has a harmonic likeness."> |
83 |
symphatetic resonance |
84 |
</i> for their piano sound libraries, which brought piano sounds another |
85 |
great leap forward to match their real, physical counter parts. |
86 |
</p> |
87 |
|
88 |
<h2>Using Scripts with LinuxSampler</h2> |
89 |
<p> |
90 |
LinuxSampler allows you to write and use such <i>Instrument Scripts</i> |
91 |
as well. At this point however, support for instrument scripts is limited |
92 |
to the GigaStudio format engine of LinuxSampler yet. The script engine was |
93 |
developed in a very modular design, where most of the script engine's |
94 |
software is independent from the actual sampler format and the |
95 |
respective sampler format engine is just adding its format specific |
96 |
extensions to the script language. For example the GigaStudio format |
97 |
engine adds scripting functions to allow the sound designer to control the |
98 |
dimension region by scripts. |
99 |
</p> |
100 |
<p> |
101 |
In other words: adding script support to the SFZ format engine for |
102 |
example would not be much work. Simply nobody so far had time and |
103 |
passion to add the scripting feature to the SFZ engine yet. |
104 |
</p> |
105 |
|
106 |
<h3>Bundling Scripts with Sounds</h3> |
107 |
<p> |
108 |
Our graphical instrument editor for the GigaStudio format - <i>gigedit</i> - |
109 |
includes an instrument script editor and allows you to attach |
110 |
instrument scripts to individual GigaStudio format sounds. Refer to the |
111 |
gigedit manual for <a href="gigedit_scripts.html">how to manage instrument scripts with gigedit.</a> |
112 |
</p> |
113 |
|
114 |
<h3>Learning the Script Language</h3> |
115 |
<p> |
116 |
You certainly find some instrument scripts ready to be used on the |
117 |
Internet. So you can simply download and attach them to your sounds with |
118 |
<i>gigedit</i>. In order to write your own custom instrument scripts though, you |
119 |
need to get in touch with the scripting language. Refer to the |
120 |
<a href="nksp.html">NKSP Language Tour</a> |
121 |
for learning how to write your own scripts. |
122 |
</p> |
123 |
|
124 |
<h3>Script Language Reference</h3> |
125 |
<p> |
126 |
If you are already familiar with the instrument script language basics, |
127 |
and just need details and examples to the individual built-in functions |
128 |
and built-in variables, then refer to the |
129 |
<a href="nksp_reference.html">NKSP Reference Manual</a>. |
130 |
</p> |
131 |
|
132 |
</body> |
133 |
</html> |