File: Limits.txt

package info (click to toggle)
yoshimi 2.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,012 kB
  • sloc: cpp: 62,589; xml: 97; sh: 94; python: 45; makefile: 14
file content (57 lines) | stat: -rw-r--r-- 1,637 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Updated 29/7/2018

This structure is intended to enable you to traverse the controls structure
testing/adjusting at each level on the tree.

The function is called via the new 'readAllData' function with a command block
'value' and 'type' and 'action' set appropriately - see 'Reading_Values'. It returns
a float representing the wanted element.

'type' is used to determine the operation.

values (& 3) {these will not be changed}
0   return 'value' input adjusted between max and min.
1   return min
2   return max
3   return default

flags
bit 2   set defines this as a limits test
bit 3   (returns) set = error seen

bit 5   (returns) set = MIDI-learnable
bit 7   (returns) set = regard as integer

Normal byte structure is used to determine how far down the tree to go for a value.

e.g. on entry
      value  type & 3   source   command     part    {remainder all 255}
       200     0         (any)      0         240

This would return 127 - the input value adjusted to the maximum for master volume.


TODO - still not extended in 2022 :(

If an out of range setting is found part way along a command chain. 'value' should
be set to the byte number where the error was encountered and 'type' bit 4 should be
set, otherwise it should be cleared.

Numbers are:
1   control
2   part
3   kit
4   engine
5   insert
6   parameter
7   offset
8   miscmsg (unlikely to see an error here)

e.g
'part' was set to 70 (invalid part number)
'value' should be returned as 2

'part' set to 3 (valid) but control set to 200 (no such control at this level)
'value' should be returned as 1

Other numbers may be added later to give finer grading.