BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
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 Bse::PartNote bse_part_note (uint id, uint channel, uint tick, uint duration, int note, int fine_tune, double velocity, bool selected);
17 Bse::PartControl bse_part_control (uint id, uint tick, Bse::MidiSignal control_type, double value, bool selected);
18 void bse_note_sequence_resize (BseNoteSequence *rec,
19  guint length);
20 guint bse_note_sequence_length (BseNoteSequence *rec);
21 void bse_property_candidate_relabel (BsePropertyCandidates *pc,
22  const gchar *label,
23  const gchar *tooltip);
24 void bse_it3m_seq_remove (BseIt3mSeq *iseq,
25  BseItem *item);
26 SfiRing* bse_it3m_seq_to_ring (BseIt3mSeq *iseq);
27 BseIt3mSeq* bse_it3m_seq_from_ring (SfiRing *ring);
28 
29 
30 /* --- debugging --- */
31 void bse_debug_dump_floats (guint debug_stream,
32  guint n_channels,
33  guint mix_freq,
34  guint n_values,
35  gfloat *values);
36 
37 
38 /* --- balance calculation --- */
39 /* levels are 0..100, balance is -100..+100 */
40 double bse_balance_get (double level1,
41  double level2);
42 void bse_balance_set (double balance,
43  double *level1,
44  double *level2);
45 
46 
47 /* --- icons --- */
48 BseIc0n* bse_ic0n_from_pixstream (const guint8 *pixstream);
49 
50 
51 /* --- ID allocator --- */
52 gulong bse_id_alloc (void);
53 void bse_id_free (gulong id);
54 
55 
56 /* --- string array manipulation --- */
57 gchar** bse_xinfos_add_value (gchar **xinfos,
58  const gchar *key,
59  const gchar *value);
60 gchar** bse_xinfos_add_float (gchar **xinfos,
61  const gchar *key,
62  gfloat fvalue);
63 gchar** bse_xinfos_add_num (gchar **xinfos,
64  const gchar *key,
65  SfiNum num);
66 gchar** bse_xinfos_parse_assignment (gchar **xinfos,
67  const gchar *assignment);
68 gchar** bse_xinfos_del_value (gchar **xinfos,
69  const gchar *key);
70 const gchar* bse_xinfos_get_value (gchar **xinfos,
71  const gchar *key);
72 gfloat bse_xinfos_get_float (gchar **xinfos,
73  const gchar *key);
74 SfiNum bse_xinfos_get_num (gchar **xinfos,
75  const gchar *key);
76 gchar** bse_xinfos_dup_consolidated (gchar **xinfos,
77  gboolean copy_interns);
78 gint bse_xinfo_stub_compare (const gchar *xinfo1, /* must contain '=' */
79  const gchar *xinfo2); /* must contain '=' */
80 
81 
82 /* --- miscellaeous --- */
83 guint bse_string_hash (gconstpointer string);
84 gint bse_string_equals (gconstpointer string1,
85  gconstpointer string2);
86 G_END_DECLS
87 
88 
89 namespace Bse {
90 
91 Icon icon_from_pixstream (const guint8 *pixstream);
92 
93 } // Bse
94 
95 #endif /* __BSE_UTILS_H__ */
The Bse namespace contains all functions of the synthesis engine.
Definition: bstbseutils.cc:88
Icon icon_from_pixstream(const uint8 *pixstream)
Create a Bse::Icon from a GdkPixbuf pixstream.
Definition: bseutils.cc:601
Part specific note event representation.
Definition: bseapi.idl:500
Definition: sfiring.hh:23
Part specific control event representation.
Definition: bseapi.idl:518
Definition: bseitem.hh:34