(** val interpreter_macro_to_value : returns the value associated with the macro.*)
let interpreter_macro_to_value m = match m with
- | Number_samples_int -> 0xFF
+ | Number_samples_int -> 0xFFFFF
| Max_Eval_Time_int -> 0xFFFFFFFF;;
<- (Array.map convert_back_R (f (!index)));
incr index;
done;
- let () = print_string ("Done.") in
!container_float_array_array_array
with x ->
|Beam_Matching_Error s -> "Beam_Matching_Error: " ^ s
|Evaluation_Error s -> "Evaluation_Error: " ^ s
|NotYetDone -> "NotYetDone"
- |_ -> "Done."
+ |_ -> "Compute finished."
in
- let () = print_string error_message in
+ let () = print_endline error_message in
Array.sub (!container_float_array_array_array) 0 !index;;
input: a list of signal functions
output: channel number list, data list.*)
let compute fun_list =
- let () = print_string(" Faustine -> Signals computing... ") in
- let tic = Sys.time () in
+ let () = print_endline("Computing output signals...") in
(* arrange input information *)
let length = interpreter_macro_to_value Number_samples_int in
let channel_array = channels output_float_array_array_array width in
let channel_list = Array.to_list channel_array in
let output_float_array_list = arrange output_float_array_array_array width in
- let toc = Sys.time () in
- let () = print_endline(" (duration: " ^ (string_of_float (toc -. tic)) ^ "s)") in
(channel_list, output_float_array_list);;
|Sin -> if n = 1 then [signal_sin (List.nth input_beam 0)]
else raise (Evaluation_Error "Ident sin")
- |Cos -> if n = 1 then [signal_cos (List.nth input_beam 0)]
- else raise (Evaluation_Error "Ident cos")
-
- |Atan -> if n = 1 then [signal_atan (List.nth input_beam 0)]
- else raise (Evaluation_Error "Ident atan")
-
- |Atantwo -> if n = 2 then [signal_atantwo (List.nth input_beam 0) (List.nth input_beam 1)]
- else raise (Evaluation_Error "Ident atantwo")
-
- |Sqrt -> if n = 1 then [signal_sqrt (List.nth input_beam 0)]
- else raise (Evaluation_Error "Ident sqrt")
-
|Rdtable -> if n = 3 then [signal_rdtable (List.nth input_beam 0)
(List.nth input_beam 1) (List.nth input_beam 2)]
else raise (Evaluation_Error "Ident rdtable")
input: faust expression, sample rate list * input data list
output: channel list * sample rate list * output data list.*)
let interpreter exp_faust input =
- let () = print_string(" Faustine -> Interpretation...") in
- let tic = Sys.time () in
+ let () = print_endline("Interpretation...") in
(* make input beam *)
let input_beam = make_beam input in
(* interprete output beam *)
let output_beam = eval exp_faust dimension_tree input_beam in
- let toc = Sys.time () in
- let () = print_endline(" Done. (duration: " ^ (string_of_float (toc -. tic)) ^ "s)") in
(* get rate list from output beam *)
let rate_list = extract_rate output_beam in