[PD-cvs] externals/unauthorized/stkdrone~ Makefile,1.1,1.2 README,1.1,1.2 drone.cc,1.1,1.2 drone.h,1.1,1.2

Yves Degoyon sevyves at users.sourceforge.net
Sun Nov 14 23:45:05 CET 2004


Update of /cvsroot/pure-data/externals/unauthorized/stkdrone~
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20608

Modified Files:
	Makefile README drone.cc drone.h 
Log Message:
adapted for STK 4.2.0

Index: README
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/stkdrone~/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** README	16 Aug 2003 17:08:55 -0000	1.1
--- README	14 Nov 2004 22:45:03 -0000	1.2
***************
*** 1,4 ****
  *****************************************************************************
! Version 0.01 
  embedding Perry Cook's ragamatic in Pure Data
  copyright 2001 by Perry Cook
--- 1,4 ----
  *****************************************************************************
! Version 0.2 
  embedding Perry Cook's ragamatic in Pure Data
  copyright 2001 by Perry Cook

Index: drone.h
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/stkdrone~/drone.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** drone.h	16 Aug 2003 17:08:55 -0000	1.1
--- drone.h	14 Nov 2004 22:45:03 -0000	1.2
***************
*** 12,16 ****
  
  #include "Instrmnt.h" 
! #include "DLineA.h"
  #include "OneZero.h"
  #include "ADSR.h" 
--- 12,16 ----
  
  #include "Instrmnt.h" 
! #include "DelayA.h"
  #include "OneZero.h"
  #include "ADSR.h" 
***************
*** 20,24 ****
  {
  protected:  
!   DLineA *delayLine;
    ADSR *envelope;
    Noise *noise;
--- 20,24 ----
  {
  protected:  
!   DelayA *delayLine;
    ADSR *envelope;
    Noise *noise;

Index: Makefile
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/stkdrone~/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile	16 Aug 2003 17:08:55 -0000	1.1
--- Makefile	14 Nov 2004 22:45:03 -0000	1.2
***************
*** 1,5 ****
  NAME=stkdrone~
  CSYM=stkdrone_tilde
! STK_HOME=/usr/local/stk-3.2
  
  current: pd_linux
--- 1,5 ----
  NAME=stkdrone~
  CSYM=stkdrone_tilde
! STK_HOME=/usr/local/stk
  
  current: pd_linux
***************
*** 22,26 ****
  	g++ -O3 -Wall -D__OS_Linux_ -g -I$(STK_HOME)/include -c drone.cc
  	g++ $(LINUXCCFLAGS) $(LINUXINCLUDE) -I$(STK_HOME)/include -o $*.o -c $*.cc
! 	ld -export_dynamic  -shared -o $*.pd_linux *.o $(STK_HOME)/src/stklib.a -lc -lm -lstdc++ -lg++
  	strip --strip-unneeded $*.pd_linux
  	rm -f *.o ../$*.pd_linux
--- 22,26 ----
  	g++ -O3 -Wall -D__OS_Linux_ -g -I$(STK_HOME)/include -c drone.cc
  	g++ $(LINUXCCFLAGS) $(LINUXINCLUDE) -I$(STK_HOME)/include -o $*.o -c $*.cc
! 	g++ -export_dynamic  -shared -o $*.pd_linux *.o $(STK_HOME)/src/libstk.a -lc -lm -lpthread
  	strip --strip-unneeded $*.pd_linux
  	rm -f *.o ../$*.pd_linux

Index: drone.cc
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/stkdrone~/drone.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** drone.cc	16 Aug 2003 17:08:55 -0000	1.1
--- drone.cc	14 Nov 2004 22:45:03 -0000	1.2
***************
*** 10,19 ****
  #include "drone.h"
  
! drone :: drone(MY_FLOAT lowestFreq)
  {
    length = (long) (SRATE / lowestFreq + 1);
!   loopGain = (MY_FLOAT) 0.999;
    loopFilt = new OneZero();
!   delayLine = new DLineA(length);
    envelope = new ADSR();
    noise = new Noise;
--- 10,19 ----
  #include "drone.h"
  
! drone :: drone(StkFloat lowestFreq)
  {
    length = (long) (SRATE / lowestFreq + 1);
!   loopGain = (StkFloat) 0.999;
    loopFilt = new OneZero();
!   delayLine = new DelayA(0.5*length, length);
    envelope = new ADSR();
    noise = new Noise;
***************
*** 36,54 ****
  }
  
! void drone :: setFreq(MY_FLOAT frequency)
  {
!   MY_FLOAT delay;
    delay = (SRATE / frequency);
    delayLine->setDelay(delay - 0.5);
!   loopGain = (MY_FLOAT) 0.997 + (frequency * (MY_FLOAT)  0.000002);
!   if (loopGain>1.0) loopGain = (MY_FLOAT) 0.99999;
  }
  
! void drone :: pluck(MY_FLOAT amplitude)
  {
    envelope->keyOn();
  }
  
! void drone :: noteOn(MY_FLOAT freq, MY_FLOAT amp)
  {
    this->setFreq(freq);
--- 36,54 ----
  }
  
! void drone :: setFreq(StkFloat frequency)
  {
!   StkFloat delay;
    delay = (SRATE / frequency);
    delayLine->setDelay(delay - 0.5);
!   loopGain = (StkFloat) 0.997 + (frequency * (StkFloat)  0.000002);
!   if (loopGain>1.0) loopGain = (StkFloat) 0.99999;
  }
  
! void drone :: pluck(StkFloat amplitude)
  {
    envelope->keyOn();
  }
  
! void drone :: noteOn(StkFloat freq, StkFloat amp)
  {
    this->setFreq(freq);
***************
*** 59,65 ****
  }
  
! void drone :: noteOff(MY_FLOAT amp)
  {
!   loopGain = (MY_FLOAT) 1.0 - amp;
  #if defined(_debug_)        
    printf("drone : NoteOff: Amp=%lf\n",amp);
--- 59,65 ----
  }
  
! void drone :: noteOff(StkFloat amp)
  {
!   loopGain = (StkFloat) 1.0 - amp;
  #if defined(_debug_)        
    printf("drone : NoteOff: Amp=%lf\n",amp);
***************
*** 67,77 ****
  }
  
! MY_FLOAT drone :: tick()
  {
    /* check this out */
    /* here's the whole inner loop of the instrument!!  */
!   lastOutput = delayLine->tick(loopFilt->tick((delayLine->lastOut() * loopGain))
  		+ (0.005 * envelope->tick() * noise->tick())); 
!   return lastOutput;
  }
  
--- 67,77 ----
  }
  
! StkFloat drone :: tick()
  {
    /* check this out */
    /* here's the whole inner loop of the instrument!!  */
!   lastOutput_ = delayLine->tick(loopFilt->tick((delayLine->lastOut() * loopGain))
  		+ (0.005 * envelope->tick() * noise->tick())); 
!   return lastOutput_;
  }
  





More information about the Pd-cvs mailing list