Update of /cvsroot/pure-data/externals/ggee/experimental In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28795
Modified Files: stk.cpp stk.h Added Files: makefile README.stk Log Message: updated stk to stk version 4.2.0, added README file
--- NEW FILE: README.stk ---
In order to compile the stk external you have to put the latest stk release (4.2.0) in this directory.
* First compile stk
if stk is compiled just do a make stk.pd_linux.
Hint: You may have to set the rawwaves path in stk in so that the external can find them. See the STK INSTALL file for details. You do not have to specify a special audio API, as audio I/O is done through pd.
The stk configure command should be something like this:
./configure RAWWAVE_PATH="/home/gary/rawwaves/"
Guenter Geiger
Index: stk.h =================================================================== RCS file: /cvsroot/pure-data/externals/ggee/experimental/stk.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** stk.h 17 Jun 2002 10:13:54 -0000 1.1.1.1 --- stk.h 17 Oct 2004 20:04:36 -0000 1.2 *************** *** 1,91 **** ! #include <ADSR.h> ! #include <AifWvIn.h> ! #include <AifWvOut.h> ! #include <BeeThree.h> ! #include <BiQuad.h> ! #include <BlowHole.h> ! #include <BowTabl.h> ! #include <Bowed.h> ! #include <BowedBar.h> ! #include <Brass.h> ! #include <ByteSwap.h> ! #include <Clarinet.h> ! #include <Controller.h> ! #include <DCBlock.h> ! #include <DLineA.h> ! #include <DLineL.h> ! #include <DLineN.h> ! #include <DrumSynt.h> ! #include <Envelope.h> ! #include <FIR.h> ! #include <FM4Alg3.h> ! #include <FM4Alg4.h> ! #include <FM4Alg5.h> ! #include <FM4Alg6.h> ! #include <FM4Alg8.h> ! #include <FM4Op.h> ! #include <FMVoices.h> ! #include <Filter.h> ! #include <Flute.h> ! #include <FormSwep.h> ! #include <HeavyMtl.h> ! #include <Instrmnt.h> ! #include <JCRev.h> ! #include <JetTabl.h> ! //#include <LipFilt.h> ! #include <Mandolin.h> ! #include <MatWvIn.h> ! #include <MatWvOut.h> ! #include <Modal4.h> ! #include <ModalBar.h> ! #include <Modulatr.h> ! #include <Moog1.h> ! #include <NRev.h> ! #include <Noise.h> ! #include <Object.h> ! #include <OnePole.h> ! #include <OneZero.h> ! #include <PRCRev.h> ! #include <PercFlut.h> ! #include <Plucked.h> ! #include <Plucked2.h> ! #include <PoleZero.h> ! #include <RawWvIn.h> ! #include <RawWvOut.h> ! #include <ReedTabl.h> ! #include <Reverb.h> ! #include <Rhodey.h> ! #include <RtAudio.h> ! #include <RtDuplex.h> ! #include <RtMidi.h> ! #include <RtWvIn.h> ! #include <RtWvOut.h> ! #include <SKINI11.h> ! #include <SKINI11.msg> ! #include <SamplFlt.h> ! #include <Sampler.h> ! #include <Shakers.h> ! #include <Simple.h> ! #include <SingWave.h> ! #include <SndWvIn.h> ! #include <SndWvOut.h> ! #include <StkError.h> ! #include <StrmWvIn.h> ! #include <StrmWvOut.h> ! #include <SubNoise.h> ! #include <TablLook.h> ! #include <TubeBell.h> ! #include <TwoPole.h> ! #include <TwoZero.h> ! #include <VoicForm.h> ! #include <VoicMang.h> ! #include <WavWvIn.h> ! #include <WavWvOut.h> ! #include <Wurley.h> ! #include <WvIn.h> ! #include <WvOut.h> ! #include <mandplyr.h> ! #include <miditabl.h> ! #include <phontabl.h> ! #include <Sitar1.h> ! #include <StrDrone.h> --- 1,92 ---- ! #ifdef __linux__ ! #define __OS_LINUX__ ! #endif ! ! #include<Stk.h> ! #include<ADSR.h> ! #include<Asymp.h> ! #include<BandedWG.h> ! #include<BeeThree.h> ! #include<BiQuad.h> ! #include<BlowBotl.h> ! #include<BlowHole.h> ! #include<BowTable.h> ! #include<Bowed.h> ! #include<Brass.h> ! #include<Chorus.h> ! #include<Clarinet.h> ! #include<Delay.h> ! #include<DelayA.h> ! #include<DelayL.h> ! #include<Drummer.h> ! #include<Echo.h> ! #include<Effect.h> ! #include<Envelope.h> ! #include<FM.h> ! #include<FMVoices.h> ! #include<Filter.h> ! #include<Flute.h> ! #include<FormSwep.h> ! #include<Function.h> ! #include<Generator.h> ! #include<HevyMetl.h> ! #include<Instrmnt.h> ! #include<JCRev.h> ! #include<JetTable.h> ! #include<Mandolin.h> ! #include<Mesh2D.h> ! #include<Messager.h> ! #include<MidiFileIn.h> ! #include<Modal.h> ! #include<ModalBar.h> ! #include<Modulate.h> ! #include<Moog.h> ! #include<Mutex.h> ! #include<NRev.h> ! #include<Noise.h> ! #include<OnePole.h> ! #include<OneZero.h> ! #include<PRCRev.h> ! #include<PercFlut.h> ! #include<Phonemes.h> ! #include<PitShift.h> ! #include<PluckTwo.h> ! #include<Plucked.h> ! #include<PoleZero.h> ! #include<ReedTable.h> ! #include<Resonate.h> ! #include<Rhodey.h> ! #include<RtAudio.h> ! #include<RtDuplex.h> ! #include<RtError.h> ! #include<RtMidi.h> ! #include<RtWvIn.h> ! #include<RtWvOut.h> ! #include<SKINI.msg> ! #include<SKINI.tbl> ! #include<Sampler.h> ! #include<Saxofony.h> ! #include<Shakers.h> ! #include<Simple.h> ! #include<SingWave.h> ! #include<Sitar.h> ! #include<Skini.h> ! #include<Socket.h> ! #include<Sphere.h> ! #include<StifKarp.h> ! #include<SubNoise.h> ! #include<Table.h> ! #include<TcpWvIn.h> ! #include<TcpWvOut.h> ! #include<Thread.h> ! #include<TubeBell.h> ! #include<TwoPole.h> ! #include<TwoZero.h> ! #include<Vector3D.h> ! #include<VoicForm.h> ! #include<Voicer.h> ! #include<WaveLoop.h> ! #include<Whistle.h> ! #include<Wurley.h> ! #include<WvIn.h> ! #include<WvOut.h>
--- NEW FILE: makefile ---
EXTERNALS = $(shell ls *.c) CPPEXTERNALS = $(shell ls *.cpp)
STRIP = strip --strip-unneeded -R .note -R .comment
all: $(EXTERNALS:.c=.pd_linux) $(CPPEXTERNALS:.cpp=.pd_linux)
# this might be a better way to do this: # EXTERNALS := ${patsubst %.c, %.o, ${wildcard *.c}} # all: ${EXTERNALS}
.SUFFIXES: .pd_linux
STK = $(shell ls -d stk*/)
CFLAGS = -I$(STK)include
# cross-platform default CPU_FLAGS = -O2 OPTIM_FLAGS = -funroll-loops -fomit-frame-pointer $(CPU_FLAGS)
FLAGS = -fPIC -DPD -DUNIX $(OPTIM_FLAGS) \ -Wall -W -Wshadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS)
INCLUDES = -I. -I.. -I../../build/include
%.pd_linux: %.c $(CC) $(FLAGS) $(INCLUDES) -o "$*.o" -c "$+" gcc -Wl,-export_dynamic -shared -o "$@" "$*.o" -lc -lm chmod a-x "$@" $(STRIP) $@ rm -f "$*.o"
%.pd_linux: %.cpp $(CXX) $(FLAGS) $(INCLUDES) -o "$*.o" -c "$+" $(CXX) -Wl,-export_dynamic -shared -o "$@" "$*.o" -lc -lm $(STK)src/libstk.a chmod a-x "$@" $(STRIP) $@ rm -f "$*.o"
clean: -rm *.pd_linux *~ *.o -rm link.stamp
Index: stk.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/ggee/experimental/stk.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** stk.cpp 17 Jun 2002 10:13:54 -0000 1.1.1.1 --- stk.cpp 17 Oct 2004 20:04:36 -0000 1.2 *************** *** 33,41 ****
! #define DECL_INST(name) if ((stk_instruments[i++] = #name) && !strcmp(s->s_name, #name )) \ { x->instrument = new name;}
! #define DECL_INST2(name) if ((stk_instruments[i++] = #name) && !strcmp(s->s_name, #name )) \ ! { x->instrument = new name(80.);}
--- 33,41 ----
! #define DI(name) if ((stk_instruments[i++] = #name) && !strcmp(s->s_name, #name )) \ { x->instrument = new name;}
! #define DI2(name,y) if ((stk_instruments[i++] = #name) && !strcmp(s->s_name, #name )) \ ! { x->instrument = new name(y);}
*************** *** 43,82 **** { int i = 0; ! if (!strcmp(s->s_name,"Simple")) x->instrument = new Simple; ! DECL_INST2(Plucked) ! DECL_INST2(Plucked2) ! DECL_INST2(Mandolin) ! DECL_INST2(Bowed) ! DECL_INST2(Brass) ! DECL_INST2(Clarinet) ! DECL_INST2(BlowHole) ! DECL_INST2(Flute) ! DECL_INST(BowedBar) ! DECL_INST(Modal4) ! DECL_INST(ModalBar) ! DECL_INST(FM4Op) ! DECL_INST(FM4Alg3) ! DECL_INST(FM4Alg4) ! DECL_INST(FM4Alg5) ! DECL_INST(FM4Alg6) ! DECL_INST(FM4Alg8) ! DECL_INST(HeavyMtl) ! DECL_INST(PercFlut) ! DECL_INST(Rhodey) ! DECL_INST(Wurley) ! DECL_INST(TubeBell) ! DECL_INST(FMVoices) ! DECL_INST(BeeThree) ! DECL_INST(Sampler) ! DECL_INST(SamplFlt) ! DECL_INST(Moog1) ! // DECL_INST(VoicForm) ! DECL_INST(DrumSynt) ! DECL_INST(Shakers) ! DECL_INST2(Sitar1) ! DECL_INST2(StrDrone) ! else { error("No such instrument %s",s->s_name); ! } stk_instruments[i] = "LastInst"; } --- 43,82 ---- { int i = 0; ! ! x->instrument = NULL; ! DI2(Clarinet,10.0); ! DI2(BlowHole,10.0); ! DI2(Saxofony,10.0); ! DI2(Flute,10.0); ! DI2(Brass,10.0); ! DI(BlowBotl); ! DI2(Bowed,10.0); ! DI2(Plucked,5.0); ! DI2(StifKarp,5.0); ! DI2(Sitar,5.0); ! DI2(Mandolin,5.0); ! ! DI(Rhodey); ! DI(Wurley); ! DI(TubeBell); ! DI(HevyMetl); ! DI(PercFlut); ! DI(BeeThree); ! DI(FMVoices); ! ! DI(VoicForm); ! DI(Moog); ! DI(Simple); ! DI(Drummer); ! DI(BandedWG); ! DI(Shakers); ! DI(ModalBar); ! // DI2(Mesh2D,10, 10); ! DI(Resonate); ! DI(Whistle); ! ! if (!x->instrument) error("No such instrument %s",s->s_name); ! stk_instruments[i] = "LastInst"; } *************** *** 124,128 **** static void stk_control(t_stk *x,t_floatarg f1,t_floatarg f2) { ! x->instrument->controlChange(f1,f2); }
--- 124,128 ---- static void stk_control(t_stk *x,t_floatarg f1,t_floatarg f2) { ! x->instrument->controlChange((int)f1,f2); }
*************** *** 154,158 **** static void stk_pitchbend(t_stk *x,t_floatarg f1) { ! x->instrument->setFreq(f1); }
--- 154,158 ---- static void stk_pitchbend(t_stk *x,t_floatarg f1) { ! x->instrument->setFrequency(f1); }