[PD-cvs] externals/grill/py/scripts sig.py,1.3,1.4

Thomas Grill xovo at users.sourceforge.net
Mon Apr 11 00:24:15 CEST 2005


Update of /cvsroot/pure-data/externals/grill/py/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30059/scripts

Modified Files:
	sig.py 
Log Message:
added xcode project
cleaner error reporting
added generic numpy support (not working)
use lock count instead of message queuing to avoid py->py messaging deadlock
fixing strange gcc behavior
fixes for maxmsp
support for buffer objects (preliminary)
fixed reference count bug
use optimized version
updates for DSP processing
adjust pd and py files for correct argument passing
more optimizations
fixed numarray headers
little restructuring


Index: sig.py
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/scripts/sig.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sig.py	25 Mar 2005 04:54:16 -0000	1.3
--- sig.py	10 Apr 2005 22:24:13 -0000	1.4
***************
*** 40,44 ****
      def _signal(self):
          # Multiply input vector by gain and copy to output
!         self._outvec(0)[:] = self._invec(0)*self.gain
  
  
--- 40,47 ----
      def _signal(self):
          # Multiply input vector by gain and copy to output
! 		try:
! 			self._outvec(0)[:] = self._invec(0)*self.gain
! 		except:
! 			pass
  
  
***************
*** 49,52 ****
--- 52,59 ----
  
      def _dsp(self):
+         if not self._arraysupport():
+             print "No DSP support"
+             return False
+ 
          # cache vectors in this scope
          self.invec = self._invec(0)
***************
*** 57,60 ****
--- 64,68 ----
          else:
              self._signal = self.signal2
+         return True
  
      def signal1(self):
***************
*** 79,82 ****
--- 87,94 ----
          self.fr = math.sin(x)
      
+     def _dsp(self):
+         # if _dsp is present it must return True to enable DSP
+         return pyext._arraysupport()
+     
      def _signal(self):
          # Multiply input vector by gain and copy to output





More information about the Pd-cvs mailing list