update aubioclass cvec
authorPaul Brossier <piem@altern.org>
Fri, 3 Mar 2006 05:41:24 +0000 (05:41 +0000)
committerPaul Brossier <piem@altern.org>
Fri, 3 Mar 2006 05:41:24 +0000 (05:41 +0000)
update aubioclass cvec

python/aubio/aubioclass.py

index dd4eef18f2bc0510e9d96c7b8adb1893fec4c19b..20c161c0646fd1ee83905db441f6622765c694dc 100644 (file)
@@ -24,18 +24,17 @@ class cvec:
     def __del__(self):
         del_cvec(self())
     def get(self,pos,chan):
+        return self.get_norm(pos,chan)
+    def set(self,val,pos,chan):
+        self.set_norm(val,chan,pos)
+    def get_norm(self,pos,chan):
         return cvec_read_norm(self(),chan,pos)
-
-    """
-       cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
-       cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
-       cvec_read_norm (cvec_t *s, uint_t channel, uint_t position);
-       cvec_read_phas (cvec_t *s, uint_t channel, uint_t position);
-       cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel);
-       cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel);
-       cvec_get_norm_channel(cvec_t *s, uint_t channel);
-       cvec_get_phas_channel(cvec_t *s, uint_t channel);
-    """
+    def set_norm(self,val,pos,chan):
+        cvec_write_norm(self(),val,chan,pos)
+    def get_phas(self,pos,chan):
+        return cvec_read_phas(self(),chan,pos)
+    def set_phas(self,val,pos,chan):
+        cvec_write_phas(self(),val,chan,pos)
 
 class sndfile:
     def __init__(self,filename,model=None):