BEAST - Free Software Audio Synthesizer and Tracker  0.9.2
bseutils.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BSE_UTILS_H__
3 #define __BSE_UTILS_H__
4 
5 #include <rapicorn-core.hh>
6 
7 #include <bse/bseenums.hh>
8 #include <bse/bseglobals.hh>
9 #include <bse/bsecompat.hh>
10 
11 G_BEGIN_DECLS
12 
13 /* --- C++ helper declaration --- */
14 void bse_cxx_init (void);
15 /* --- record utils --- */
16 BseNoteDescription* bse_note_description (BseMusicalTuningType musical_tuning,
17  int note,
18  int fine_tune);
19 Bse::PartNote bse_part_note (uint id, uint channel, uint tick, uint duration, int note, int fine_tune, double velocity, bool selected);
20 Bse::PartControl bse_part_control (uint id, uint tick, Bse::MidiSignalType control_type, double value, bool selected);
21 void bse_note_sequence_resize (BseNoteSequence *rec,
22  guint length);
23 guint bse_note_sequence_length (BseNoteSequence *rec);
24 void bse_property_candidate_relabel (BsePropertyCandidates *pc,
25  const gchar *label,
26  const gchar *tooltip);
27 void bse_item_seq_remove (BseItemSeq *iseq,
28  BseItem *item);
29 SfiRing* bse_item_seq_to_ring (BseItemSeq *iseq);
30 BseItemSeq* bse_item_seq_from_ring (SfiRing *ring);
31 
32 
33 /* --- debugging --- */
34 void bse_debug_dump_floats (guint debug_stream,
35  guint n_channels,
36  guint mix_freq,
37  guint n_values,
38  gfloat *values);
39 
40 
41 /* --- balance calculation --- */
42 /* levels are 0..100, balance is -100..+100 */
43 double bse_balance_get (double level1,
44  double level2);
45 void bse_balance_set (double balance,
46  double *level1,
47  double *level2);
48 
49 
50 /* --- icons --- */
51 BseIcon* bse_icon_from_pixstream (const guint8 *pixstream);
52 
53 
54 /* --- ID allocator --- */
55 gulong bse_id_alloc (void);
56 void bse_id_free (gulong id);
57 
58 
59 /* --- string array manipulation --- */
60 gchar** bse_xinfos_add_value (gchar **xinfos,
61  const gchar *key,
62  const gchar *value);
63 gchar** bse_xinfos_add_float (gchar **xinfos,
64  const gchar *key,
65  gfloat fvalue);
66 gchar** bse_xinfos_add_num (gchar **xinfos,
67  const gchar *key,
68  SfiNum num);
69 gchar** bse_xinfos_parse_assignment (gchar **xinfos,
70  const gchar *assignment);
71 gchar** bse_xinfos_del_value (gchar **xinfos,
72  const gchar *key);
73 const gchar* bse_xinfos_get_value (gchar **xinfos,
74  const gchar *key);
75 gfloat bse_xinfos_get_float (gchar **xinfos,
76  const gchar *key);
77 SfiNum bse_xinfos_get_num (gchar **xinfos,
78  const gchar *key);
79 gchar** bse_xinfos_dup_consolidated (gchar **xinfos,
80  gboolean copy_interns);
81 gint bse_xinfo_stub_compare (const gchar *xinfo1, /* must contain '=' */
82  const gchar *xinfo2); /* must contain '=' */
83 
84 
85 /* --- miscellaeous --- */
86 guint bse_string_hash (gconstpointer string);
87 gint bse_string_equals (gconstpointer string1,
88  gconstpointer string2);
89 G_END_DECLS
90 
91 #endif /* __BSE_UTILS_H__ */
Part specific note event representation.
Definition: bseapi.idl:351
Definition: sfiring.hh:23
Part specific control event representation.
Definition: bseapi.idl:369
Definition: bseitem.hh:34