]> CRI, Mines Paris - PSL - Faustine.git/commitdiff
Add rate_type in interpreter/types.ml.
authorWANG <wang@wang-OptiPlex-780.(none)>
Thu, 5 Sep 2013 13:56:33 +0000 (15:56 +0200)
committerWANG <wang@wang-OptiPlex-780.(none)>
Thu, 5 Sep 2013 13:56:33 +0000 (15:56 +0200)
architecture/morpho.lib
examples/dilation/dilation.dsp
examples/dilation/dilation.sh
examples/licenseplate/licenceplate.dsp
examples/sinwave/output1.wav
examples/sinwave/sin.sh
interpretor/main.ml
interpretor/types.ml

index 6741f364d63ba011681b87d2883c53a277f932d0..fc24c6aa3207b0d822f5a0ff8443686cd29c22b8 100644 (file)
@@ -58,10 +58,10 @@ licenceplate(x, y, o1, c2, t3, t4, t5, t6, o7, o8, d9) = _ <: (opening_line(x, y
 
 //licenceplate(x, y) = _ <: (opening_line(x, y, 4), closing_line(x, y, 2) : threshold(x, 1, 50), threshold(x, 150, 255) : and : opening_column(x, y, 4) : opening_line(x, y, 4) : dilations_square(x, y, 4)), _ : and;
 
-//process = dilations(8, 8, 3);
+//process = dilations_line(8, 8, 3);
 //process = erosions(8, 8, 3);
 //process = open(8, 8, 2);
 //process = close(8, 8, 5);
-//process = licenceplate(4, 4, 15, 8, 1, 50, 150, 255, 4, 4, 2);
+//process = licenceplate(100, 50, 15, 8, 1, 50, 150, 255, 4, 4, 2);
 
 
index d81f45896d87fffe4fce6118a7494358cc4af0ef..42b91812a2489ad93c11e28f0968a142d24dae31 100644 (file)
@@ -1,3 +1,3 @@
-import ("../../architecture/morph.lib");
+import ("../../architecture/morpho.lib");
 
-process = dilations(112, 150, 2);
+process = dilations_square(112, 150, 2);
index 01c29c050bea1055ff91b962c6225332a5f69cbd..5eed92b7512d52c93aef68a2d33b269cf42e150d 100644 (file)
@@ -1 +1 @@
-../../interpretor/faustine -d dilation.dsp -i letter_j.csv --oformat csv
+../../interpretor/faustine -d dilation.dsp -i letter_j.csv -t 150 --oformat csv
index 4ade83c042b76bb69c778251800190091082a577..2d230c3ce9c77560c265ca970092020fd08dff6f 100644 (file)
@@ -1,6 +1,6 @@
 import ("../../architecture/morpho.lib");
 
-process = licenceplate(640, 383, 15, 8, 1, 50, 150, 255, 4, 4, 2);
+process = licenceplate(300, 100, 15, 8, 1, 50, 150, 255, 4, 4, 2);
 
 //process = licenceplate(195, 117, 1, 4, 1, 50, 150, 255, 1, 1, 2);
 
index 5a728e2cca463cca0edf2c8809f3d1fd42fa0231..37a80e3d2f58a26ab8ca61852cd1d13bd5909fd2 100644 (file)
Binary files a/examples/sinwave/output1.wav and b/examples/sinwave/output1.wav differ
index 3a4b202e19086caeb3bafd9d5f29bad846d5f129..899249e6b5e61894bdc4f55074851ec09b34ff8c 100644 (file)
@@ -1 +1 @@
-../../interpretor/faustine -d sin.dsp
+faustine -d sin.dsp
index 8637875b6c2007c1ffdbe3f0be743b1bb7e9f38f..21c2a8e9fa30f62d4c4e6feb879865645f29cb36 100644 (file)
@@ -21,11 +21,11 @@ let set_GC () =
        let _ = Gc.set { (Gc.get()) 
                       with Gc.space_overhead = 100 } in
        let _ = Gc.set { (Gc.get()) 
-                      with Gc.max_overhead = 0xFFFFF } in
+                      with Gc.max_overhead = 0xFFF } in
        let _ = Gc.set { (Gc.get()) 
                       with Gc.stack_limit = 0xFFFFF } in
        let _ = Gc.set { (Gc.get()) 
-                      with Gc.allocation_policy = 0 } in
+                      with Gc.allocation_policy = 1 } in
        () ;;
 
 let path_dsp = ref "";;
index 352afbe1b0abb1d6af2639fa34c354c60769d159..3f0631b447444d0154a4a3a689d5b5ac15ff4019 100644 (file)
@@ -87,9 +87,18 @@ type faust_exp =
        | Merge of faust_exp * faust_exp
 
 
+class type rate_type = 
+  object
+    method to_int : int
+    method to_float : float 
+    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