summaryrefslogtreecommitdiffstats
path: root/tests/quantize_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/quantize_test.cpp')
-rw-r--r--tests/quantize_test.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/quantize_test.cpp b/tests/quantize_test.cpp
new file mode 100644
index 0000000..434df2e
--- /dev/null
+++ b/tests/quantize_test.cpp
@@ -0,0 +1,28 @@
+#include <iostream>
+#include <raul/Quantizer.h>
+
+using namespace std;
+using namespace Raul;
+
+
+int
+main()
+{
+ double q = 0;
+ double beats = 0;
+
+ cout << "Quantization: ";
+ cin >> q;
+ cout << endl;
+
+ while (true) {
+ cout << "Beats: ";
+ cin >> beats;
+
+ cout << "Quantized: ";
+ cout << Quantizer::quantize(q, beats) << endl << endl;
+ }
+
+ return 0;
+}
+