Changeset 6693
- Timestamp:
- 06/28/09 23:03:17 (14 months ago)
- Location:
- trunk/liquidsoap/src
- Files:
-
- 3 added
- 4 modified
- 2 copied
-
Makefile (modified) (6 diffs)
-
stream/frame.ml (modified) (4 diffs)
-
stream/frame.mli (modified) (2 diffs)
-
stream/mFrame.ml (copied) (copied from trunk/liquidsoap/src/stream/vFrame.ml) (1 diff)
-
stream/mFrame.mli (copied) (copied from trunk/liquidsoap/src/stream/vFrame.mli) (2 diffs)
-
stream/midi.ml (modified) (1 diff)
-
synth (added)
-
synth/Makefile (added)
-
synth/keyboard.ml (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/liquidsoap/src/Makefile
r6615 r6693 2 2 SUBDIRS= operators sources tools formats protocols outputs io plugins stream \ 3 3 visualization lang analyze playlists ogg_formats video_converters \ 4 audio_converters 4 audio_converters synth 5 5 6 6 DISTFILES = $(wildcard *.mli) Makefile \ … … 138 138 request.ml source.ml root.ml \ 139 139 stream/float_pcm_c.c stream/float_pcm.ml \ 140 stream/aFrame.ml stream/vFrame.ml 140 stream/aFrame.ml stream/vFrame.ml stream/mFrame.ml 141 141 142 142 visualization = visualization/vumeter.ml \ … … 145 145 $(if $(W_GL),visualization/vis_glvolume.ml) \ 146 146 visualization/video_volume.ml 147 148 synth = synth/keyboard.ml 147 149 148 150 liquidsoap_sources= $(tools) SVN.ml audio_converter.ml $(stream) \ … … 156 158 $(video_converters) $(audio_converters) \ 157 159 $(ogg_utils) $(protocols) $(sources) $(operators) $(outputs) $(io) \ 158 $(analyze) $(playlists) $(visualization) $( formats) \160 $(analyze) $(playlists) $(visualization) $(synth) $(formats) \ 159 161 shebang.ml \ 160 162 lang/lang_builtins.ml \ … … 166 168 -I tools -I lang -I playlists -I stream -I outputs -I formats \ 167 169 -I video_converters -I sources -I operators -I io -I visualization \ 168 -I analyze -I ogg_formats -I audio_converters 170 -I analyze -I ogg_formats -I audio_converters -I synth 169 171 OCAML_LFLAGS= $(if $(BYTE),dynlink.cma) $(if $(W_RTP),-cclib -lortp) \ 170 172 $(if $(W_OPAL),-cclib -lopal) 171 173 DEP_OPTS= -I sources -I operators -I tools -I lang -I formats -I playlists \ 172 174 -I video_converters -I outputs -I io -I stream -I visualization \ 173 -I analyze -I ogg_formats -I audio_converters 175 -I analyze -I ogg_formats -I audio_converters -I synth 174 176 175 177 liquidsoap_doc_sources= \ … … 186 188 $(if $(W_OGG),ogg_encoder.ml ogg_demuxer.ml) \ 187 189 stream/frame.ml stream/float_pcm.ml stream/aFrame.ml \ 188 stream/vFrame.ml stream/RGB.ml audio_converter.ml 190 stream/vFrame.ml stream/RGB.ml audio_converter.ml \ 191 stream/mFrame.ml 189 192 190 193 top_srcdir=.. -
trunk/liquidsoap/src/stream/frame.ml
r6448 r6693 27 27 type track_t = 28 28 | Float_pcm_t of float_pcm_t 29 | Midi_t of Midi.header29 | Midi_t 30 30 | RGB_t 31 31 32 32 type track = 33 33 | Float_pcm of (float_pcm_t * float_pcm) 34 | Midi of ( Midi.header * Midi.track ref)34 | Midi of (int * Midi.event) list ref 35 35 | RGB of RGB.t array 36 36 … … 63 63 in 64 64 Float_pcm (f, Array.create len 0.) 65 | Midi_t h->66 Midi ( h,ref (Midi.create_track ()))65 | Midi_t -> 66 Midi (ref (Midi.create_track ())) 67 67 | RGB_t -> 68 68 RGB (Array.init … … 98 98 let kind_of_track = function 99 99 | Float_pcm (t, _) -> Float_pcm_t t 100 | Midi (h, _) -> Midi_t h100 | Midi _ -> Midi_t 101 101 | RGB _ -> RGB_t 102 102 … … 172 172 let c x = int_of_float (float x *. r) in 173 173 float_blit a (c src_pos) a' (c dst_pos) (c len) 174 | Midi (_,m), Midi (h,m') -> m' := !m174 | Midi m, Midi m' -> m' := !m (* TODO: use parameters.... *) 175 175 | RGB src, RGB dst -> 176 176 (* TODO: handle offsets! *) -
trunk/liquidsoap/src/stream/frame.mli
r6448 r6693 39 39 type track_t = 40 40 | Float_pcm_t of float_pcm_t (** PCM data *) 41 | Midi_t of Midi.header(** MIDI data *)41 | Midi_t (** MIDI data *) 42 42 | RGB_t (** YUV video data *) 43 43 … … 45 45 type track = 46 46 | Float_pcm of (float_pcm_t * float_pcm) (** PCM data *) 47 | Midi of ( Midi.header * Midi.track ref)(** MIDI data *)47 | Midi of (int * Midi.event) list ref (** MIDI data *) 48 48 | RGB of RGB.t array (** YUV data as an array of frames *) 49 49 -
trunk/liquidsoap/src/stream/mFrame.ml
r6030 r6693 1 1 include Frame 2 3 let vot = Fmt.video_frames_of_ticks4 let tov = Fmt.ticks_of_video_frames5 6 let size t = vot (size t)7 let position t = vot (position t)8 let add_break t i = add_break t (tov i)9 10 let set_metadata t i m = set_metadata t (tov i) m11 let get_metadata t i = get_metadata t (tov i)12 13 let get_rgb b =14 let tracks = Array.to_list (Frame.get_tracks b) in15 let ans =16 List.fold_left17 (fun l t ->18 match t with19 | RGB a -> a::l20 | _ -> l21 ) [] tracks in22 Array.of_list ans -
trunk/liquidsoap/src/stream/mFrame.mli
r6158 r6693 1 (** Videoframe manipulation *)1 (** MIDI frame manipulation *) 2 2 3 3 type t = Frame.t … … 19 19 val set_metadata : t -> int -> metadata -> unit 20 20 val get_metadata : t -> int -> metadata option 21 22 (** Get the contents of all video channels. *)23 val get_rgb : t -> RGB.t array array -
trunk/liquidsoap/src/stream/midi.ml
r6344 r6693 26 26 27 27 type event = 28 | Note_off of int * int29 | Note_on of int * int30 | Aftertouch of int * int28 | Note_off of int * float 29 | Note_on of int * float (** Note on: note number (A4 = 91), velocity (between 0 and 1). *) 30 | Aftertouch of int * float 31 31 | Control_change of int * int 32 32 | Patch of int
