BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bsesong.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BSE_SONG_H__
00003 #define __BSE_SONG_H__
00004 
00005 #include        <bse/bsesnet.hh>
00006 
00007 
00008 G_BEGIN_DECLS
00009 
00010 
00011 /* --- BSE type macros --- */
00012 #define BSE_TYPE_SONG              (BSE_TYPE_ID (BseSong))
00013 #define BSE_SONG(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_SONG, BseSong))
00014 #define BSE_SONG_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_SONG, BseSongClass))
00015 #define BSE_IS_SONG(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_SONG))
00016 #define BSE_IS_SONG_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_SONG))
00017 #define BSE_SONG_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_SONG, BseSongClass))
00018 
00019 
00020 /* --- BseSong object --- */
00021 struct BseSongVoice {
00022   BseSource *constant;
00023   BseSource *sub_synth;
00024 };
00025 struct BseSong : BseSNet {
00026   guint             tpqn;               /* ticks per querter note */
00027   guint             numerator;
00028   guint             denominator;
00029   gfloat            bpm;
00030   BseMusicalTuningType musical_tuning;
00031   SfiRing          *parts;              /* of type BsePart* */
00032   SfiRing          *busses;             /* of type BseBus* */
00033   BseBus           *solo_bus;
00034   BseSource        *postprocess;
00035   BseSource        *output;
00036   BseSNet          *pnet;
00037   /* song position pointer */
00038   SfiInt            last_position;
00039   guint             position_handler;
00040   BseMidiReceiver  *midi_receiver_SL;
00041   /* fields protected by sequencer mutex */
00042   gdouble           tpsi_SL;            /* ticks per stamp increment (sample) */
00043   SfiRing          *tracks_SL;          /* of type BseTrack* */
00044   /* sequencer stuff */
00045   guint64           sequencer_start_request_SL;
00046   guint64           sequencer_start_SL; /* playback start */
00047   guint64           sequencer_done_SL;
00048   gdouble           delta_stamp_SL;     /* start + delta_stamp => tick */
00049   guint             tick_SL;            /* tick at stamp_SL */
00050   guint             sequencer_owns_refcount_SL : 1;
00051   guint             sequencer_underrun_detected_SL : 1;
00052   guint             loop_enabled_SL : 1;
00053   SfiInt            loop_left_SL;       /* left loop tick */
00054   SfiInt            loop_right_SL;      /* left loop tick */
00055 };
00056 struct BseSongClass : BseSNetClass
00057 {};
00058 
00059 BseSong*        bse_song_lookup                 (BseProject     *project,
00060                                                  const gchar    *name);
00061 void            bse_song_stop_sequencing_SL     (BseSong        *self);
00062 void            bse_song_get_timing             (BseSong        *self,
00063                                                  guint           tick,
00064                                                  BseSongTiming  *timing);
00065 void            bse_song_timing_get_default     (BseSongTiming  *timing);
00066 BseSource*      bse_song_create_summation       (BseSong        *self);
00067 BseBus*         bse_song_find_master            (BseSong        *self);
00068 BseSource*      bse_song_ensure_master          (BseSong        *self);
00069 void            bse_song_set_solo_bus           (BseSong        *self,
00070                                                  BseBus         *bus);
00071 
00072 G_END_DECLS
00073 
00074 #endif /* __BSE_SONG_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines