diff options
Diffstat (limited to 'externals/grill/flext/tutorial')
-rw-r--r-- | externals/grill/flext/tutorial/pd/ex-stk2.pd | 9 | ||||
-rw-r--r-- | externals/grill/flext/tutorial/stk1/stk1.dsp | 8 | ||||
-rw-r--r-- | externals/grill/flext/tutorial/stk2/main.cpp | 18 | ||||
-rw-r--r-- | externals/grill/flext/tutorial/stk2/stk2.dsp | 8 |
4 files changed, 25 insertions, 18 deletions
diff --git a/externals/grill/flext/tutorial/pd/ex-stk2.pd b/externals/grill/flext/tutorial/pd/ex-stk2.pd index 2a4e8ed3..fff665b9 100644 --- a/externals/grill/flext/tutorial/pd/ex-stk2.pd +++ b/externals/grill/flext/tutorial/pd/ex-stk2.pd @@ -1,11 +1,11 @@ -#N canvas 245 28 590 384 12;
+#N canvas 245 28 592 386 12;
#X obj 68 318 dac~;
#X obj 15 8 cnv 15 550 40 empty empty stk2 10 22 0 24 -260818 -1 0
;
#X text 175 28 http://www.parasitaere-kapazitaeten.net;
#X text 193 229 adjust the volume;
#X obj 194 212 hsl 128 15 0.01 1 1 0 empty empty empty -2 -6 0 8 -261681
--1 -1 0 1;
+-1 -1 9000 1;
#X obj 68 263 *~ 0.3;
#X text 175 8 flext tutorial \, (C)2002-2003 Thomas Grill;
#X obj 68 215 stk2~;
@@ -13,13 +13,14 @@ #X msg 183 139 shL \$1;
#X msg 241 139 shR \$1;
#X obj 267 77 hsl 128 15 0.5 2 1 0 empty empty empty -2 -6 0 8 -261681
--1 -1 0 1;
+-1 -1 5700 1;
#X obj 267 95 hsl 128 15 0.5 2 1 0 empty empty empty -2 -6 0 8 -261681
--1 -1 0 1;
+-1 -1 9300 1;
#X text 172 73 pitch left;
#X text 172 93 pitch right;
#X obj 68 78 osc~ 442;
#X connect 4 0 5 1;
+#X connect 4 0 8 1;
#X connect 5 0 0 0;
#X connect 7 0 5 0;
#X connect 7 1 8 0;
diff --git a/externals/grill/flext/tutorial/stk1/stk1.dsp b/externals/grill/flext/tutorial/stk1/stk1.dsp index 2be3c776..ae960092 100644 --- a/externals/grill/flext/tutorial/stk1/stk1.dsp +++ b/externals/grill/flext/tutorial/stk1/stk1.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\source" /I "f:\prog\packs\sndobj\include" /I "f:\prog\packs\stk\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "FLEXT_THREADS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\source" /I "f:\prog\audio\stk\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "FLEXT_THREADS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0xc07 /d "NDEBUG" @@ -53,7 +53,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib pd.lib pthreadVC.lib flext_t-pdwin.lib stk.lib /nologo /dll /machine:I386 /out:"../pd-msvc/stk1~.dll" /libpath:"..\..\pd-msvc" /libpath:"f:\prog\packs\stk\lib" +# ADD LINK32 kernel32.lib user32.lib pd.lib pthreadVC.lib flext_t-pdwin.lib stk.lib /nologo /dll /machine:I386 /out:"../pd-msvc/stk1~.dll" /libpath:"..\..\pd-msvc" /libpath:"f:\prog\audio\stk\lib" !ELSEIF "$(CFG)" == "stk1 - Win32 Debug" @@ -69,7 +69,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\source" /I "f:\prog\packs\sndobj\include" /I "f:\prog\packs\stk\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "FLEXT_THREADS" /Fr /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\source" /I "f:\prog\audio\stk\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "FLEXT_THREADS" /Fr /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0xc07 /d "_DEBUG" @@ -79,7 +79,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib pd.lib pthreadVC.lib flext_td-pdwin.lib stk_d.lib /nologo /dll /debug /machine:I386 /out:"msvc-debug/stk1~.dll" /pdbtype:sept /libpath:"..\..\pd-msvc" /libpath:"f:\prog\packs\stk\lib" +# ADD LINK32 kernel32.lib user32.lib pd.lib pthreadVC.lib flext_td-pdwin.lib stk_d.lib /nologo /dll /debug /machine:I386 /out:"msvc-debug/stk1~.dll" /pdbtype:sept /libpath:"..\..\pd-msvc" /libpath:"f:\prog\audio\stk\lib" !ENDIF diff --git a/externals/grill/flext/tutorial/stk2/main.cpp b/externals/grill/flext/tutorial/stk2/main.cpp index 5d6cb72c..bb440c91 100644 --- a/externals/grill/flext/tutorial/stk2/main.cpp +++ b/externals/grill/flext/tutorial/stk2/main.cpp @@ -45,6 +45,7 @@ public: virtual void ProcessObjs(int n); // do DSP processing PitShift *inst[2]; + MY_FLOAT *vec; private: static void Setup(t_class *c); @@ -76,10 +77,13 @@ bool stk2::NewObjs() { bool ok = true; - // set up objects try { + // set up objects for(int i = 0; i < 2; ++i) inst[i] = new PitShift; + + // reserve one signal vector too + vec = new MY_FLOAT[Blocksize()]; } catch (StkError &) { post("%s - Noise() setup failed!",thisName()); @@ -94,16 +98,18 @@ void stk2::FreeObjs() { for(int i = 0; i < 2; ++i) if(inst[i]) delete inst[i]; + if(vec) delete[] vec; } // this is called on every DSP block void stk2::ProcessObjs(int n) { - while(n--) { - MY_FLOAT f = Inlet(0).tick(); - for(int i = 0; i < 2; ++i) - Outlet(i).tick(inst[i]->tick(f)); - } + for(int i = 0; i < 2; ++i) + Outlet(i).tick( + inst[i]->tick( + Inlet(0).tick(vec,n) + ,n) + ,n); } diff --git a/externals/grill/flext/tutorial/stk2/stk2.dsp b/externals/grill/flext/tutorial/stk2/stk2.dsp index 8ace2bf9..26cba580 100644 --- a/externals/grill/flext/tutorial/stk2/stk2.dsp +++ b/externals/grill/flext/tutorial/stk2/stk2.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\source" /I "f:\prog\packs\sndobj\include" /I "f:\prog\packs\stk\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "FLEXT_THREADS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\source" /I "f:\prog\audio\stk\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "FLEXT_THREADS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0xc07 /d "NDEBUG" @@ -53,7 +53,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib pd.lib pthreadVC.lib flext_t-pdwin.lib stk.lib /nologo /dll /machine:I386 /out:"../pd-msvc/stk2~.dll" /libpath:"..\..\pd-msvc" /libpath:"f:\prog\packs\stk\lib" +# ADD LINK32 kernel32.lib user32.lib pd.lib pthreadVC.lib flext_t-pdwin.lib stk.lib /nologo /dll /machine:I386 /out:"../pd-msvc/stk2~.dll" /libpath:"..\..\pd-msvc" /libpath:"f:\prog\audio\stk\lib" !ELSEIF "$(CFG)" == "stk2 - Win32 Debug" @@ -69,7 +69,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\source" /I "f:\prog\packs\sndobj\include" /I "f:\prog\packs\stk\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "FLEXT_THREADS" /Fr /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\source" /I "f:\prog\audio\stk\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "FLEXT_THREADS" /Fr /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0xc07 /d "_DEBUG" @@ -79,7 +79,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib pd.lib pthreadVC.lib flext_td-pdwin.lib stk_d.lib /nologo /dll /debug /machine:I386 /out:"msvc-debug/stk2~.dll" /pdbtype:sept /libpath:"..\..\pd-msvc" /libpath:"f:\prog\packs\stk\lib" +# ADD LINK32 kernel32.lib user32.lib pd.lib pthreadVC.lib flext_td-pdwin.lib stk_d.lib /nologo /dll /debug /machine:I386 /out:"msvc-debug/stk2~.dll" /pdbtype:sept /libpath:"..\..\pd-msvc" /libpath:"f:\prog\audio\stk\lib" !ENDIF |