Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
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 <bse/bsedefs.hh>
6 #include <bse/bseenums.hh>
7 #include <bse/bseglobals.hh>
8 #include <bse/bsecompat.hh>
9 
10 /* --- C++ helper declaration --- */
11 void bse_cxx_init (void);
12 /* --- record utils --- */
13 Bse::PartNote bse_part_note (uint id, uint channel, uint tick, uint duration, int note, int fine_tune, double velocity, bool selected);
14 Bse::PartControl bse_part_control (uint id, uint tick, Bse::MidiSignal control_type, double value, bool selected);
15 void bse_note_sequence_resize (BseNoteSequence *rec,
16  guint length);
17 guint bse_note_sequence_length (BseNoteSequence *rec);
18 void bse_property_candidate_relabel (BsePropertyCandidates *pc,
19  const gchar *label,
20  const gchar *tooltip);
21 void bse_it3m_seq_remove (BseIt3mSeq *iseq,
22  BseItem *item);
23 SfiRing* bse_it3m_seq_to_ring (BseIt3mSeq *iseq);
24 BseIt3mSeq* bse_it3m_seq_from_ring (SfiRing *ring);
25 
26 
27 /* --- debugging --- */
28 void bse_debug_dump_floats (guint debug_stream,
29  guint n_channels,
30  guint mix_freq,
31  guint n_values,
32  gfloat *values);
33 
34 
35 /* --- balance calculation --- */
36 /* levels are 0..100, balance is -100..+100 */
37 double bse_balance_get (double level1,
38  double level2);
39 void bse_balance_set (double balance,
40  double *level1,
41  double *level2);
42 
43 
44 /* --- icons --- */
45 Bse::Icon bse_icon_from_pixstream (const Bse::uint8 *pixstream);
46 
47 
48 /* --- ID allocator --- */
49 gulong bse_id_alloc (void);
50 void bse_id_free (gulong id);
51 
52 
53 /* --- string array manipulation --- */
54 gchar** bse_xinfos_add_value (gchar **xinfos,
55  const gchar *key,
56  const gchar *value);
57 gchar** bse_xinfos_add_float (gchar **xinfos,
58  const gchar *key,
59  gfloat fvalue);
60 gchar** bse_xinfos_add_num (gchar **xinfos,
61  const gchar *key,
62  SfiNum num);
63 gchar** bse_xinfos_parse_assignment (gchar **xinfos,
64  const gchar *assignment);
65 gchar** bse_xinfos_del_value (gchar **xinfos,
66  const gchar *key);
67 const gchar* bse_xinfos_get_value (gchar **xinfos,
68  const gchar *key);
69 gfloat bse_xinfos_get_float (gchar **xinfos,
70  const gchar *key);
71 SfiNum bse_xinfos_get_num (gchar **xinfos,
72  const gchar *key);
73 gchar** bse_xinfos_dup_consolidated (gchar **xinfos,
74  gboolean copy_interns);
75 gint bse_xinfo_stub_compare (const gchar *xinfo1, /* must contain '=' */
76  const gchar *xinfo2); /* must contain '=' */
77 
78 
79 /* --- miscellaeous --- */
80 guint bse_string_hash (gconstpointer string);
81 gint bse_string_equals (gconstpointer string1,
82  gconstpointer string2);
83 
84 namespace Bse {
85 
86 Icon icon_from_pixstream (const guint8 *pixstream);
87 bool icon_sanitize (Icon *icon);
88 
89 } // Bse
90 
91 #endif /* __BSE_UTILS_H__ */
The Bse namespace contains all functions of the synthesis engine.
Definition: bstbseutils.cc:91
Representation of an icon pixel image.
Definition: bseapi.idl:387
bool icon_sanitize(Icon *icon)
Ensure consistency of the icon fields.
Definition: bseutils.cc:678
Icon icon_from_pixstream(const uint8 *pixstream)
Create a Bse::Icon from a GdkPixbuf pixstream.
Definition: bseutils.cc:588
Part specific note event representation.
Definition: bseapi.idl:505
Definition: sfiring.hh:21
Part specific control event representation.
Definition: bseapi.idl:523
uint8_t uint8
Definition: bseitem.hh:32