1 |
<html> |
2 |
<head> |
3 |
<meta name="author" content="Christian Schoenebeck"> |
4 |
<title>msb() function</title> |
5 |
<meta name="description" content="Most significant byte of a 14-bit value."> |
6 |
</head> |
7 |
<body> |
8 |
<h1>msb()</h1> |
9 |
<p> |
10 |
Calculates the most significant byte of a 14 bit value. |
11 |
High-end bits 8 to 14 of argument are bit-shifted down by 7 bits |
12 |
and returned as result by this function. |
13 |
</p> |
14 |
|
15 |
<h3>Function Prototype</h3> |
16 |
<p/> |
17 |
<code lang="nksp"> |
18 |
msb(??number??) |
19 |
</code> |
20 |
|
21 |
<h3>Arguments</h3> |
22 |
<table> |
23 |
<tr> |
24 |
<th>Argument Name</th> <th>Data Type</th> <th>Description</th> |
25 |
</tr> |
26 |
<tr> |
27 |
<td><code>??number??</code></td> |
28 |
<td>Integer Number</td> |
29 |
<td>Original 14 bit input value.<br> |
30 |
[required]</td> |
31 |
</tr> |
32 |
</table> |
33 |
|
34 |
<h3>Return Value</h3> |
35 |
<table> |
36 |
<tr> |
37 |
<th>Data Type</th> <th>Description</th> |
38 |
</tr> |
39 |
<tr> |
40 |
<td>Integer Number</td> |
41 |
<td>High-end 7 bits of passed argument.</td> |
42 |
</tr> |
43 |
</table> |
44 |
|
45 |
<h3>Remarks</h3> |
46 |
<p> |
47 |
This functions neither allows finalness, |
48 |
nor standard unit types for its argument <code>??number??</code>. |
49 |
</p> |
50 |
|
51 |
<h3>Examples</h3> |
52 |
<p/> |
53 |
<code> |
54 |
on init |
55 |
message("msb(0) = " & msb(0)) |
56 |
message("lsb(0) = " & lsb(0)) |
57 |
message("msb(1) = " & msb(1)) |
58 |
message("lsb(1) = " & lsb(1)) |
59 |
message("msb(2) = " & msb(2)) |
60 |
message("lsb(2) = " & lsb(2)) |
61 |
message("msb(128) = " & msb(128)) |
62 |
message("lsb(128) = " & lsb(128)) |
63 |
message("msb(129) = " & msb(129)) |
64 |
message("lsb(129) = " & lsb(129)) |
65 |
end on |
66 |
</code> |
67 |
|
68 |
<h3>See also</h3> |
69 |
<p><code>lsb()</code>, <code>sh_left()</code>, <code>sh_right()</code><p> |
70 |
|
71 |
<h3>Availability</h3> |
72 |
<p>Since LinuxSampler 2.1.1.svn26.<p> |
73 |
|
74 |
</body> |
75 |
</html> |