let signal_at = fun (t : time) -> fun (s : signal_type) -> s#at t in
Array.map (signal_at t) self#get
- method output : int -> float array array array =
+ method output : int -> data =
fun (length_max : int) ->
let transpose : 'a array array -> 'a array array =
fun matrix ->
_basename <- basename; _dir <- dir
method virtual read : string array -> beam
- method virtual write : rate array -> float array array array -> string array
+ method virtual write : rate array -> data -> string array
- method private concat : float array array array -> float array array =
- fun (origin : float array array array) ->
+ method private concat : data -> matrix =
+ fun (origin : data) ->
Array.map Array.concat (Array.map Array.to_list origin)
- method private channels : float array array array -> int array =
+ method private channels : data -> int array =
fun data ->
let get_channel = fun s ->
let l = Array.length s in
array_map2 (new signal) rates (Array.map stream2func containers) in
new beam signals
- method write : rate array -> float array array array -> string array =
+ method write : rate array -> data -> string array =
fun (rates : rate array) ->
- fun (output : float array array array) ->
+ fun (output : data) ->
let n = Array.length output in
let paths = Array.init n (fun i ->
_dir ^ _basename ^ (string_of_int (i + 1)) ^ ".wav") in
let signals = Array.map self#csvread files in
new beam signals
- method write : rate array -> float array array array -> string array =
+ method write : rate array -> data -> string array =
fun (rates : rate array) ->
- fun (data : float array array array) ->
+ fun (data : data) ->
let paths =
let n = Array.length data in
let path_pattern = fun i ->
wave#set _dir _basename;
csv#set _dir _basename
- method write : rate array -> float array array array -> string array =
+ method write : rate array -> data -> string array =
fun (rates : rate array) ->
- fun (data : float array array array) ->
+ fun (data : data) ->
if _format = "" then
raise (Invalid_argument "output format unset.")
else if _format = "wav" then
method prefix : signal_type -> signal_type
end;;
+type matrix = float array array;;
+
+type data = float array array array;;
class type beam_type =
object
method append : beam_type -> beam_type
method matching : int -> beam_type
method at : time -> value_type array
- method output : int -> float array array array
+ method output : int -> data
method frequency : rate_type array
end;;
object
method set : string -> string -> unit
method read : string array -> beam_type
- method write : rate_type array -> float array array array -> string array
+ method write : rate_type array -> data -> string array
end;;