X-Git-Url: https://scm.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/a891a827a9bad83d44164ffdd7b28f070c439e46..63cf293f572ae7d5c1c83b9dffb31e7d774f8854:/interpretor/process.ml?ds=sidebyside diff --git a/interpretor/process.ml b/interpretor/process.ml index 31cc6c9..ba13961 100644 --- a/interpretor/process.ml +++ b/interpretor/process.ml @@ -89,7 +89,8 @@ class proc_const : faust_exp -> process_type = method eval : beam_type -> beam_type = fun (input : beam_type) -> if input#get = [||] then - new beam [| new signal 0 (fun t -> new value self#const)|] + new beam [| new signal (new rate 0 1) + (fun t -> new value self#const)|] else raise (Process_error "proc_const accepts no input.") end;; @@ -130,28 +131,58 @@ class proc_ident : faust_exp -> process_type = ((input#get.(0))#mul input#get.(1)) | Div -> self#beam_of_ident n ((input#get.(0))#div input#get.(1)) + | Power -> self#beam_of_ident n + ((input#get.(0))#power input#get.(1)) + | And -> self#beam_of_ident n + ((input#get.(0))#_and input#get.(1)) + | Or -> self#beam_of_ident n + ((input#get.(0))#_or input#get.(1)) + | Xor -> self#beam_of_ident n + ((input#get.(0))#_xor input#get.(1)) | Mem -> self#beam_of_ident n ((input#get.(0))#mem) | Delay -> self#beam_of_ident n ((input#get.(0))#delay input#get.(1)) | Floor -> self#beam_of_ident n ((input#get.(0))#floor) + | Ceil -> self#beam_of_ident n + ((input#get.(0))#ceil) + | Rint -> self#beam_of_ident n + ((input#get.(0))#rint) | Int -> self#beam_of_ident n ((input#get.(0))#int) + | Float -> self#beam_of_ident n + ((input#get.(0))#float) | Sin -> self#beam_of_ident n ((input#get.(0))#sin) + | Asin -> self#beam_of_ident n + ((input#get.(0))#asin) | Cos -> self#beam_of_ident n ((input#get.(0))#cos) + | Acos -> self#beam_of_ident n + ((input#get.(0))#acos) + | Tan -> self#beam_of_ident n + ((input#get.(0))#tan) | Atan -> self#beam_of_ident n ((input#get.(0))#atan) | Atan2 -> self#beam_of_ident n ((input#get.(0))#atan2 input#get.(1)) + | Exp -> self#beam_of_ident n + ((input#get.(0))#exp) | Sqrt -> self#beam_of_ident n ((input#get.(0))#sqrt) - | Rdtable -> self#beam_of_ident n - ((input#get.(1))#rdtable input#get.(0) input#get.(2)) + | Ln -> self#beam_of_ident n + ((input#get.(0))#ln) + | Lg -> self#beam_of_ident n + ((input#get.(0))#lg) + | Abs -> self#beam_of_ident n + ((input#get.(0))#abs) | Mod -> self#beam_of_ident n ((input#get.(0))#_mod input#get.(1)) + | Fmod -> self#beam_of_ident n + ((input#get.(0))#fmod input#get.(1)) + | Remainder -> self#beam_of_ident n + ((input#get.(0))#remainder input#get.(1)) | Vectorize -> self#beam_of_ident n ((input#get.(0))#vectorize input#get.(1)) | Vconcat -> self#beam_of_ident n @@ -160,10 +191,26 @@ class proc_ident : faust_exp -> process_type = ((input#get.(0))#vpick input#get.(1)) | Serialize -> self#beam_of_ident n (input#get.(0))#serialize - | Larger -> self#beam_of_ident n - ((input#get.(0))#larger input#get.(1)) - | Smaller -> self#beam_of_ident n - ((input#get.(0))#smaller input#get.(1)) + | Gt -> self#beam_of_ident n + ((input#get.(0))#gt input#get.(1)) + | Lt -> self#beam_of_ident n + ((input#get.(0))#lt input#get.(1)) + | Geq -> self#beam_of_ident n + ((input#get.(0))#geq input#get.(1)) + | Leq -> self#beam_of_ident n + ((input#get.(0))#leq input#get.(1)) + | Eq -> self#beam_of_ident n + ((input#get.(0))#eq input#get.(1)) + | Neq -> self#beam_of_ident n + ((input#get.(0))#neq input#get.(1)) + | Max -> self#beam_of_ident n + ((input#get.(0))#max input#get.(1)) + | Min -> self#beam_of_ident n + ((input#get.(0))#min input#get.(1)) + | Shl -> self#beam_of_ident n + ((input#get.(0))#shl input#get.(1)) + | Shr -> self#beam_of_ident n + ((input#get.(0))#shr input#get.(1)) | Prefix -> self#beam_of_ident n ((input#get.(1))#prefix input#get.(0)) | Select2 -> self#beam_of_ident n @@ -171,6 +218,11 @@ class proc_ident : faust_exp -> process_type = | Select3 -> self#beam_of_ident n ((input#get.(0))#select3 input#get.(1) input#get.(2) input#get.(3)) + | Rdtable -> self#beam_of_ident n + ((input#get.(1))#rdtable input#get.(0) input#get.(2)) + | Rwtable -> self#beam_of_ident n + ((input#get.(0))#rwtable input#get.(1) + input#get.(2) input#get.(3) input#get.(4)) end;; class virtual process_binary = @@ -261,7 +313,7 @@ and proc_rec : faust_exp -> process_type = method eval : beam_type -> beam_type = fun (input : beam_type) -> let memory = Hashtbl.create self#delay in - let rates = ref (Array.make self#dim#output 0) in + let rates = ref (Array.make self#dim#output (new rate 0 1)) in let split : (time -> value_type array) -> (time -> value_type) array = fun beam_at ->