X-Git-Url: https://scm.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/fc2ec49c325b99370170789886b4be4f43e16d68..b8e89a384896a4f8ce3e1990a10c88e7164af55c:/documentation/code_VALMain.write_output_wave.html diff --git a/documentation/code_VALMain.write_output_wave.html b/documentation/code_VALMain.write_output_wave.html deleted file mode 100644 index 0f92cb3..0000000 --- a/documentation/code_VALMain.write_output_wave.html +++ /dev/null @@ -1,47 +0,0 @@ -
- - - - - - - - - - - - - - - -let write_output_wave = fun channel_int_list -> fun rate_int_list -> fun data_float_array_list ->
- let () = print_endline("Making output wave files...") in
-
- (* make output wave file names : output0, output1, ... *)
- let n_output = List.length data_float_array_list in
- let n_array = Array.init n_output (fun n -> n) in
- let make_file_name i = "output" ^ (string_of_int i) ^ ".wav" in
-
- (* make output wave file routes *)
- let make_chemin s = io_macro_to_string Output_Route_string ^ s in
- let file_name_string_array = Array.map make_file_name n_array in
- let file_chemin_string_array = Array.map make_chemin file_name_string_array in
- let file_chemin_string_list = Array.to_list file_chemin_string_array in
-
- (* open files for writing with respects to channel numbers and sample rates *)
- let file_format = Sndfile.format Sndfile.MAJOR_WAV Sndfile.MINOR_PCM_16 in
- let openwr = fun file_chemin_string -> fun channel -> fun rate ->
- Sndfile.openfile ~info:(Sndfile.RDWR, file_format, channel, rate) file_chemin_string in
- let openwr_fun_list = fun fl -> fun cl -> fun rl -> fun i ->
- openwr (List.nth fl i) (List.nth cl i) (List.nth rl i) in
- let output_file_list = List.map
- (openwr_fun_list file_chemin_string_list channel_int_list rate_int_list)
- (Array.to_list (Array.init n_output (fun n -> n))) in
-
- (* write data into files *)
- let _ = List.map2 Sndfile.write output_file_list data_float_array_list in
- let _ = List.map Sndfile.close output_file_list in
- print_endline("Success.")
\ No newline at end of file