changeset 1:7aedeab67b08

Misc bits
author Chris Cannam
date Fri, 30 Nov 2012 18:06:47 +0000
parents 90ddb49d94c5
children 51c7fea7d805
files audio.yeti matrix.yeti
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/audio.yeti	Thu Nov 22 21:43:25 2012 +0000
+++ b/audio.yeti	Fri Nov 30 18:06:47 2012 +0000
@@ -12,6 +12,13 @@
     format = stream#getFormat();
     { stream, format } );
 
+read file n is { .format is ~AudioFormat, .stream is ~AudioInputStream } ->
+    number -> 'a =
+   (ch = file.format#getChannels();
+    b = new byte[n * ch];
+    f = new float[ch][n];
+    f);
+
 {
     openAudioFile
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/matrix.yeti	Fri Nov 30 18:06:47 2012 +0000
@@ -0,0 +1,10 @@
+module matrix;
+
+zeros n =
+    map \0 [1..n];
+
+matrix rows cols = 
+    array (map \(new double[cols]) [1..rows]);
+
+{ matrix }
+