Show
Ignore:
Timestamp:
06/28/09 23:03:17 (15 months ago)
Author:
smimram
Message:

Start experimenting a new idea: audio synthesis. Nothing to see for now though...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/liquidsoap/src/stream/frame.ml

    r6448 r6693  
    2727type track_t = 
    2828  | Float_pcm_t of float_pcm_t 
    29   | Midi_t of Midi.header 
     29  | Midi_t 
    3030  | RGB_t 
    3131 
    3232type track = 
    3333  | Float_pcm of (float_pcm_t * float_pcm) 
    34   | Midi of (Midi.header * Midi.track ref) 
     34  | Midi of (int * Midi.event) list ref 
    3535  | RGB of RGB.t array 
    3636 
     
    6363      in 
    6464        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 ())) 
    6767  | RGB_t -> 
    6868      RGB (Array.init 
     
    9898let kind_of_track = function 
    9999  | Float_pcm (t, _) -> Float_pcm_t t 
    100   | Midi (h, _) -> Midi_t h 
     100  | Midi _ -> Midi_t 
    101101  | RGB _ -> RGB_t 
    102102 
     
    172172          let c x = int_of_float (float x *. r) in 
    173173            float_blit a (c src_pos) a' (c dst_pos) (c len) 
    174       | Midi (_,m), Midi (h,m') -> m' := !m 
     174      | Midi m, Midi m' -> m' := !m (* TODO: use parameters.... *) 
    175175      | RGB src, RGB dst -> 
    176176          (* TODO: handle offsets! *)