BEAST - Free Software Audio Synthesizer and Tracker  0.9.2
bsebasics.idl
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 namespace Bse {
3 using namespace Sfi;
4 /* param options */
5 Const READWRITE = ":r:w:";
6 Const STORAGE = ":r:w:S:";
7 Const STANDARD = ":r:w:S:G:";
8 Const STANDARD_RDONLY = ":r:w:S:G:ro:";
9 Const GUI = ":r:w:G:";
10 Const GUI_RDONLY = ":r:w:G:ro:";
11 Const GUI_READABLE = ":r:G:";
12 /* extra options */
13 Const SKIP_DEFAULT = ":skip-default:";
14 Const SKIP_UNDO = ":skip-undo:";
15 Const DEFAULT = STANDARD; // FIXME: remove
16 /* numeric constants */
17 Const MAXINT = +2147483647;
18 Const MININT = -2147483648;
19 Const MAXNUM = +9223372036854775807;
20 Const MINNUM = -9223372036854775808;
21 Const MINDB = -96; /* 32bit:-192 24bit:-144 16bit:-96 */
22 /* standard sequences */
23 sequence IntSeq {
24  Int ints;
25 };
26 sequence TypeSeq {
27  SfiString types;
28 };
29 sequence StringSeq {
30  SfiString strings;
31 };
32 sequence FloatSeq {
33  Real values;
34 };
35 /* musical tunings: http://en.wikipedia.org/wiki/Musical_tuning */
36 enum MusicalTuningType {
37  /* Equal Temperament: http://en.wikipedia.org/wiki/Equal_temperament */
38  MUSICAL_TUNING_12_TET = Enum (1, _("12 Tone Equal Temperament"), // http://en.wikipedia.org/wiki/Equal_temperament
39  _("The most common tuning system for modern Western music, "
40  "is the twelve-tone equal temperament, abbreviated as 12-TET, "
41  "which divides the octave into 12 equal parts.")),
42  MUSICAL_TUNING_7_TET = Enum (_("7 Tone Equal Temperament"), // http://en.wikipedia.org/wiki/Equal_temperament
43  _("A fairly common tuning system is the seven-tone equal temperament tuning system, "
44  "abbreviated as 7-TET. It divides the octave into 7 equal parts using 171 cent steps.")),
45  MUSICAL_TUNING_5_TET = Enum (_("5 Tone Equal Temperament"), // http://en.wikipedia.org/wiki/Equal_temperament
46  _("A fairly common tuning system is the five-tone equal temperament tuning system, "
47  "abbreviated as 5-TET. It divides the octave into 5 equal parts using 240 cent steps.")),
48  /* Rational Intonation: http://en.wikipedia.org/wiki/Just_intonation */
49  MUSICAL_TUNING_DIATONIC_SCALE = Enum (_("Diatonic Scale"), // http://en.wikipedia.org/wiki/Diatonic_scale
50  _("In music theory, a diatonic scale (also: heptatonia prima) is a seven-note "
51  "musical scale comprising five whole-tone and two half-tone steps. "
52  "The half tones are maximally separated, so between two half-tone steps "
53  "there are either two or three whole tones, repeating per octave.")), // Werckmeister I
54  MUSICAL_TUNING_INDIAN_SCALE = Enum (_("Indian Scale"), // http://en.wikipedia.org/wiki/Just_intonation#Indian_scales
55  _("Diatonic scale used in Indian music with wolf interval at Dha, close to 3/2")),
56  MUSICAL_TUNING_PYTHAGOREAN_TUNING= Enum (_("Pythagorean Tuning"), // http://en.wikipedia.org/wiki/Pythagorean_tuning
57  _("Pythagorean tuning is the oldest way of tuning the 12-note chromatic scale, "
58  "in which the frequency relationships of all intervals are based on the ratio 3:2. "
59  "Its discovery is generally credited to Pythagoras.")),
60  MUSICAL_TUNING_PENTATONIC_5_LIMIT= Enum (_("Pentatonic 5-limit"), // http://en.wikipedia.org/wiki/Pentatonic_scale
61  _("Pentatonic scales are used in modern jazz and pop/rock contexts "
62  "because they work exceedingly well over several chords diatonic "
63  "to the same key, often better than the parent scale.")),
64  MUSICAL_TUNING_PENTATONIC_BLUES = Enum (_("Pentatonic Blues"), // http://en.wikipedia.org/wiki/Pentatonic_scale
65  _("The blues scale is the minor pentatonic with an additional augmented fourth, "
66  "which is referred to as the \"blues note\".")),
67  MUSICAL_TUNING_PENTATONIC_GOGO = Enum (_("Pentatonic Gogo"), // http://en.wikipedia.org/wiki/Pentatonic_scale
68  _("The Pentatonic Gogo scale is an anhemitonic pentatonic scale used to tune the "
69  "instruments of the Gogo people of Tanzania.")),
70  /* Meantone Temperament: http://en.wikipedia.org/wiki/Meantone_temperament */
71  MUSICAL_TUNING_QUARTER_COMMA_MEANTONE = Enum (_("Quarter-Comma Meantone"), // http://en.wikipedia.org/wiki/Quarter-comma_meantone
72  _("Quarter-comma meantone was the most common meantone temperament in the "
73  "sixteenth and seventeenth centuries and sometimes used later.")), // Werckmeister II
74  MUSICAL_TUNING_SILBERMANN_SORGE = Enum (_("Silbermann-Sorge Temperament"), // http://de.wikipedia.org/wiki/Silbermann-Sorge-Temperatur
75  _("The Silbermann-Sorge temperament is a meantone temperament used for "
76  "Baroque era organs by Gottfried Silbermann.")),
77  /* Well Temperament: http://en.wikipedia.org/wiki/Well_temperament */
78  MUSICAL_TUNING_WERCKMEISTER_3 = Enum (_("Werckmeister III"), // http://en.wikipedia.org/wiki/Werckmeister_temperament
79  _("This tuning uses mostly pure (perfect) fifths, as in Pythagorean tuning, but each "
80  "of the fifths C-G, G-D, D-A and B-F# is made smaller, i.e. tempered by 1/4 comma. "
81  "Werckmeister designated this tuning as particularly suited for playing chromatic music.")),
82  MUSICAL_TUNING_WERCKMEISTER_4 = Enum (_("Werckmeister IV"), // http://en.wikipedia.org/wiki/Werckmeister_temperament
83  _("In this tuning the fifths C-G, D-A, E-B, F#-C#, and Bb-F are tempered narrow by 1/3 comma, "
84  "and the fifths G#-D# and Eb-Bb are widened by 1/3 comma. The other fifths are pure. "
85  "Most of its intervals are close to sixth-comma meantone. "
86  "Werckmeister designed this tuning for playing mainly diatonic music.")),
87  MUSICAL_TUNING_WERCKMEISTER_5 = Enum (_("Werckmeister V"), // http://en.wikipedia.org/wiki/Werckmeister_temperament
88  _("In this tuning the fifths D-A, A-E, F#-C#, C#-G#, and F-C are narrowed by 1/4 comma, "
89  "and the fifth G#-D# is widened by 1/4 comma. The other fifths are pure. "
90  "This temperament is closer to equal temperament than Werckmeister III or IV.")),
91  MUSICAL_TUNING_WERCKMEISTER_6 = Enum (_("Werckmeister VI"), // http://en.wikipedia.org/wiki/Werckmeister_temperament
92  _("This tuning is also known as Septenarius tuning is based on a division of the monochord "
93  "length into 196 = 7 * 7 * 4 parts. "
94  "The resulting scale has rational frequency relationships, but in practice involves pure "
95  "and impure sounding fifths. "
96  "Werckmeister described the Septenarius as a \"temperament which has nothing at all to do "
97  "with the divisions of the comma, nevertheless in practice so correct that one can be really "
98  "satisfied with it\".")),
99  MUSICAL_TUNING_KIRNBERGER_3 = Enum (_("Kirnberger III"), // http://en.wikipedia.org/wiki/Johann_Philipp_Kirnberger_temperament
100  _("Kirnberger's method of compensating for and closing the circle of fifths is to split the \"wolf\" "
101  "interval known to those who have used meantone temperaments between four fifths instead, "
102  "allowing for four 1/4-comma wolves to take their place. "
103  "1/4-comma wolves are used extensively in meantone and are much easier to tune and to listen to. "
104  "Therefore, only one third remains pure (between C and E).")),
105  MUSICAL_TUNING_YOUNG = Enum (_("Young Temperament"), // http://en.wikipedia.org/wiki/Young_temperament
106  _("Thomas Young devised a form of musical tuning to make the harmony most perfect in those keys which "
107  "are the most frequently used (give better major thirds in those keys), but to not have any unplayable keys. "
108  "This is attempted by tuning upwards from C a sequence of six pure fourths, "
109  "as well as six equally imperfect fifths.")),
110 };
111 enum MidiControlType {
112  /* special cased signals */
113  MIDI_CONTROL_NONE = Enum (0, _("None")),
114  /* 14bit, continuous controls */
115  MIDI_CONTROL_CONTINUOUS_0 = Enum (64, _("Bank Select"), _("Continuous MIDI Control #1 - Bank Select")),
116  MIDI_CONTROL_CONTINUOUS_1 = Enum (65, _("Modulation Depth")),
117  MIDI_CONTROL_CONTINUOUS_2 = Enum (66, _("Breath Control")),
118  MIDI_CONTROL_CONTINUOUS_3 = Enum (67, _("Continuous 3")),
119  MIDI_CONTROL_CONTINUOUS_4 = Enum (68, _("Foot Controller")),
120  MIDI_CONTROL_CONTINUOUS_5 = Enum (69, _("Portamento Time")),
121  MIDI_CONTROL_CONTINUOUS_6 = Enum (70, _("Data Entry")),
122  MIDI_CONTROL_CONTINUOUS_7 = Enum (71, _("Volume")),
123  MIDI_CONTROL_CONTINUOUS_8 = Enum (72, _("Balance")),
124  MIDI_CONTROL_CONTINUOUS_9 = Enum (73, _("Continuous 9")),
125  MIDI_CONTROL_CONTINUOUS_10 = Enum (74, _("Panorama")),
126  MIDI_CONTROL_CONTINUOUS_11 = Enum (75, _("Expression")),
127  MIDI_CONTROL_CONTINUOUS_12 = Enum (76, _("Effect Control 1")),
128  MIDI_CONTROL_CONTINUOUS_13 = Enum (77, _("Effect Control 2")),
129  MIDI_CONTROL_CONTINUOUS_14 = Enum (78, _("Continuous 14")),
130  MIDI_CONTROL_CONTINUOUS_15 = Enum (79, _("Continuous 15")),
131  MIDI_CONTROL_CONTINUOUS_16 = Enum (80, _("General Purpose Controller 1")),
132  MIDI_CONTROL_CONTINUOUS_17 = Enum (81, _("General Purpose Controller 2")),
133  MIDI_CONTROL_CONTINUOUS_18 = Enum (82, _("General Purpose Controller 3")),
134  MIDI_CONTROL_CONTINUOUS_19 = Enum (83, _("General Purpose Controller 4")),
135  MIDI_CONTROL_CONTINUOUS_20 = Enum (84, _("Continuous 20")),
136  MIDI_CONTROL_CONTINUOUS_21 = Enum (85, _("Continuous 21")),
137  MIDI_CONTROL_CONTINUOUS_22 = Enum (86, _("Continuous 22")),
138  MIDI_CONTROL_CONTINUOUS_23 = Enum (87, _("Continuous 23")),
139  MIDI_CONTROL_CONTINUOUS_24 = Enum (88, _("Continuous 24")),
140  MIDI_CONTROL_CONTINUOUS_25 = Enum (89, _("Continuous 25")),
141  MIDI_CONTROL_CONTINUOUS_26 = Enum (90, _("Continuous 26")),
142  MIDI_CONTROL_CONTINUOUS_27 = Enum (91, _("Continuous 27")),
143  MIDI_CONTROL_CONTINUOUS_28 = Enum (92, _("Continuous 28")),
144  MIDI_CONTROL_CONTINUOUS_29 = Enum (93, _("Continuous 29")),
145  MIDI_CONTROL_CONTINUOUS_30 = Enum (94, _("Continuous 30")),
146  MIDI_CONTROL_CONTINUOUS_31 = Enum (95, _("Continuous 31")),
147  /* 7bit, literal channel controls, MSB values */
148  MIDI_CONTROL_0 = Enum (128, _("Control 0 Bank Select MSB")),
149  MIDI_CONTROL_1 = Enum (129, _("Control 1 Modulation Depth MSB")),
150  MIDI_CONTROL_2 = Enum (130, _("Control 2 Breath Control MSB")),
151  MIDI_CONTROL_3 = Enum (131, _("control-3")),
152  MIDI_CONTROL_4 = Enum (132, _("Control 4 Foot Controller MSB")),
153  MIDI_CONTROL_5 = Enum (133, _("Control 5 Portamento Time MSB")),
154  MIDI_CONTROL_6 = Enum (134, _("Control 6 Data Entry MSB")),
155  MIDI_CONTROL_7 = Enum (135, _("Control 7 Volume MSB")),
156  MIDI_CONTROL_8 = Enum (136, _("Control 8 Balance MSB")),
157  MIDI_CONTROL_9 = Enum (137, _("control-9")),
158  MIDI_CONTROL_10 = Enum (138, _("Control 10 Panorama MSB")),
159  MIDI_CONTROL_11 = Enum (139, _("Control 11 Expression MSB")),
160  MIDI_CONTROL_12 = Enum (140, _("Control 12 Effect Control 1 MSB")),
161  MIDI_CONTROL_13 = Enum (141, _("Control 13 Effect Control 2 MSB")),
162  MIDI_CONTROL_14 = Enum (142, _("control-14")),
163  MIDI_CONTROL_15 = Enum (143, _("control-15")),
164  MIDI_CONTROL_16 = Enum (144, _("Control 16 General Purpose Controller 1 MSB")),
165  MIDI_CONTROL_17 = Enum (145, _("Control 17 General Purpose Controller 2 MSB")),
166  MIDI_CONTROL_18 = Enum (146, _("Control 18 General Purpose Controller 3 MSB")),
167  MIDI_CONTROL_19 = Enum (147, _("Control 19 General Purpose Controller 4 MSB")),
168  MIDI_CONTROL_20 = Enum (148, _("control-20")),
169  MIDI_CONTROL_21 = Enum (149, _("control-21")),
170  MIDI_CONTROL_22 = Enum (150, _("control-22")),
171  MIDI_CONTROL_23 = Enum (151, _("control-23")),
172  MIDI_CONTROL_24 = Enum (152, _("control-24")),
173  MIDI_CONTROL_25 = Enum (153, _("control-25")),
174  MIDI_CONTROL_26 = Enum (154, _("control-26")),
175  MIDI_CONTROL_27 = Enum (155, _("control-27")),
176  MIDI_CONTROL_28 = Enum (156, _("control-28")),
177  MIDI_CONTROL_29 = Enum (157, _("control-29")),
178  MIDI_CONTROL_30 = Enum (158, _("control-30")),
179  MIDI_CONTROL_31 = Enum (159, _("control-31")),
180  /* 7bit, literal channel controls, LSB values */
181  MIDI_CONTROL_32 = Enum (160, _("Control 32 Bank Select LSB")),
182  MIDI_CONTROL_33 = Enum (161, _("Control 33 Modulation Depth LSB")),
183  MIDI_CONTROL_34 = Enum (162, _("Control 34 Breath Control LSB")),
184  MIDI_CONTROL_35 = Enum (163, _("control-35")),
185  MIDI_CONTROL_36 = Enum (164, _("Control 36 Foot Controller LSB")),
186  MIDI_CONTROL_37 = Enum (165, _("Control 37 Portamento Time LSB")),
187  MIDI_CONTROL_38 = Enum (166, _("Control 38 Data Entry LSB")),
188  MIDI_CONTROL_39 = Enum (167, _("Control 39 Volume LSB")),
189  MIDI_CONTROL_40 = Enum (168, _("Control 40 Balance LSB")),
190  MIDI_CONTROL_41 = Enum (169, _("control-41")),
191  MIDI_CONTROL_42 = Enum (170, _("Control 42 Panorama LSB")),
192  MIDI_CONTROL_43 = Enum (171, _("Control 43 Expression LSB")),
193  MIDI_CONTROL_44 = Enum (172, _("Control 44 Effect Control 1 LSB")),
194  MIDI_CONTROL_45 = Enum (173, _("Control 45 Effect Control 2 LSB")),
195  MIDI_CONTROL_46 = Enum (174, _("control-46")),
196  MIDI_CONTROL_47 = Enum (175, _("control-47")),
197  MIDI_CONTROL_48 = Enum (176, _("Control 48 General Purpose Controller 1 LSB")),
198  MIDI_CONTROL_49 = Enum (177, _("Control 49 General Purpose Controller 2 LSB")),
199  MIDI_CONTROL_50 = Enum (178, _("Control 50 General Purpose Controller 3 LSB")),
200  MIDI_CONTROL_51 = Enum (179, _("Control 51 General Purpose Controller 4 LSB")),
201  MIDI_CONTROL_52 = Enum (180, _("control-52")),
202  MIDI_CONTROL_53 = Enum (181, _("control-53")),
203  MIDI_CONTROL_54 = Enum (182, _("control-54")),
204  MIDI_CONTROL_55 = Enum (183, _("control-55")),
205  MIDI_CONTROL_56 = Enum (184, _("control-56")),
206  MIDI_CONTROL_57 = Enum (185, _("control-57")),
207  MIDI_CONTROL_58 = Enum (186, _("control-58")),
208  MIDI_CONTROL_59 = Enum (187, _("control-59")),
209  MIDI_CONTROL_60 = Enum (188, _("control-60")),
210  MIDI_CONTROL_61 = Enum (189, _("control-61")),
211  MIDI_CONTROL_62 = Enum (190, _("control-62")),
212  MIDI_CONTROL_63 = Enum (191, _("control-63")),
213  /* 7bit, literal channel controls */
214  MIDI_CONTROL_64 = Enum (192, _("Control 64 Damper Pedal Switch (Sustain)")),
215  MIDI_CONTROL_65 = Enum (193, _("Control 65 Portamento Switch")),
216  MIDI_CONTROL_66 = Enum (194, _("Control 66 Sustenuto Switch")),
217  MIDI_CONTROL_67 = Enum (195, _("Control 67 Soft Switch")),
218  MIDI_CONTROL_68 = Enum (196, _("Control 68 Legato Pedal Switch")),
219  MIDI_CONTROL_69 = Enum (197, _("Control 69 Hold Pedal Switch")),
220  MIDI_CONTROL_70 = Enum (198, _("Control 70 Sound Variation")),
221  MIDI_CONTROL_71 = Enum (199, _("Control 71 Filter Resonance (Timbre)")),
222  MIDI_CONTROL_72 = Enum (200, _("Control 72 Sound Release Time")),
223  MIDI_CONTROL_73 = Enum (201, _("Control 73 Sound Attack Time")),
224  MIDI_CONTROL_74 = Enum (202, _("Control 74 Sound Brightness")),
225  MIDI_CONTROL_75 = Enum (203, _("Control 75 Sound Decay Time")),
226  MIDI_CONTROL_76 = Enum (204, _("Control 76 Vibrato Rate")),
227  MIDI_CONTROL_77 = Enum (205, _("Control 77 Vibrato Depth")),
228  MIDI_CONTROL_78 = Enum (206, _("Control 78 Vibrato Delay")),
229  MIDI_CONTROL_79 = Enum (207, _("Control 79 Sound Control 10")),
230  MIDI_CONTROL_80 = Enum (208, _("Control 80 General Purpose Switch 5")),
231  MIDI_CONTROL_81 = Enum (209, _("Control 81 General Purpose Switch 6")),
232  MIDI_CONTROL_82 = Enum (210, _("Control 82 General Purpose Switch 7")),
233  MIDI_CONTROL_83 = Enum (211, _("Control 83 General Purpose Switch 8")),
234  MIDI_CONTROL_84 = Enum (212, _("Control 84 Portamento Control (Note)")),
235  MIDI_CONTROL_85 = Enum (213, _("control-85")),
236  MIDI_CONTROL_86 = Enum (214, _("control-86")),
237  MIDI_CONTROL_87 = Enum (215, _("control-87")),
238  MIDI_CONTROL_88 = Enum (216, _("control-88")),
239  MIDI_CONTROL_89 = Enum (217, _("control-89")),
240  MIDI_CONTROL_90 = Enum (218, _("control-90")),
241  MIDI_CONTROL_91 = Enum (219, _("Control 91 Reverb Depth")),
242  MIDI_CONTROL_92 = Enum (220, _("Control 92 Tremolo Depth")),
243  MIDI_CONTROL_93 = Enum (221, _("Control 93 Chorus Depth")),
244  MIDI_CONTROL_94 = Enum (222, _("Control 93 Detune Depth")),
245  MIDI_CONTROL_95 = Enum (223, _("Control 95 Phase Depth")),
246  MIDI_CONTROL_96 = Enum (224, _("Control 96 Data Increment Trigger")),
247  MIDI_CONTROL_97 = Enum (225, _("Control 97 Data Decrement Trigger")),
248  MIDI_CONTROL_98 = Enum (226, _("Control 98 Non-Registered Parameter MSB")),
249  MIDI_CONTROL_99 = Enum (227, _("Control 99 Non-Registered Parameter LSB")),
250  MIDI_CONTROL_100 = Enum (228, _("Control 100 Registered Parameter MSB")),
251  MIDI_CONTROL_101 = Enum (229, _("Control 101 Registered Parameter LSB")),
252  MIDI_CONTROL_102 = Enum (230, _("control-102")),
253  MIDI_CONTROL_103 = Enum (231, _("control-103")),
254  MIDI_CONTROL_104 = Enum (232, _("control-104")),
255  MIDI_CONTROL_105 = Enum (233, _("control-105")),
256  MIDI_CONTROL_106 = Enum (234, _("control-106")),
257  MIDI_CONTROL_107 = Enum (235, _("control-107")),
258  MIDI_CONTROL_108 = Enum (236, _("control-108")),
259  MIDI_CONTROL_109 = Enum (237, _("control-109")),
260  MIDI_CONTROL_110 = Enum (238, _("control-110")),
261  MIDI_CONTROL_111 = Enum (239, _("control-111")),
262  MIDI_CONTROL_112 = Enum (240, _("control-112")),
263  MIDI_CONTROL_113 = Enum (241, _("control-113")),
264  MIDI_CONTROL_114 = Enum (242, _("control-114")),
265  MIDI_CONTROL_115 = Enum (243, _("control-115")),
266  MIDI_CONTROL_116 = Enum (244, _("control-116")),
267  MIDI_CONTROL_117 = Enum (245, _("control-117")),
268  MIDI_CONTROL_118 = Enum (246, _("control-118")),
269  MIDI_CONTROL_119 = Enum (247, _("control-119")),
270  MIDI_CONTROL_120 = Enum (248, _("Control 120 All Sound Off ITrigger")),
271  MIDI_CONTROL_121 = Enum (249, _("Control 121 All Controllers Off ITrigger")),
272  MIDI_CONTROL_122 = Enum (250, _("Control 122 Local Control Switch")),
273  MIDI_CONTROL_123 = Enum (251, _("Control 123 All Notes Off ITrigger")),
274  MIDI_CONTROL_124 = Enum (252, _("Control 124 Omni Mode Off ITrigger")),
275  MIDI_CONTROL_125 = Enum (253, _("Control 125 Omni Mode On ITrigger")),
276  MIDI_CONTROL_126 = Enum (254, _("Control 126 Monophonic Voices Mode")),
277  MIDI_CONTROL_127 = Enum (255, _("Control 127 Polyphonic Mode On ITrigger")),
278 };
279 enum MidiChannelEventType {
280  MIDI_EVENT_NONE = 0,
281  /* channel voice messages */
282  MIDI_EVENT_NOTE_OFF,
283  MIDI_EVENT_NOTE_ON,
284  MIDI_EVENT_KEY_PRESSURE,
285  MIDI_EVENT_CONTROL_CHANGE,
286  MIDI_EVENT_PROGRAM_CHANGE,
287  MIDI_EVENT_CHANNEL_PRESSURE,
288  MIDI_EVENT_PITCH_BEND,
289  /* system common messages */
290  MIDI_EVENT_SYS_EX,
291  MIDI_EVENT_SONG_POINTER,
292  MIDI_EVENT_SONG_SELECT,
293  MIDI_EVENT_TUNE,
294  /* system realtime messages */
295  MIDI_EVENT_TIMING_CLOCK,
296  MIDI_EVENT_SONG_START,
297  MIDI_EVENT_SONG_CONTINUE,
298  MIDI_EVENT_SONG_STOP,
299  MIDI_EVENT_ACTIVE_SENSING,
300  MIDI_EVENT_SYSTEM_RESET,
301 };
302 record MidiChannelEvent
303 {
304  MidiChannelEventType event_type;
305  Int channel = SfiInt ("Channel", "", 0, 0, 99, 1, ":readwrite"); // FIXME: MAX_MIDI_CHANNEL
306  Num tick_stamp = SfiNum ("Time Stamp", "", 0, 0, SFI_MAXNUM, 0, STANDARD);
307  /* note (on/off/pressure) */
308  Real frequency = Freq ("Frequency", "", KAMMER_FREQ, ":readwrite");
309  Real velocity = SfiReal ("Velocity", "", 1, 0, 1.0, 0.1, ":readwrite");
310  /* control change */
311  Int control = SfiInt ("Control Number", "", 0, 0, 1024, 8, ":readwrite");
312  Real value = SfiReal ("Value", "", 0, -1, +1, 0.1, ":readwrite");
313  /* program change */
314  Int program = SfiInt ("Program", "", 0, 0, 0x7f, 0x10, ":readwrite");
315  /* channel pressure */
316  Real intensity = SfiReal ("Intensity", "", 0, 0, 1.0, 0.1, ":readwrite");
317  /* pitch bend */
318  Real pitch_bend = SfiReal ("Pitch Bend", "", 0, -1, +1, 0.1, ":readwrite");
319  /* song pointer */
320  Int song_pointer = SfiInt ("Song Pointer", "", 0, 0, 0x3fff, 0x80, ":readwrite");
321  /* song select */
322  Int song_number = SfiInt ("Song Number", "", 0, 0, 0x7f, 0x10, ":readwrite");
323 };
324 sequence NoteSeq {
325  Int notes = Note ("Note", "", KAMMER_NOTE, ":readwrite"); /* FIXME: s/notes/note/ for pspecs, but not the C API */
326 };
327 interface Item;
328 sequence ItemSeq {
329  Info blurb = ("A list of BSE items or derived types.");
330  Item items;
331 };
332 record PropertyCandidates {
333  Info blurb = ("A structure describing tentative property values.");
334  SfiString label;
335  SfiString tooltip;
336  ItemSeq items;
337  TypeSeq partitions = SfiSeq ("Type Partitions", "List of types which may logically partition the list of items by type discrimination", STANDARD);
338 };
339 record NoteDescription
340 {
341  MusicalTuningType musical_tuning;
342  Int note = Note ("Note", "", KAMMER_NOTE, ":readwrite");
343  Int octave = Octave ("Octave", "", KAMMER_OCTAVE, ":readwrite");
344  Real freq = Freq ("Frequency", "", KAMMER_FREQ, ":readwrite");
345  Int fine_tune = FineTune ("Fine Tune", "", ":readwrite");
346  Int semitone = SfiInt ("Semitone", "", 0, 0, 11, 1, ":readwrite");
347  Bool upshift;
348  Int letter = SfiInt ("Letter", "International abbreviation letter for this note", 64, 32, 126, 1, ":readwrite");
349  SfiString name = SfiString ("Name", "", "", ":readwrite");
350  /* constants */
351  Int max_fine_tune = SfiInt ("Max Fine Tune", "", MAX_FINE_TUNE, MAX_FINE_TUNE, MAX_FINE_TUNE, 0, ":readable");
352  Int kammer_note = SfiInt ("Kammer Note", "", KAMMER_NOTE, KAMMER_NOTE, KAMMER_NOTE, 0, ":readable");
353  Info blurb = "A note description provides all necessary details about a specific note. "
354  "Various procedures exist to retrieve a note description; given different "
355  "key values. The max_fine_tune and kammer_note fields are constants, which "
356  "are provided for compatibility reasons and will vanish in future APIs.";
357 };
358 record NoteSequence
359 {
360  Int offset = Note ("Note Offset", "Center/base note", KAMMER_NOTE, ":readwrite");
361  NoteSeq notes = SfiSeq ("Notes", "Sequence of notes", ":readwrite");
362 };
363 sequence PixelSeq {
364  Int pixels;
365 };
366 record Icon
367 {
368  Info blurb = "BSE icon representation.";
369  Int width = SfiInt ("Width", "Width in pixels or 0 for no icon", 0, 0, MAXINT, 1, ":readwrite");
370  Int height = SfiInt ("Height", "Height in pixels or 0 for no icon", 0, 0, MAXINT, 1, ":readwrite");
371  PixelSeq pixel_seq = SfiSeq ("Pixels", "Pixel array of width*height ARGB pixels", ":readwrite");
372 };
373 record Category
374 {
375  Int category_id = SfiInt ("Category ID", "", 1, 1, G_MAXINT, 1, ":readwrite");
376  SfiString category;
377  Int mindex;
378  Int lindex;
379  SfiString type;
380  Icon icon;
381 };
382 sequence CategorySeq {
383  Category cats;
384 };
385 record Dot
386 {
387  Real x;
388  Real y;
389 };
390 sequence DotSeq {
391  Dot dots;
392 };
393 /* BSE Part structures */
394 interface Part;
395 interface Track;
396 /* BSE Track structures */
397 record TrackPart {
398  Int tick = SfiInt ("Tick", "", 0, 0, G_MAXINT, 384, STANDARD);
399  Part part;
400  Int duration = SfiInt ("Duration", "", 0, 0, G_MAXINT, 384, STANDARD);
401 };
402 sequence TrackPartSeq {
403  TrackPart tparts;
404 };
405 record SampleFileInfo {
406  SfiString file = SfiString ("Filename", "", "", STANDARD);
407  Int size = SfiInt ("File Size", "", 0, 0, G_MAXINT, 0, STANDARD);
408  Num mtime = SfiNum ("Modification Time", "", 0, 0, SFI_MAXNUM, 0, STANDARD);
409  SfiString loader = SfiString ("Loader", "", "", STANDARD);
410  StringSeq waves = SfiSeq ("", "", STANDARD);
411  Int error = SfiInt ("BseErrorType", "", 0, 0, G_MAXINT, 0, STANDARD); // FIXME: use BseErrorType here
412 };
413 interface Janitor;
414 
415 // == BSE Global Config ==
416 Const DEFAULT_AUTHOR = "\357\277\271\357\277\272{{bse.idl/default-author}}\357\277\273";
417 Const DEFAULT_LICENSE = "\357\277\271\357\277\272{{bse.idl/default-license}}\357\277\273";
418 Const USER_DATA_PATH = "\357\277\271\357\277\272{{bse.idl/user-data-path}}\357\277\273";
419 Const DEFAULT_SAMPLE_PATH = USER_DATA_PATH "samples";
420 Const DEFAULT_EFFECTS_PATH = USER_DATA_PATH "effects";
421 Const DEFAULT_INSTRUMENTS_PATH = USER_DATA_PATH "instruments";
422 Const DEFAULT_SCRIPTS_PATH = USER_DATA_PATH "scripts";
423 Const DEFAULT_PLUGINS_PATH = USER_DATA_PATH "plugins";
424 
425 record GConfig {
426  group _("Synthesis Settings") {
427  Int synth_latency =
428  SfiInt (_("Latency [ms]"),
429  _("Processing duration between input and output of a single sample, smaller values increase CPU load"),
430  50, 1, 2000, 5, STANDARD);
431  Int synth_mixing_freq =
432  SfiInt (_("Synth Mixing Frequency"),
433  _("Synthesis mixing frequency, common values are: 22050, 44100, 48000"),
434  44100, 8000, 192000, 0, STANDARD);
435  Int synth_control_freq =
436  SfiInt (_("Synth Control Frequency"),
437  _("Frequency at which control values are evaluated, "
438  "should be much smaller than Synth Mixing Frequency to reduce CPU load"),
439  1000, 1, 192000, 0, STANDARD);
440  };
441  group _("MIDI") {
442  Bool invert_sustain = SfiBool (_("Invert Sustain Pedal"),
443  _("Invert the state of sustain (damper) pedal so on/off meanings are reversed"),
444  FALSE, STANDARD);
445  };
446  group _("Default Values") {
447  SfiString author_default = SfiString (_("Default Author"), _("Default value for 'Author' fields"),
448  DEFAULT_AUTHOR, STANDARD);
449  SfiString license_default = SfiString (_("Default License"), _("Default value for 'License' fields"),
450  DEFAULT_LICENSE, STANDARD);
451  };
452  group _("Search Paths") {
453  SfiString sample_path = SfiString (_("Sample Path"),
454  _("Search path of directories, seperated by \";\", used to find audio samples."),
455  DEFAULT_SAMPLE_PATH, STANDARD ":searchpath");
456  SfiString effect_path = SfiString (_("Effect Path"),
457  _("Search path of directories, seperated by \";\", used to find BSE effect files."),
458  DEFAULT_EFFECTS_PATH, STANDARD ":searchpath");
459  SfiString instrument_path = SfiString (_("Instrument Path"),
460  _("Search path of directories, seperated by \";\", used to find BSE instrument files."),
461  DEFAULT_INSTRUMENTS_PATH, STANDARD ":searchpath");
462  SfiString script_path = SfiString (_("Script Path"),
463  _("Search path of directories, seperated by \";\", used to find BSE scheme scripts."),
464  DEFAULT_SCRIPTS_PATH, STANDARD ":searchpath");
465  SfiString plugin_path = SfiString (_("Plugin Path"),
466  _("Search path of directories, seperated by \";\", used to find BSE plugins. This path "
467  "is searched for in addition to the standard BSE plugin location on this system."),
468  DEFAULT_PLUGINS_PATH, STANDARD ":searchpath");
469  SfiString ladspa_path = SfiString (_("LADSPA Path"),
470  _("Search path of directories, seperated by \";\", used to find LADSPA plugins. This "
471  "path is searched for in addition to the standard LADSPA location on this system. "
472  "LADSPA is the Linux Audio Developer's Simple Plugin API, more informations about "
473  "LADSPA plugins can be found at http://www.ladspa.org/."),
474  "", STANDARD ":searchpath");
475  };
476 };
477 
478 } // Bse
The Bse namespace contains all functions of the synthesis engine.
Definition: bstbseutils.cc:67
Const KAMMER_FREQ
Kammer note, representing the kammer frequency's MIDI note value for A' or A4.
Definition: bseapi.idl:281
Const KAMMER_OCTAVE
Pitch Standard, see also: https://en.wikipedia.org/wiki/A440_(pitch_standard)
Definition: bseapi.idl:282
Const KAMMER_NOTE
Value represents unparsable/unknown notes.
Definition: bseapi.idl:280
Definition: sficxx.hh:16
The Sfi namespace contains utilities for synthesis.
Definition: oldidl.idl:4