X-Git-Url: https://svn.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/0a259beff10a55b87cdbd1a836f4c01162fdd73d..d204fe8a60e0556b0294e17c5c6948cb6cee7d91:/interpretor/types.ml diff --git a/interpretor/types.ml b/interpretor/types.ml index 352afbe..620cde5 100644 --- a/interpretor/types.ml +++ b/interpretor/types.ml @@ -87,9 +87,21 @@ type faust_exp = | Merge of faust_exp * faust_exp +class type rate_type = + object + method to_int : int + method to_float : float + method to_string : string + method num : int + method denom : int + method equal : rate_type -> bool + method mul : int -> rate_type + method div : int -> rate_type + end + class type signal_type = object - method frequency : int + method frequency : rate_type method at : time -> value_type method add_memory : int -> unit method add : signal_type -> signal_type @@ -132,7 +144,7 @@ class type beam_type = method matching : int -> beam_type method at : time -> value_type array method output : int -> float array array array - method frequency : int array + method frequency : rate_type array end;; @@ -161,5 +173,5 @@ class type io_type = object method set : string -> string -> unit method read : string array -> beam_type - method write : int array -> float array array array -> string array + method write : rate_type array -> float array array array -> string array end;;