BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
bseapi.idl
Go to the documentation of this file.
1  // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html -*-mode:c++;-*-
7 namespace Bse {
8 
9 // == Type Constants ==
10 Const MAXINT63 = +9223372036854775807;
11 Const MAXINT32 = +4294967295;
12 Const MAXINT31 = +2147483647;
13 Const MININT31 = -2147483648;
14 Const MAXFLOAT64 = 1.7976931348623157e+308;
15 
16 // == Enums ==
17 enum Error {
18  NONE = Enum (0, "", _("OK")),
19  INTERNAL = Enum (1, "", _("Internal error (please report)")),
20  UNKNOWN = Enum (2, "", _("Unknown error")),
21  IO = Enum (3, "", _("Input/output error")),
22  PERMS = Enum (4, "", _("Insufficient permissions")),
23  // file errors
24  FILE_BUSY = Enum (5, "", _("Device or resource busy")),
25  FILE_EXISTS = Enum (6, "", _("File exists already")),
26  FILE_EOF = Enum (7, "", _("End of file")),
27  FILE_EMPTY = Enum (8, "", _("File empty")),
28  FILE_NOT_FOUND = Enum (9, "", _("No such file, device or directory")),
29  FILE_IS_DIR = Enum (10, "", _("Is a directory")),
30  FILE_OPEN_FAILED = Enum (11, "", _("Open failed")),
31  FILE_SEEK_FAILED = Enum (12, "", _("Seek failed")),
32  FILE_READ_FAILED = Enum (13, "", _("Read failed")),
33  FILE_WRITE_FAILED = Enum (14, "", _("Write failed")),
34  // out of resource conditions
35  MANY_FILES = Enum (15, "", _("Too many open files")),
36  NO_FILES = Enum (16, "", _("Too many open files in system")),
37  NO_SPACE = Enum (17, "", _("No space left on device")),
38  NO_MEMORY = Enum (18, "", _("Out of memory")),
39  // content errors
40  NO_HEADER = Enum (19, "", _("Failed to detect header")),
41  NO_SEEK_INFO = Enum (20, "", _("Failed to retrieve seek information")),
42  NO_DATA = Enum (21, "", _("No data available")),
43  DATA_CORRUPT = Enum (22, "", _("Data corrupt")),
44  WRONG_N_CHANNELS = Enum (23, "", _("Wrong number of channels")),
45  FORMAT_INVALID = Enum (24, "", _("Invalid format")),
46  FORMAT_UNKNOWN = Enum (25, "", _("Unknown format")),
47  DATA_UNMATCHED = Enum (26, "", _("Requested data values unmatched")),
48  // miscellaneous errors
49  TEMP = Enum (27, "", _("Temporary error")),
50  WAVE_NOT_FOUND = Enum (28, "", _("No such wave")),
51  CODEC_FAILURE = Enum (29, "", _("Codec failure")),
52  UNIMPLEMENTED = Enum (30, "", _("Functionality not implemented")),
53  INVALID_PROPERTY = Enum (31, "", _("Invalid object property")),
54  INVALID_MIDI_CONTROL = Enum (32, "", _("Invalid MIDI control type")),
55  PARSE_ERROR = Enum (33, "", _("Parsing error")),
56  SPAWN = Enum (34, "", _("Failed to spawn child process")),
57  // Device errors
58  DEVICE_NOT_AVAILABLE = Enum (35, "", _("No device (driver) available")),
59  DEVICE_ASYNC = Enum (36, "", _("Device not async capable")),
60  DEVICE_BUSY = Enum (37, "", _("Device busy")),
61  DEVICE_FORMAT = Enum (38, "", _("Failed to configure device format")),
62  DEVICE_BUFFER = Enum (39, "", _("Failed to configure device buffer")),
63  DEVICE_LATENCY = Enum (40, "", _("Failed to configure device latency")),
64  DEVICE_CHANNELS = Enum (41, "", _("Failed to configure number of device channels")),
65  DEVICE_FREQUENCY = Enum (42, "", _("Failed to configure device frequency")),
66  DEVICES_MISMATCH = Enum (43, "", _("Device configurations mismatch")),
67  // BseSource errors
68  SOURCE_NO_SUCH_MODULE = Enum (44, "", _("No such synthesis module")),
69  SOURCE_NO_SUCH_ICHANNEL = Enum (45, "", _("No such input channel")),
70  SOURCE_NO_SUCH_OCHANNEL = Enum (46, "", _("No such output channel")),
71  SOURCE_NO_SUCH_CONNECTION = Enum (47, "", _("Input/Output channels not connected")),
72  SOURCE_PRIVATE_ICHANNEL = Enum (48, "", _("Input channel is private")),
73  SOURCE_ICHANNEL_IN_USE = Enum (49, "", _("Input channel already in use")),
74  SOURCE_CHANNELS_CONNECTED = Enum (50, "", _("Input/output channels already connected")),
75  SOURCE_CONNECTION_INVALID = Enum (51, "", _("Invalid synthesis module connection")),
76  SOURCE_PARENT_MISMATCH = Enum (52, "", _("Parent mismatch")),
77  SOURCE_BAD_LOOPBACK = Enum (53, "", _("Bad loopback")),
78  SOURCE_BUSY = Enum (54, "", _("Synthesis module currently busy")),
79  SOURCE_TYPE_INVALID = Enum (55, "", _("Invalid synthsis module type")),
80  // BseProcedure errors
81  PROC_NOT_FOUND = Enum (56, "", _("No such procedure")),
82  PROC_BUSY = Enum (57, "", _("Procedure currently busy")),
83  PROC_PARAM_INVAL = Enum (58, "", _("Procedure parameter invalid")),
84  PROC_EXECUTION = Enum (59, "", _("Procedure execution failed")),
85  PROC_ABORT = Enum (60, "", _("Procedure execution aborted")),
86  // various procedure errors
87  NO_ENTRY = Enum (61, "", _("No such entry")),
88  NO_EVENT = Enum (62, "", _("No such event")),
89  NO_TARGET = Enum (63, "", _("No target")),
90  NOT_OWNER = Enum (64, "", _("Ownership mismatch")),
91  INVALID_OFFSET = Enum (65, "", _("Invalid offset")),
92  INVALID_DURATION = Enum (66, "", _("Invalid duration")),
93  INVALID_OVERLAP = Enum (67, "", _("Invalid overlap")),
94 };
95 
96 enum MidiSignal {
97  // special case signals
98  PROGRAM = Enum (1, _("Program Change")), // 7bit
99  PRESSURE = Enum (2, _("Channel Pressure")), // 7bit
100  PITCH_BEND = Enum (3, _("Pitch Bend")), // 14bit
101  VELOCITY = Enum (4, _("Note Velocity")),
102  FINE_TUNE = Enum (5, _("Note Fine Tune")),
103  // 14bit, continuous controls
104  CONTINUOUS_0 = Enum (64, _("Bank Select")),
105  CONTINUOUS_1 = Enum (65, _("Modulation Depth")),
106  CONTINUOUS_2 = Enum (66, _("Breath Control")),
107  CONTINUOUS_3 = Enum (67, _("Continuous 3")),
108  CONTINUOUS_4 = Enum (68, _("Foot Controller")),
109  CONTINUOUS_5 = Enum (69, _("Portamento Time")),
110  CONTINUOUS_6 = Enum (70, _("Data Entry")),
111  CONTINUOUS_7 = Enum (71, _("Volume")),
112  CONTINUOUS_8 = Enum (72, _("Balance")),
113  CONTINUOUS_9 = Enum (73, _("Continuous 9")),
114  CONTINUOUS_10 = Enum (74, _("Panorama")),
115  CONTINUOUS_11 = Enum (75, _("Expression")),
116  CONTINUOUS_12 = Enum (76, _("Effect Control 1")),
117  CONTINUOUS_13 = Enum (77, _("Effect Control 2")),
118  CONTINUOUS_14 = Enum (78, _("Continuous 14")),
119  CONTINUOUS_15 = Enum (79, _("Continuous 15")),
120  CONTINUOUS_16 = Enum (80, _("General Purpose Controller 1")),
121  CONTINUOUS_17 = Enum (81, _("General Purpose Controller 2")),
122  CONTINUOUS_18 = Enum (82, _("General Purpose Controller 3")),
123  CONTINUOUS_19 = Enum (83, _("General Purpose Controller 4")),
124  CONTINUOUS_20 = Enum (84, _("Continuous 20")),
125  CONTINUOUS_21 = Enum (85, _("Continuous 21")),
126  CONTINUOUS_22 = Enum (86, _("Continuous 22")),
127  CONTINUOUS_23 = Enum (87, _("Continuous 23")),
128  CONTINUOUS_24 = Enum (88, _("Continuous 24")),
129  CONTINUOUS_25 = Enum (89, _("Continuous 25")),
130  CONTINUOUS_26 = Enum (90, _("Continuous 26")),
131  CONTINUOUS_27 = Enum (91, _("Continuous 27")),
132  CONTINUOUS_28 = Enum (92, _("Continuous 28")),
133  CONTINUOUS_29 = Enum (93, _("Continuous 29")),
134  CONTINUOUS_30 = Enum (94, _("Continuous 30")),
135  CONTINUOUS_31 = Enum (95, _("Continuous 31")),
136  // 14bit, special case signals
137  CONSTANT_HIGH = Enum (96, _("Constant HIGH")),
138  CONSTANT_CENTER = Enum (97, _("Constant CENTER")),
139  CONSTANT_LOW = Enum (98, _("Constant LOW")),
140  CONSTANT_NEGATIVE_CENTER = Enum (99, _("Constant Negative CENTER")),
141  CONSTANT_NEGATIVE_HIGH = Enum (100, _("Constant Negative HIGH")),
142  PARAMETER = Enum (101, _("Registered Parameter")),
143  NON_PARAMETER = Enum (102, _("Non-Registered Parameter")),
144  // 7bit, literal channel controls, MSB values
145  CONTROL_0 = Enum (128, _("Control 0 Bank Select MSB")),
146  CONTROL_1 = Enum (129, _("Control 1 Modulation Depth MSB")),
147  CONTROL_2 = Enum (130, _("Control 2 Breath Control MSB")),
148  CONTROL_3 = Enum (131, _("control-3")),
149  CONTROL_4 = Enum (132, _("Control 4 Foot Controller MSB")),
150  CONTROL_5 = Enum (133, _("Control 5 Portamento Time MSB")),
151  CONTROL_6 = Enum (134, _("Control 6 Data Entry MSB")),
152  CONTROL_7 = Enum (135, _("Control 7 Volume MSB")),
153  CONTROL_8 = Enum (136, _("Control 8 Balance MSB")),
154  CONTROL_9 = Enum (137, _("control-9")),
155  CONTROL_10 = Enum (138, _("Control 10 Panorama MSB")),
156  CONTROL_11 = Enum (139, _("Control 11 Expression MSB")),
157  CONTROL_12 = Enum (140, _("Control 12 Effect Control 1 MSB")),
158  CONTROL_13 = Enum (141, _("Control 13 Effect Control 2 MSB")),
159  CONTROL_14 = Enum (142, _("control-14")),
160  CONTROL_15 = Enum (143, _("control-15")),
161  CONTROL_16 = Enum (144, _("Control 16 General Purpose Controller 1 MSB")),
162  CONTROL_17 = Enum (145, _("Control 17 General Purpose Controller 2 MSB")),
163  CONTROL_18 = Enum (146, _("Control 18 General Purpose Controller 3 MSB")),
164  CONTROL_19 = Enum (147, _("Control 19 General Purpose Controller 4 MSB")),
165  CONTROL_20 = Enum (148, _("control-20")),
166  CONTROL_21 = Enum (149, _("control-21")),
167  CONTROL_22 = Enum (150, _("control-22")),
168  CONTROL_23 = Enum (151, _("control-23")),
169  CONTROL_24 = Enum (152, _("control-24")),
170  CONTROL_25 = Enum (153, _("control-25")),
171  CONTROL_26 = Enum (154, _("control-26")),
172  CONTROL_27 = Enum (155, _("control-27")),
173  CONTROL_28 = Enum (156, _("control-28")),
174  CONTROL_29 = Enum (157, _("control-29")),
175  CONTROL_30 = Enum (158, _("control-30")),
176  CONTROL_31 = Enum (159, _("control-31")),
177  // 7bit, literal channel controls, LSB values
178  CONTROL_32 = Enum (160, _("Control 32 Bank Select LSB")),
179  CONTROL_33 = Enum (161, _("Control 33 Modulation Depth LSB")),
180  CONTROL_34 = Enum (162, _("Control 34 Breath Control LSB")),
181  CONTROL_35 = Enum (163, _("control-35")),
182  CONTROL_36 = Enum (164, _("Control 36 Foot Controller LSB")),
183  CONTROL_37 = Enum (165, _("Control 37 Portamento Time LSB")),
184  CONTROL_38 = Enum (166, _("Control 38 Data Entry LSB")),
185  CONTROL_39 = Enum (167, _("Control 39 Volume LSB")),
186  CONTROL_40 = Enum (168, _("Control 40 Balance LSB")),
187  CONTROL_41 = Enum (169, _("control-41")),
188  CONTROL_42 = Enum (170, _("Control 42 Panorama LSB")),
189  CONTROL_43 = Enum (171, _("Control 43 Expression LSB")),
190  CONTROL_44 = Enum (172, _("Control 44 Effect Control 1 LSB")),
191  CONTROL_45 = Enum (173, _("Control 45 Effect Control 2 LSB")),
192  CONTROL_46 = Enum (174, _("control-46")),
193  CONTROL_47 = Enum (175, _("control-47")),
194  CONTROL_48 = Enum (176, _("Control 48 General Purpose Controller 1 LSB")),
195  CONTROL_49 = Enum (177, _("Control 49 General Purpose Controller 2 LSB")),
196  CONTROL_50 = Enum (178, _("Control 50 General Purpose Controller 3 LSB")),
197  CONTROL_51 = Enum (179, _("Control 51 General Purpose Controller 4 LSB")),
198  CONTROL_52 = Enum (180, _("control-52")),
199  CONTROL_53 = Enum (181, _("control-53")),
200  CONTROL_54 = Enum (182, _("control-54")),
201  CONTROL_55 = Enum (183, _("control-55")),
202  CONTROL_56 = Enum (184, _("control-56")),
203  CONTROL_57 = Enum (185, _("control-57")),
204  CONTROL_58 = Enum (186, _("control-58")),
205  CONTROL_59 = Enum (187, _("control-59")),
206  CONTROL_60 = Enum (188, _("control-60")),
207  CONTROL_61 = Enum (189, _("control-61")),
208  CONTROL_62 = Enum (190, _("control-62")),
209  CONTROL_63 = Enum (191, _("control-63")),
210  // 7bit, literal channel controls
211  CONTROL_64 = Enum (192, _("Control 64 Damper Pedal Switch (Sustain)")),
212  CONTROL_65 = Enum (193, _("Control 65 Portamento Switch")),
213  CONTROL_66 = Enum (194, _("Control 66 Sustenuto Switch")),
214  CONTROL_67 = Enum (195, _("Control 67 Soft Switch")),
215  CONTROL_68 = Enum (196, _("Control 68 Legato Pedal Switch")),
216  CONTROL_69 = Enum (197, _("Control 69 Hold Pedal Switch")),
217  CONTROL_70 = Enum (198, _("Control 70 Sound Variation")),
218  CONTROL_71 = Enum (199, _("Control 71 Filter Resonance (Timbre)")),
219  CONTROL_72 = Enum (200, _("Control 72 Sound Release Time")),
220  CONTROL_73 = Enum (201, _("Control 73 Sound Attack Time")),
221  CONTROL_74 = Enum (202, _("Control 74 Sound Brightness")),
222  CONTROL_75 = Enum (203, _("Control 75 Sound Decay Time")),
223  CONTROL_76 = Enum (204, _("Control 76 Vibrato Rate")),
224  CONTROL_77 = Enum (205, _("Control 77 Vibrato Depth")),
225  CONTROL_78 = Enum (206, _("Control 78 Vibrato Delay")),
226  CONTROL_79 = Enum (207, _("Control 79 Sound Control 10")),
227  CONTROL_80 = Enum (208, _("Control 80 General Purpose Switch 5")),
228  CONTROL_81 = Enum (209, _("Control 81 General Purpose Switch 6")),
229  CONTROL_82 = Enum (210, _("Control 82 General Purpose Switch 7")),
230  CONTROL_83 = Enum (211, _("Control 83 General Purpose Switch 8")),
231  CONTROL_84 = Enum (212, _("Control 84 Portamento Control (Note)")),
232  CONTROL_85 = Enum (213, _("control-85")),
233  CONTROL_86 = Enum (214, _("control-86")),
234  CONTROL_87 = Enum (215, _("control-87")),
235  CONTROL_88 = Enum (216, _("control-88")),
236  CONTROL_89 = Enum (217, _("control-89")),
237  CONTROL_90 = Enum (218, _("control-90")),
238  CONTROL_91 = Enum (219, _("Control 91 Reverb Depth")),
239  CONTROL_92 = Enum (220, _("Control 92 Tremolo Depth")),
240  CONTROL_93 = Enum (221, _("Control 93 Chorus Depth")),
241  CONTROL_94 = Enum (222, _("Control 93 Detune Depth")),
242  CONTROL_95 = Enum (223, _("Control 95 Phase Depth")),
243  CONTROL_96 = Enum (224, _("Control 96 Data Increment Trigger")),
244  CONTROL_97 = Enum (225, _("Control 97 Data Decrement Trigger")),
245  CONTROL_98 = Enum (226, _("Control 98 Non-Registered Parameter MSB")),
246  CONTROL_99 = Enum (227, _("Control 99 Non-Registered Parameter LSB")),
247  CONTROL_100 = Enum (228, _("Control 100 Registered Parameter MSB")),
248  CONTROL_101 = Enum (229, _("Control 101 Registered Parameter LSB")),
249  CONTROL_102 = Enum (230, _("control-102")),
250  CONTROL_103 = Enum (231, _("control-103")),
251  CONTROL_104 = Enum (232, _("control-104")),
252  CONTROL_105 = Enum (233, _("control-105")),
253  CONTROL_106 = Enum (234, _("control-106")),
254  CONTROL_107 = Enum (235, _("control-107")),
255  CONTROL_108 = Enum (236, _("control-108")),
256  CONTROL_109 = Enum (237, _("control-109")),
257  CONTROL_110 = Enum (238, _("control-110")),
258  CONTROL_111 = Enum (239, _("control-111")),
259  CONTROL_112 = Enum (240, _("control-112")),
260  CONTROL_113 = Enum (241, _("control-113")),
261  CONTROL_114 = Enum (242, _("control-114")),
262  CONTROL_115 = Enum (243, _("control-115")),
263  CONTROL_116 = Enum (244, _("control-116")),
264  CONTROL_117 = Enum (245, _("control-117")),
265  CONTROL_118 = Enum (246, _("control-118")),
266  CONTROL_119 = Enum (247, _("control-119")),
267  CONTROL_120 = Enum (248, _("Control 120 All Sound Off ITrigger")),
268  CONTROL_121 = Enum (249, _("Control 121 All Controllers Off ITrigger")),
269  CONTROL_122 = Enum (250, _("Control 122 Local Control Switch")),
270  CONTROL_123 = Enum (251, _("Control 123 All Notes Off ITrigger")),
271  CONTROL_124 = Enum (252, _("Control 124 Omni Mode Off ITrigger")),
272  CONTROL_125 = Enum (253, _("Control 125 Omni Mode On ITrigger")),
273  CONTROL_126 = Enum (254, _("Control 126 Monophonic Voices Mode")),
274  CONTROL_127 = Enum (255, _("Control 127 Polyphonic Mode On ITrigger")),
275 };
276 
277 // For musical tunings, see: http://en.wikipedia.org/wiki/Musical_tuning
278 enum MusicalTuning {
279  // Equal Temperament: http://en.wikipedia.org/wiki/Equal_temperament
280  OD_12_TET = Enum (1, _("12 Tone Equal Temperament"), // http://en.wikipedia.org/wiki/Equal_temperament
281  _("The most common tuning system for modern Western music, "
282  "is the twelve-tone equal temperament, abbreviated as 12-TET, "
283  "which divides the octave into 12 equal parts.")),
284  OD_7_TET = Enum (_("7 Tone Equal Temperament"), // http://en.wikipedia.org/wiki/Equal_temperament
285  _("A fairly common tuning system is the seven-tone equal temperament tuning system, "
286  "abbreviated as 7-TET. It divides the octave into 7 equal parts using 171 cent steps.")),
287  OD_5_TET = Enum (_("5 Tone Equal Temperament"), // http://en.wikipedia.org/wiki/Equal_temperament
288  _("A fairly common tuning system is the five-tone equal temperament tuning system, "
289  "abbreviated as 5-TET. It divides the octave into 5 equal parts using 240 cent steps.")),
290  // Rational Intonation: http://en.wikipedia.org/wiki/Just_intonation
291  DIATONIC_SCALE = Enum (_("Diatonic Scale"), // http://en.wikipedia.org/wiki/Diatonic_scale
292  _("In music theory, a diatonic scale (also: heptatonia prima) is a seven-note "
293  "musical scale comprising five whole-tone and two half-tone steps. "
294  "The half tones are maximally separated, so between two half-tone steps "
295  "there are either two or three whole tones, repeating per octave.")), // Werckmeister I
296  INDIAN_SCALE = Enum (_("Indian Scale"), // http://en.wikipedia.org/wiki/Just_intonation#Indian_scales
297  _("Diatonic scale used in Indian music with wolf interval at Dha, close to 3/2")),
298  PYTHAGOREAN_TUNING = Enum (_("Pythagorean Tuning"), // http://en.wikipedia.org/wiki/Pythagorean_tuning
299  _("Pythagorean tuning is the oldest way of tuning the 12-note chromatic scale, "
300  "in which the frequency relationships of all intervals are based on the ratio 3:2. "
301  "Its discovery is generally credited to Pythagoras.")),
302  PENTATONIC_5_LIMIT = Enum (_("Pentatonic 5-limit"), // http://en.wikipedia.org/wiki/Pentatonic_scale
303  _("Pentatonic scales are used in modern jazz and pop/rock contexts "
304  "because they work exceedingly well over several chords diatonic "
305  "to the same key, often better than the parent scale.")),
306  PENTATONIC_BLUES = Enum (_("Pentatonic Blues"), // http://en.wikipedia.org/wiki/Pentatonic_scale
307  _("The blues scale is the minor pentatonic with an additional augmented fourth, "
308  "which is referred to as the \"blues note\".")),
309  PENTATONIC_GOGO = Enum (_("Pentatonic Gogo"), // http://en.wikipedia.org/wiki/Pentatonic_scale
310  _("The Pentatonic Gogo scale is an anhemitonic pentatonic scale used to tune the "
311  "instruments of the Gogo people of Tanzania.")),
312  // Meantone Temperament: http://en.wikipedia.org/wiki/Meantone_temperament
313  QUARTER_COMMA_MEANTONE = Enum (_("Quarter-Comma Meantone"), // http://en.wikipedia.org/wiki/Quarter-comma_meantone
314  _("Quarter-comma meantone was the most common meantone temperament in the "
315  "sixteenth and seventeenth centuries and sometimes used later.")), // Werckmeister II
316  SILBERMANN_SORGE = Enum (_("Silbermann-Sorge Temperament"), // http://de.wikipedia.org/wiki/Silbermann-Sorge-Temperatur
317  _("The Silbermann-Sorge temperament is a meantone temperament used for "
318  "Baroque era organs by Gottfried Silbermann.")),
319  // Well Temperament: http://en.wikipedia.org/wiki/Well_temperament
320  WERCKMEISTER_3 = Enum (_("Werckmeister III"), // http://en.wikipedia.org/wiki/Werckmeister_temperament
321  _("This tuning uses mostly pure (perfect) fifths, as in Pythagorean tuning, but each "
322  "of the fifths C-G, G-D, D-A and B-F# is made smaller, i.e. tempered by 1/4 comma. "
323  "Werckmeister designated this tuning as particularly suited for playing chromatic music.")),
324  WERCKMEISTER_4 = Enum (_("Werckmeister IV"), // http://en.wikipedia.org/wiki/Werckmeister_temperament
325  _("In this tuning the fifths C-G, D-A, E-B, F#-C#, and Bb-F are tempered narrow by 1/3 comma, "
326  "and the fifths G#-D# and Eb-Bb are widened by 1/3 comma. The other fifths are pure. "
327  "Most of its intervals are close to sixth-comma meantone. "
328  "Werckmeister designed this tuning for playing mainly diatonic music.")),
329  WERCKMEISTER_5 = Enum (_("Werckmeister V"), // http://en.wikipedia.org/wiki/Werckmeister_temperament
330  _("In this tuning the fifths D-A, A-E, F#-C#, C#-G#, and F-C are narrowed by 1/4 comma, "
331  "and the fifth G#-D# is widened by 1/4 comma. The other fifths are pure. "
332  "This temperament is closer to equal temperament than Werckmeister III or IV.")),
333  WERCKMEISTER_6 = Enum (_("Werckmeister VI"), // http://en.wikipedia.org/wiki/Werckmeister_temperament
334  _("This tuning is also known as Septenarius tuning is based on a division of the monochord "
335  "length into 196 = 7 * 7 * 4 parts. "
336  "The resulting scale has rational frequency relationships, but in practice involves pure "
337  "and impure sounding fifths. "
338  "Werckmeister described the Septenarius as a \"temperament which has nothing at all to do "
339  "with the divisions of the comma, nevertheless in practice so correct that one can be really "
340  "satisfied with it\".")),
341  KIRNBERGER_3 = Enum (_("Kirnberger III"), // http://en.wikipedia.org/wiki/Johann_Philipp_Kirnberger_temperament
342  _("Kirnberger's method of compensating for and closing the circle of fifths is to split the \"wolf\" "
343  "interval known to those who have used meantone temperaments between four fifths instead, "
344  "allowing for four 1/4-comma wolves to take their place. "
345  "1/4-comma wolves are used extensively in meantone and are much easier to tune and to listen to. "
346  "Therefore, only one third remains pure (between C and E).")),
347  YOUNG = Enum (_("Young Temperament"), // http://en.wikipedia.org/wiki/Young_temperament
348  _("Thomas Young devised a form of musical tuning to make the harmony most perfect in those keys which "
349  "are the most frequently used (give better major thirds in those keys), but to not have any unplayable keys. "
350  "This is attempted by tuning upwards from C a sequence of six pure fourths, "
351  "as well as six equally imperfect fifths.")),
352 };
353 
354 // == Bse Constants ==
355 Const MIN_NOTE = 0;
356 Const MAX_NOTE = 131; // 123
357 Const NOTE_VOID = MAX_NOTE + 1;
358 Const KAMMER_NOTE = 69;
359 Const KAMMER_FREQ = 440.0;
360 Const KAMMER_OCTAVE = +1;
361 Const MIN_OCTAVE = -4;
362 Const MAX_OCTAVE = +6;
363 Const MIN_FINE_TUNE = -100;
364 Const MAX_FINE_TUNE = 100;
365 Const MIN_BPM = 1;
366 Const MAX_BPM = 1024;
367 Const MIN_TRANSPOSE = -72;
368 Const MAX_TRANSPOSE = +72;
369 Const GUI = "r:w:G";
370 Const STORAGE = "r:w:S";
371 Const STANDARD = STORAGE ":G";
372 Const NOTEHINTS = STANDARD ":note";
373 Const FINETUNEHINTS = STANDARD ":finetune";
374 Const VELOCITYHINTS = STANDARD ":velocity";
375 
377 sequence StringSeq {
378  String string;
379 };
380 
382 sequence PixelSeq {
383  int32 argb = Num ("ARGB", "ARGB Format: (alpha << 24) | (red << 16) | (green << 8) | blue", STANDARD);
384 };
385 
387 record Icon {
388  int32 width = Range ("Width", "Width in pixels or 0 for no icon", STANDARD, 0, 4096, 1, 0);
389  int32 height = Range ("Height", "Height in pixels or 0 for no icon", STANDARD, 0, 4096, 1, 0);
390  PixelSeq pixels = Sequence ("Pixels", "Array of width*height ARGB pixels", STANDARD);
391 };
392 
394 record AuxData {
397 };
398 
400 sequence AuxDataSeq {
401  AuxData aux_data;
402 };
403 
405 interface TestObject {
406  int32 echo_test (String msg);
407  signal void echo_reply (String msg);
408 };
409 
411  ERROR = 1,
415 };
416 
418 record UserMessage {
425 };
426 
428 record SongTiming {
429  int32 tick = Range ("Current tick", "Song position timing applies to", STANDARD, 0, MAXINT31, 384, 0);
430  float64 bpm = Range ("BPM", "Beats per minute", STANDARD, MIN_BPM, MAX_BPM, 10, 120);
431  // Signature
432  int32 numerator = Range ("Numerator", "Number of notes per measure", STANDARD, 1, 256, 2, 4);
433  int32 denominator = Range ("Denominator", "Type of notes counted per measure", STANDARD, 1, 256, 2, 4);
434  // Sequencer Timing
435  int32 tpqn = Range ("TPQN", "Ticks per quarter note", STANDARD, 1, MAXINT31, 12, 384);
436  int32 tpt = Range ("TPT", "Ticks per tact", STANDARD, 1, MAXINT31, 12, 384);
437  // Playback Timing
438  float64 stamp_ticks = Range ("Tick Increment", "Ticks per stamp increment (useful only during playback)", STANDARD, 1, MAXINT31, 12, 384);
439 };
440 
443 {
444  MusicalTuning musical_tuning;
445  int32 note = Range ("Note", "", ":readwrite:note");
446  int32 octave = Range ("Octave", "", ":readwrite:octave");
447  float64 freq = Range ("Frequency", "", ":readwrite:freq");
448  int32 finetune = Range ("Finetune", "", ":readwrite:finetune", -100, +100, 10, 0);
449  int32 semitone = Range ("Semitone", "", ":readwrite", 0, 11, 1, 0);
450  bool upshift = Bool ("Upshift", "Flag set for notes that correspond to a black piano key");
451  int32 letter = Range ("Letter", "International abbreviation letter for this note", ":readwrite", 32, 126, 1, 64);
452  String name = String ("Name", "", ":readwrite");
453 };
454 
455 // Forward declarations.
456 record PartLink;
457 sequence PartLinkSeq;
458 record TrackPart;
459 sequence TrackPartSeq;
460 
462 interface Object {
463  String debug_name ();
464  int64 proxy_id ();
465  signal void changed (String what);
466 };
467 
469 interface Item : Object {
470  Icon icon = Record ("Icon", "State dependent icon representation of this item", "r:G");
471  Item common_ancestor (Item other);
472 
473  // bool check_is_a (String type_name); ///< Check whether an item has a certain type.
474  // void clear_undo (); ///< Call the clear-undo function of the project corresponding to this item if any.
475  // bool editable_property (String property_name); ///< Test whether a property is editable according to object state and property options.
476  // String get_name (); ///< Retrieve an item's name.
477  // String get_name_or_type (); ///< Retrieve an item's name or type if it has no name.
478  // Item get_parent (); ///< Retrieve an item's parent.
479  // Item get_project (); ///< Retrieve an item's project.
480  // PropertyCandidates get_property_candidates (String property_name); ///< Retrieve tentative values for an item or item sequence property.
481  // int32 get_seqid (); ///< Retrieve an item's sequential ID. The sequential ID depends on the item's type an it's position inbetween siblings of the same type within it's immediate container.
482  // String get_type (); ///< Retrieve an item's type name.
483  // String get_type_authors (); ///< Retrieve authors of an item's type implementation.
484  // String get_type_blurb (); ///< Retrieve an item's type description.
485  // String get_type_license (); ///< Retrieve the license for an item's type implementation.
486  // String get_type_name (); ///< Retrieve an item's type name.
487  // String get_uname_path (); ///< Retrieve the project relative uname path for this item.
488  // void group_undo (String name); ///< Request multiple modifying actions on an item to be grouped together as single undo operation.
489  // bool internal (); ///< Check whether an item is internal, i.e. owned by another non-internal item.
490  // void redo (); ///< Call the redo function of the project corresponding to this item if any.
491  // void set_name (String name); ///< Set an item's name.
492  // void undo (); ///< Call the undo function of the project corresponding to this item if any.
493  // void ungroup_undo (); ///< Ends the undo grouping opened up by a previous group-undo() call.
494  // void unuse (); ///< Decrement use count for when an item is not needed anymore.
495  // Item use (); ///< Increment use count to keep an item alive.
496  // int32 seqid = Range ("Sequential ID", "", ":readwrite", 0, MAXINT31, 1);
497 };
498 
500 record PartNote
501 {
502  int32 id = Num ("ID", "", 0, ":readwrite");
503  int32 channel = Range ("Channel", "", ":readwrite", 0, MAXINT31, 1);
504  int32 tick = Range ("Tick", "", ":readwrite", 0, MAXINT31, 1);
505  int32 duration = Range ("Duration", "Duration in number of ticks", ":readwrite", 0, MAXINT31, 1);
506  int32 note = Range ("Note", "", NOTEHINTS, MIN_NOTE, MAX_NOTE, 12, KAMMER_NOTE);
507  int32 fine_tune = Range ("Fine Tune", "", FINETUNEHINTS, MIN_FINE_TUNE, MAX_FINE_TUNE, 1);
508  float64 velocity = Range ("Velocity", "", VELOCITYHINTS, 0, 1.0, 0.1, 1);
509  bool selected = Bool ("Selected", "", ":readwrite", false);
510 };
511 
513 sequence PartNoteSeq {
514  PartNote part_notes;
515 };
516 
518 record PartControl {
519  int32 id = Num ("ID", "", ":readwrite");
520  int32 tick = Range ("Tick", "", ":readwrite", 0, MAXINT31, 1);
521  MidiSignal control_type;
522  float64 value = Range ("Value", "", ":readwrite", -1, +1, 0.1);
523  bool selected = Bool ("Selected", "", ":readwrite");
524 };
525 
527 sequence PartControlSeq {
528  PartControl pcontrols;
529 };
530 
532 interface Part : Item {
533  PartControlSeq list_selected_controls (MidiSignal control_type);
534  PartControlSeq list_controls (int32 tick, int32 duration, MidiSignal control_type);
535  PartControlSeq get_channel_controls (int32 channel, int32 tick, int32 duration, MidiSignal control_type);
536  PartControlSeq get_controls (int32 tick, MidiSignal control_type);
537  SongTiming get_timing (int32 tick);
538  int32 get_max_note ();
539  int32 get_min_note ();
540  Error change_control (int32 id, int32 tick, MidiSignal control_type, float64 value);
541  Error change_note (int32 id, int32 tick, int32 duration, int32 note, int32 fine_tune, float64 velocity);
542  Error delete_event (int32 id);
543  int32 insert_control (int32 tick, MidiSignal control_type, float64 value);
544  int32 insert_note (int32 channel, int32 tick, int32 duration, int32 note, int32 fine_tune, float64 velocity);
545  int32 insert_note_auto (int32 tick, int32 duration, int32 note, int32 fine_tune, float64 velocity);
546  bool is_event_selected (int32 id);
547  void queue_controls (int32 tick, int32 duration);
548  void queue_notes (int32 tick, int32 duration, int32 min_note, int32 max_note);
549  void select_notes_exclusive (int32 tick, int32 duration, int32 min_note, int32 max_note);
550  void select_controls_exclusive (int32 tick, int32 duration, MidiSignal control_type);
551  void select_notes (int32 tick, int32 duration, int32 min_note, int32 max_note);
552  void select_event (int32 id);
553  void select_controls (int32 tick, int32 duration, MidiSignal control_type);
554  void deselect_notes (int32 tick, int32 duration, int32 min_note, int32 max_note);
555  void deselect_event (int32 id);
556  void deselect_controls (int32 tick, int32 duration, MidiSignal control_type);
557  PartNoteSeq list_notes_crossing (int32 tick, int32 duration);
558  PartNoteSeq list_notes_within (int32 channel, int32 tick, int32 duration);
560  PartNoteSeq check_overlap (int32 tick, int32 duration, int32 note);
561  PartNoteSeq get_notes (int32 tick, int32 note);
562  PartLinkSeq list_links ();
563 
564  // signal void range_changed (int32 a, int32 b, int32 c, int32 d);
565  // signal void links_changed ();
566  // property int32 n_channels;
567  // property int32 last_tick;
568 };
569 
571 sequence PartSeq {
572  Part part;
573 };
574 
576 interface Source : Item {
577  Source ichannel_get_osource (int32 input_channel, int32 input_joint);
578 
579  // void clear_inputs (); ///< Disconnect all module inputs.
580  // void clear_outputs (); ///< Disconnect all module outputs.
581  // int32 get_automation_channel (String property_name); ///< Get MIDI channel from an automation property.
582  // MidiControlType get_automation_control (String property_name); ///< Get control type from an automation property.
583  // bool has_output (int32 ochannel); ///< Check whether a module's output channel is connected.
584  // bool has_outputs (); ///< Check whether a module has output channel connections.
585  // String ichannel_blurb (int32 input_channel); ///< Get input channel description.
586  // int32 ichannel_get_n_joints (int32 input_channel); ///< Retrieve the number of inputs connected to an input channel.
587  // int32 ichannel_get_ochannel (int32 input_channel, int32 input_joint); ///< Retrieve output channel of the module connected to a specific joint of an input channel.
588  // String ichannel_ident (int32 input_channel); ///< Get canonical input channel name.
589  // String ichannel_label (int32 input_channel); ///< Get input channel name.
590  // bool is_joint_ichannel (String input_channel); ///< Check if an input channel is a joint (multi-connect) channel.
591  // bool is_joint_ichannel_by_id (int32 input_channel); ///< Check if an input channel is a joint (multi-connect) channel.
592  // bool is_prepared (); ///< Check whether a source is prepared for synthesis processing.
593  // int32 n_ichannels (); ///< Get the number of input channels of a module.
594  // int32 n_ochannels (); ///< Get the number of output channels of a module.
595  // String ochannel_blurb (int32 output_channel); ///< Get output channel description.
596  // String ochannel_ident (int32 output_channel); ///< Get canonical output channel name.
597  // String ochannel_label (int32 output_channel); ///< Get output channel name.
598  // Error set_automation (String property_name, int32 midi_channel, MidiControlType control_type); ///< Setup automation parameters for a property.
599  // Error set_input (String input_channel, Source omodule, String output_channel); ///< Connect a module input to another module's output.
600  // Error set_input_by_id (int32 input_channel, Source omodule, int32 output_channel); ///< Connect a module input to another module's output.
601  // void set_pos (float64 x_pos, float64 y_pos); ///< Set the x and y position of a module. In contrast to setting the position through ordinary object property setters, this function will not update the module position if the passed in arguments are sufficiently equal to the values already set on the object. As such, it does not record an extra undo step for setting properties to values they already have and if necessary turns setting of x and y positions into an atomic undo operation.
602  // Error unset_input (String input_channel, Source omodule, String output_channel); ///< Disconnect a module input.
603  // Error unset_input_by_id (int32 input_channel, Source omodule, int32 output_channel); ///< Disconnect a module input.
604  // signal void probes (ProbeSeq a);
605  // signal void io_changed ();
606  // float64 pos_x = Range ("Position X", "", STANDARD ":scale");
607  // float64 pos_y = Range ("Position Y", "", STANDARD ":scale");
608 };
609 
611 interface ContextMerger : Source {
612 };
613 
615 interface Container : Source {
617 };
618 
620 interface Super : Container {
621 };
622 
624 interface SNet : Super {
625  bool supports_user_synths ();
626  Error can_create_source (String module_type);
627  Source create_source (String module_type);
628  Error remove_source (Source module);
629  signal void port_unregistered ();
630  group _("Playback Settings") {
631  bool auto_activate = Bool (_("Auto Activate"),
632  _("Automatic activation only needs to be enabled for synthesis networks that don't "
633  "use virtual ports for their input and output"),
634  STANDARD, true);
635  };
636 };
637 
639 interface CSynth : SNet {
640 };
641 
643 interface SubSynth : Source {
644  // CSynth snet = Object ("Synthesizer", "Synthesis network to use as embedded sub network", STANDARD ":unprepared");
645  // String in_port_1 = String ("Input Port 1", "Output port name to interface from", STANDARD ":skip-default");
646  // String out_port_1 = String ("Output Port 1", "Input port name to interface to", STANDARD ":skip-default");
647  // String in_port_2 = String ("Input Port 2", "Output port name to interface from", STANDARD ":skip-default");
648  // String out_port_2 = String ("Output Port 2", "Input port name to interface to", STANDARD ":skip-default");
649  // String in_port_3 = String ("Input Port 3", "Output port name to interface from", STANDARD ":skip-default");
650  // String out_port_3 = String ("Output Port 3", "Input port name to interface to", STANDARD ":skip-default");
651  // String in_port_4 = String ("Input Port 4", "Output port name to interface from", STANDARD ":skip-default");
652  // String out_port_4 = String ("Output Port 4", "Input port name to interface to", STANDARD ":skip-default");
653  // String in_port_5 = String ("Input Port 5", "Output port name to interface from", STANDARD ":skip-default");
654  // String out_port_5 = String ("Output Port 5", "Input port name to interface to", STANDARD ":skip-default");
655  // String in_port_6 = String ("Input Port 6", "Output port name to interface from", STANDARD ":skip-default");
656  // String out_port_6 = String ("Output Port 6", "Input port name to interface to", STANDARD ":skip-default");
657  // String in_port_7 = String ("Input Port 7", "Output port name to interface from", STANDARD ":skip-default");
658  // String out_port_7 = String ("Output Port 7", "Input port name to interface to", STANDARD ":skip-default");
659  // String in_port_8 = String ("Input Port 8", "Output port name to interface from", STANDARD ":skip-default");
660  // String out_port_8 = String ("Output Port 8", "Input port name to interface to", STANDARD ":skip-default");
661 };
662 
664 interface Track : ContextMerger {
665  SongTiming get_timing (int32 tick);
666  int32 insert_part (int32 tick, Part part);
667  void remove_tick (int32 tick);
668  void remove_link (int32 id);
669 
671  TrackPartSeq list_parts ();
672  Part get_part (int32 tick);
673  int32 get_last_tick ();
674  Error ensure_output ();
678 
679  // property bool muted; ///< _("Mute this track by ignoring it in the sequencer.")
680  // property CSynth snet; ///< _("Synthesis network to be used as instrument.")
681  // property Wave wave; ///< _("Wave to be used as instrument.")
682  // property int32 midi_channel; ///< _("Midi channel assigned to this track, 0 uses internal per-track channel.")
683  // property int32 n_voices; ///< _("Maximum number of voices for simultaneous playback.")
684  // property CSynth pnet; ///< _("Synthesis network to be used as postprocessor.")
685  // property ItemSeq outputs; ///< _("Mixer busses used as output for this track.")
686 };
687 
689 record PartLink {
690  Track track;
691  int32 tick = Range ("Tick", "", STANDARD, 0, MAXINT31, 384);
692  Part part;
693  int32 duration = Range ("Duration", "", STANDARD, 0, MAXINT31, 384);
694  // int32 count; // 1 + repetitions
695 };
696 
698 sequence PartLinkSeq {
699  PartLink plinks;
700 };
701 
703 record TrackPart {
704  int32 tick = Range ("Tick", "", STANDARD, 0, MAXINT31, 384);
705  Part part;
706  int32 duration = Range ("Duration", "", STANDARD, 0, MAXINT31, 384);
707 };
708 
710 sequence TrackPartSeq {
711  TrackPart parts;
712 };
713 
715 interface Bus : SubSynth {
716  Error ensure_output ();
717  Error connect_bus (Bus bus);
718  Error connect_track (Track track);
719  Error disconnect_bus (Bus bus);
720  Error disconnect_track (Track track);
721  // ItemSeq inputs = Object ("Input Signals", "Synthesis signals (from tracks and busses) used as bus input", GUI ":item-sequence");
722  // ItemSeq outputs = Object ("Output Signals", "Mixer busses used as output for synthesis signals", GUI ":item-sequence");
723  // CSynth snet = Object ("SNet", "Synthesis network used internally to implement effect stack", READWRITE ":skip-undo");
724  // bool mute = Bool ("Mute", "Mute: turn off the bus volume", STANDARD ":skip-default", FALSE);
725  // bool solo = Bool ("Solo", "Solo: mute all other busses", STANDARD ":skip-default", FALSE);
726  // bool sync = Bool ("Sync", "Synchronize left and right volume", STANDARD ":skip-default", TRUE);
727  // float64 left_volume = Num ("Left Volume", "Volume adjustment in decibel of left bus channel", STANDARD ":scale:db-volume");
728  // float64 right_volume = Num ("Right Volume", "Volume adjustment in decibel of right bus channel", STANDARD ":scale:db-volume");
729  // bool master_output = Bool ("Master Output", "", STORAGE ":skip-default", FALSE);
730 };
731 
733 interface Song : SNet {
734  SongTiming get_timing (int32 tick);
736  Bus create_bus ();
737  void remove_bus (Bus bus);
738  Part create_part ();
739  void remove_part (Part part);
740  Track create_track ();
741  void remove_track (Track track);
742  // Bus ensure_master_bus (); ///< Retrieve master output bus of a song, will create one if it doesn't exist.
743  // void ensure_track_links (); ///< Ensure that each part in a song is inserted into at least one track.
744  // Track find_track_for_part (Part part); ///< Find a track suitable for playing notes of a given part.
745  // Bus get_master_bus (); ///< Retrieve master output bus of a song if it exists.
746  // void synthesize_note (Track track, int32 duration, int32 note, int32 fine_tune, float64 velocity); ///< Synthesize a note on a song of an active project.
747  // signal void pointer_changed (int32 a);
748  // group _("Timing") {
749  // int32 tpqn = Range ("Ticks", "Number of ticks per quarter note", STANDARD, 384, 384, 0, 384);
750  // int32 numerator = Range ("Numerator", "Measure numerator", STANDARD, 1, 256, 1, 4);
751  // int32 denominator = Range ("Denominator", "Measure denominator, must be a power of 2", STANDARD, 1, 256, 1, 4);
752  // float64 bpm = Range ("BPM", "Beats per minute", STANDARD, MIN_BPM, MAX_BPM, 10, 120);
753  // };
754  // group _("MIDI Instrument") {
755  // CSynth pnet = Object ("Postprocessor", "Synthesis network to be used as postprocessor", STANDARD);
756  // };
757  // bool loop_enabled = Bool ("Loop Enabled", "", STORAGE, FALSE);
758  // int32 loop_left = Range ("Loop Left", "", STORAGE, -1, MAXINT31, 384, -1);
759  // int32 loop_right = Range ("Loop Right", "", STORAGE, -1, MAXINT31, 384, -1);
760  // int32 tick_pointer = Range ("Tick Pointer", "", STORAGE, -1, MAXINT31, 384, -1);
761  group _("Timing") {
762  float64 bpm = Range (_("BPM"), _("Beats per minute"), STANDARD ":scale", MIN_BPM, MAX_BPM, 10, 120);
763  };
764  group _("Tuning") {
765  MusicalTuning musical_tuning = Enum (_("Musical Tuning"),
766  _("The tuning system which specifies the tones or pitches to be used. "
767  "Due to the psychoacoustic properties of tones, various pitch combinations can "
768  "sound \"natural\" or \"pleasing\" when used in combination, the musical "
769  "tuning system defines the number and spacing of frequency values applied."),
770  STANDARD ":unprepared");
771  };
772 };
773 
776  String file = String ("Filename", "", STANDARD);
777  int64 size = Range ("File Size", "File size in bytes", ":readwrite", 0, MAXINT63);
778  int64 mtime = Range ("MTime", "Last modification time in µseconds", ":readwrite", 0, MAXINT63);
779  String loader = String ("Loader", "Sample loader implementation", STANDARD);
780  StringSeq waves = Sequence ("Waves", "List of embedded waves", STANDARD);
781  Error error = Enum ("Error", "Indicator for errors during sample operation", STANDARD);
782 };
783 
785 interface EditableSample : Item {
786 };
787 
789 interface Wave : Source {
790 };
791 
793 interface WaveRepo : Super {
794 };
795 
797 interface MidiNotifier : Item {
798 };
799 
801 interface MidiSynth : SNet {
802 };
803 
805 interface Project : Container {
806  void change_name (String name);
807  Error play();
808  Error activate();
809  //ProjectState get_state(); ///< Retrieve the current project activation/playback state.
810  bool can_play();
811  bool is_playing();
812  bool is_active ();
813  void start_playback();
814  void stop_playback();
815  void deactivate();
816  void stop();
817  void auto_deactivate (int32 msec_delay);
818  int32 undo_depth();
819  void undo();
820  int32 redo_depth();
821  void redo();
822  void clear_undo();
823  void clean_dirty();
824  bool is_dirty();
825  void inject_midi_control (int32 midi_channel, int32 midi_control, float64 control_value);
827  //Item find_item (String uname_path); ///< Find an item within a project, given its uname path.
828  //ItemSeq get_supers(); ///< Retrieve all Super type objects of this project.
831  //StringSeq list_uname_paths (String item_type);
833  //ItemSeq match_items_by_uname (String item_type, String uname);
839  //Error store_bse (Super super, String file_name, bool self_contained);
840  Error import_midi_file (String file_name);
841  Error restore_from_file (String file_name);
842  //Song create_song (String name); ///< Create a song for this project.
843  //WaveRepo get_wave_repo (); ///< Retrieve the project's unique wave repository.
844  //CSynth create_csynth (String name); ///< Create a synthsizer network for this project.
845  //MidiSynth create_midi_synth (String name); ///< Create a MIDI synthesizer network for this project.
846  //MidiNotifier get_midi_notifier(); ///< Retrieve the project's midi notifier object.
847  //void remove_snet (SNet snet); ///< Remove an existing synthesizer network from this project.
848 };
849 
851 interface PcmWriter : Item {
852 };
853 
858 interface Server : Object {
859  signal void user_message (UserMessage umsg);
861  Object from_proxy (int64 proxyid);
870  String get_demo_path ();
873  String get_version ();
874  void save_preferences ();
875  void register_ladspa_plugins();
876  void register_core_plugins();
877  void register_scripts();
878  bool preferences_locked();
879  int32 n_scripts();
880  bool can_load (String file_name);
881  void start_recording (String wave_file, float64 n_seconds);
882  Project create_project (String project_name);
883  void destroy_project (Project project);
885  AuxData find_module_type (String module_type);
886  Icon module_type_icon (String module_type);
888 
890  NoteDescription note_describe (MusicalTuning musical_tuning, int32 note, int32 fine_tune);
891  // Describe a note, given its frequency.
892  NoteDescription note_describe_from_freq (MusicalTuning musical_tuning, float64 freq);
894  NoteDescription note_construct (MusicalTuning musical_tuning, int32 semitone, int32 octave, int32 fine_tune);
896  NoteDescription note_from_string (MusicalTuning musical_tuning, String name);
898  int32 note_from_freq (MusicalTuning musical_tuning, float64 frequency);
900  float64 note_to_freq (MusicalTuning musical_tuning, int32 note, int32 fine_tune);
901 
902  // *** Old Janitor ***
903  // void trigger_action (String action); ///< Trigger an installed user action of this janitor.
904  // String get_script_name (); ///< Retrieve the script name of this janitor.
905  // String get_proc_name (); ///< Retrieve the procedure name of this janitor.
906  // int32 n_actions (); ///< Retrieve number of user actions of this janitor.
907  // String get_action (int32 nth_action); ///< Retrieve an action of this janitor.
908  // String get_action_name (int32 nth_action); ///< Retrieve the name of an action of this janitor.
909  // String get_action_blurb (int32 nth_action); ///< Retrieve the help string of an action of this janitor.
910  // void kill (); ///< Kill a currently running janitor.
911 };
912 
913 } // Bse
String get_version()
Retrieve BSE version.
Part get_part(int32 tick)
Get the part starting at a specific tick position.
Track create_track()
Create a new Track for a Song.
void register_core_plugins()
Register core plugins.
Const MIN_FINE_TUNE
Octave of MAX_NOTE.
Definition: bseapi.idl:363
Interface for Track and Part objects, as well as meta data for sequencing.
Definition: bseapi.idl:733
TestObject get_test_object()
Retrieve object for API, signal, etc tests.
void clear_undo()
Delete all recorded undo or redo steps.
void start_playback()
Start playback in an activated project.
Structure linking to a Track from within a Part.
Definition: bseapi.idl:703
void remove_bus(Bus bus)
Delete a mixer bus from a Song.
Interface for writing PCM wave data.
Definition: bseapi.idl:851
Item common_ancestor(Item other)
Find a common container (parent or grand-parent) of two items if any.
The Bse namespace contains all functions of the synthesis engine.
Definition: bstbseutils.cc:88
void select_notes_exclusive(int32 tick, int32 duration, int32 min_note, int32 max_note)
Select all notes within rectangle and deselect all others.
void stop_playback()
Stop project playback.
String get_sample_path()
Retrieve sample search path.
AuxDataSeq list_module_types()
A list of Source type names for create_source().
void queue_controls(int32 tick, int32 duration)
Queue updates for all control events and notes starting within the given range.
void select_controls(int32 tick, int32 duration, MidiSignal control_type)
Select all control events within range.
Error change_control(int32 id, int32 tick, MidiSignal control_type, float64 value)
Change an existing control event within a part.
String get_custom_effect_dir()
Retrieve user specific effects directory.
PartSeq list_parts_uniq()
List all parts contained in a track.
bool preferences_locked()
Returns whether the bse-preferences property is currently locked against modifications or not...
signal void port_unregistered()
Signal that notifies when a named output port is unregistered.
SongTiming get_timing(int32 tick)
Retrieve song timing information at a specific tick.
void queue_notes(int32 tick, int32 duration, int32 min_note, int32 max_note)
Queue updates for all notes starting within the given rectangle.
Const MIN_OCTAVE
Octave number for MIDI A'.
Definition: bseapi.idl:361
Error can_create_source(String module_type)
Check whether inserting a new module into a synthesis network is possible.
signal void changed(String what)
Notification for object state or property changes.
Representation of an icon pixel image.
Definition: bseapi.idl:387
Const MAX_OCTAVE
Octave of MIN_NOTE.
Definition: bseapi.idl:362
Synthesizer module for embedding (rerouting input and output) of another synthesizer network (SNet)...
Definition: bseapi.idl:643
String get_script_path()
Retrieve script search path.
A note description provides all needed details about a specific note. ".
Definition: bseapi.idl:442
bool is_playing()
Check whether a project is currently playing (song sequencing).
int32 get_last_tick()
Retrieve the last tick for this track.
Const KAMMER_FREQ
Kammer note, representing the kammer frequency's MIDI note value for A' or A4.
Definition: bseapi.idl:359
Interface serving as container for Wave objects.
Definition: bseapi.idl:793
bool supports_user_synths()
Check whether users may edit synthesis modules of this network.
Base interface type for containers of Item derived types.
Definition: bseapi.idl:615
Icon module_type_icon(String module_type)
Retrieve the icon associated with a module type.
String get_vorbis_version()
Retrieve BSE Vorbis handler version.
void remove_track(Track track)
Delete a Track from a Song.
Track find_any_track_for_part(Part part)
Find the first track that contains part, suitable to check for orphan parts.
String text3
Possibly (technical) details or machine error message.
Definition: bseapi.idl:423
int32 get_max_note()
Retrieve the maximum note supported in this part.
Definition: bsecxxutils.hh:90
Base interface type for objects that can be added to a container.
Definition: bseapi.idl:469
float64 note_to_freq(MusicalTuning musical_tuning, int32 note, int32 fine_tune)
Retrieve the frequency of a certain note.
Error ensure_output()
Ensure that a bus has an output connection.
signal void user_message(UserMessage umsg)
Notification signal for user messages from BSE.
Interface for effect stacks and per-track audio signal routing to the master output.
Definition: bseapi.idl:715
AuxData - record to describe entity attributes with "key=value" strings.
Definition: bseapi.idl:394
Source module for merging multiple synthesis contexts, used to implement polyphony.
Definition: bseapi.idl:611
void start_recording(String wave_file, float64 n_seconds)
Start recording to a WAV file.
Source create_source(String module_type)
Insert a new module into a synthesis network.
signal void echo_reply(String msg)
Signal emitted in response to echo_test().
STL class.
Base interface type for Item managers.
Definition: bseapi.idl:620
Error disconnect_bus(Bus bus)
Remove a bus from the input list of a bus.
String get_custom_instrument_dir()
Retrieve user specific instruments directory.
void register_scripts()
Register external scripts.
Data interface for containment of piano notes and MIDI effects.
Definition: bseapi.idl:532
A list of part control events.
Definition: bseapi.idl:527
Error disconnect_track(Track track)
Remove a track from the input list of a bus.
Indicate a message about an error condition.
Definition: bseapi.idl:411
Base interface type for synthesis modules with input or output streams.
Definition: bseapi.idl:576
Error play()
Activate a project and start project playback (an already playing project is first halted)...
PartControlSeq list_selected_controls(MidiSignal control_type)
List all currently selected control events of a specific type.
void deselect_controls(int32 tick, int32 duration, MidiSignal control_type)
Deselect all controls within given range.
Part create_part()
Create a new Part in a Song.
UserMessageType utype
Severity classification for this message.
Definition: bseapi.idl:419
Const KAMMER_OCTAVE
Pitch Standard, see also: https://en.wikipedia.org/wiki/A440_(pitch_standard)
Definition: bseapi.idl:360
void save_preferences()
Save the bse-preferences property to disk.
PartNoteSeq list_notes_crossing(int32 tick, int32 duration)
List all notes within or crossing a tick range.
void deselect_event(int32 id)
Deselect an existing event.
Definition: sficxx.hh:326
NoteDescription note_from_string(MusicalTuning musical_tuning, String name)
Describe a note, given its name and octave offset.
Error activate()
Activate a project, precondition to start playback.
Error restore_from_file(String file_name)
Load a project from file.
Indicate an informational message.
Definition: bseapi.idl:413
SongTiming get_timing(int32 tick)
Retrieve song timing information at a specific tick.
String title
Usually GUI window title.
Definition: bseapi.idl:420
Error import_midi_file(String file_name)
List uname paths for all items of a specified type within a project.
Customizable synthesis (filter) network container.
Definition: bseapi.idl:639
PartControlSeq list_controls(int32 tick, int32 duration, MidiSignal control_type)
List all control events within a tick range.
void remove_part(Part part)
Delete a Part from a Song.
Structure containing meta data for multi wave samples.
Definition: bseapi.idl:775
AuxData find_module_type(String module_type)
Retrieve info about a Source type names.
bool can_play()
Check whether project playback would makes sense.
void undo()
Undo a previous operation in a project.
Object to carry out IDL, API, signal, etc tests.
Definition: bseapi.idl:405
PartNoteSeq list_notes_within(int32 channel, int32 tick, int32 duration)
List all notes within a tick range.
String get_ladspa_path()
Retrieve ladspa search path.
Interface for sequencing information and links to Part objects.
Definition: bseapi.idl:664
bool is_dirty()
Check whether a project needs saving.
String text1
Primary message to the user, should be limited to 80-100 chars.
Definition: bseapi.idl:421
void destroy_project(Project project)
Destroy a previously created new project.
signal
NoteDescription note_construct(MusicalTuning musical_tuning, int32 semitone, int32 octave, int32 fine_tune)
Describe a note, given its semitone, octave and fine tune.
int32 note_from_freq(MusicalTuning musical_tuning, float64 frequency)
Retrieve the note of a certain frequency.
Part specific note event representation.
Definition: bseapi.idl:500
int32 insert_note(int32 channel, int32 tick, int32 duration, int32 note, int32 fine_tune, float64 velocity)
Insert a new note into a part.
void deselect_notes(int32 tick, int32 duration, int32 min_note, int32 max_note)
Deselect all notes within rectangle.
int32 redo_depth()
Get the number of times redo can be called on the project.
void remove_link(int32 id)
Remove a specific part link by ID from a track.
PartLinkSeq list_links()
List all places where parts are used (linked) from tracks, sorted by tick.
int32 insert_part(int32 tick, Part part)
Insert Part into Track at tick, returns the corresponding link id.
PartControlSeq get_controls(int32 tick, MidiSignal control_type)
Retrieve all control events of a specific type at specified tick.
SongTiming get_timing(int32 tick)
Retrieve song timing information at a specific tick.
PartControlSeq get_channel_controls(int32 channel, int32 tick, int32 duration, MidiSignal control_type)
Retrieve all control events of a specific type within range of a channel.
int32 get_min_note()
Retrieve the minimum note supported in this part.
void inject_midi_control(int32 midi_channel, int32 midi_control, float64 control_value)
Inject a MIDI control event into the project's MIDI receiver.
Fundamental base type for all BSE objects.
Definition: bseapi.idl:462
int64 proxy_id()
Retrieve the BseObject proxy ID for an Object.
UserMessageType
Definition: bseapi.idl:410
Indicate a debugging message (usually insignificant).
Definition: bseapi.idl:414
String get_plugin_path()
Retrieve plugin search path.
void clean_dirty()
Clear a project's dirty flags.
NoteDescription note_describe(MusicalTuning musical_tuning, int32 note, int32 fine_tune)
Describe a note, providing information about its octave, semitone, frequency, etc.
Object from_proxy(int64 proxyid)
Find an Object from its associated BseObject proxy id.
void remove_tick(int32 tick)
Remove Part at specified tick from a track.
String debug_name()
Object name useful for debugging output.
A list of part note events.
Definition: bseapi.idl:513
void select_event(int32 id)
Select an existing event.
int32 n_scripts()
Return the number of scripts currently running on this server.
String get_instrument_path()
Retrieve instrument search path.
Base interface type for all kinds of synthesis networks.
Definition: bseapi.idl:624
Indicate a message about a possibly harmful condition.
Definition: bseapi.idl:412
A list of Part or derived types.
Definition: bseapi.idl:571
bool is_active()
Check whether a project is active (currently synthesizing).
PartNoteSeq check_overlap(int32 tick, int32 duration, int32 note)
Check whether a note would overlap with neighbours.
StringSeq attributes
List of "key=value" auxillary data strings.
Definition: bseapi.idl:396
Error connect_track(Track track)
Add a track to the input list of a bus.
Part specific control event representation.
Definition: bseapi.idl:518
PartNoteSeq list_selected_notes()
List all currently selected notes.
int32 insert_control(int32 tick, MidiSignal control_type, float64 value)
Insert a new control event into a part.
Stringeq - a variable length list of test strings.
Definition: bseapi.idl:377
Main Bse remote origin object.
Definition: bseapi.idl:858
bool can_load(String file_name)
Check whether a loader can be found for a wave file.
Interface for editable PCM wave samples.
Definition: bseapi.idl:785
int32 insert_note_auto(int32 tick, int32 duration, int32 note, int32 fine_tune, float64 velocity)
Insert a new note into a part with automatic channel selection.
Interface for PCM wave samples.
Definition: bseapi.idl:789
void auto_deactivate(int32 msec_delay)
Automatically deactivate a few milliseconds after playback stopped.
Error remove_source(Source module)
Remove an existing module from its synthesis network.
void change_name(String name)
Change a project name without recording undo steps.
Song timing configuration.
Definition: bseapi.idl:428
PartNoteSeq get_notes(int32 tick, int32 note)
Retrieve all notes at a specific frequency or crossing a tick.
String get_mp3_version()
Retrieve BSE MP3 handler version.
Source ichannel_get_osource(int32 input_channel, int32 input_joint)
Retrieve output module connected to a specific joint of an input channel.
Item lookup_item(String uname)
Find an immediate child of a container by name (unique per container child).
void select_controls_exclusive(int32 tick, int32 duration, MidiSignal control_type)
Select all control events within range and deselect all others.
Bus create_bus()
Create a new mixer bus for a Song.
Error ensure_output()
Ensure the track has an output connection to a bus.
int32 echo_test(String msg)
Echo custom message to stdout.
String entity
Entity that has an auxillary data list.
Definition: bseapi.idl:395
Representation of an image pixel sequence in ARGB format.
Definition: bseapi.idl:382
Error connect_bus(Bus bus)
Add a bus to the input list of a bus.
SampleFileInfo sample_file_info(String file_name)
Load sample file info from file.
Const KAMMER_NOTE
Value represents unparsable/unknown notes.
Definition: bseapi.idl:358
void select_notes(int32 tick, int32 duration, int32 min_note, int32 max_note)
Select all notes within rectangle.
String text2
Explanatory (secondary) message no limitations recommended.
Definition: bseapi.idl:422
AuxDataSeq - a variable length list of AuxData records.
Definition: bseapi.idl:400
Error delete_event(int32 id)
Delete an existing event from a part.
void stop()
Stop project playback and deactivate project.
Project create_project(String project_name)
Create a new project (name is modified to be unique if necessary.
TrackPartSeq list_parts()
List parts scheduled in a track, sorted by tick.
Sequence of TrackPart records.
Definition: bseapi.idl:710
void redo()
Redo a previously undone operation in a project.
String label
Message class label, used to enable/disable this type of message.
Definition: bseapi.idl:424
Sequence of PartLink records.
Definition: bseapi.idl:698
Source get_output_source()
Get the output module of a track.
Structure for submission of user interface messages from BSE.
Definition: bseapi.idl:418
int32 undo_depth()
Check whether a project can perform undo steps.
String get_effect_path()
Retrieve effect search path.
Projects support loading, saving, playback and act as containers for all other sound objects...
Definition: bseapi.idl:805
bool is_event_selected(int32 id)
Check whether an event is selected.
Error change_note(int32 id, int32 tick, int32 duration, int32 note, int32 fine_tune, float64 velocity)
Change an existing note within a part.
Interface for MIDI synthesis networks.
Definition: bseapi.idl:801
void register_ladspa_plugins()
Register LADSPA (Linux Audio Developer's Simple Plugin API) plugins.
void deactivate()
Deactivate the project, automatically stop playback.
String get_demo_path()
Retrieve demo search path.
Interface for MIDI event notification.
Definition: bseapi.idl:797
uname