From d62e56f4df9594f72ce501f5e19c974fd18e7295 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 22 Oct 2002 23:07:10 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r186, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=187 --- externals/grill/flext/tutorial/signal2/main.cpp | 80 +++++++++++++++++ externals/grill/flext/tutorial/signal2/signal2.cw | Bin 0 -> 104217 bytes externals/grill/flext/tutorial/signal2/signal2.dsp | 95 +++++++++++++++++++++ 3 files changed, 175 insertions(+) create mode 100644 externals/grill/flext/tutorial/signal2/main.cpp create mode 100644 externals/grill/flext/tutorial/signal2/signal2.cw create mode 100644 externals/grill/flext/tutorial/signal2/signal2.dsp (limited to 'externals/grill/flext/tutorial/signal2') diff --git a/externals/grill/flext/tutorial/signal2/main.cpp b/externals/grill/flext/tutorial/signal2/main.cpp new file mode 100644 index 00000000..1517b536 --- /dev/null +++ b/externals/grill/flext/tutorial/signal2/main.cpp @@ -0,0 +1,80 @@ +/* +flext tutorial - signal 2 + +Copyright (c) 2002 Thomas Grill (xovo@gmx.net) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +------------------------------------------------------------------------- + +This is an object showing varous parameters of the pd audio system +*/ + +// include flext header +#include + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 300) +#error You need at least flext version 0.3.0 +#endif + + +// define the class that stands for a pd/Max object +// Attention: the class name must be the same as the object name!! (without the ~) + +class signal2: + // inherit from flext dsp class + public flext_dsp +{ + // obligatory flext header (class name,base class name) + FLEXT_HEADER(signal2,flext_dsp) + +public: + // constructor + signal2(); + +protected: + void m_bang(); // method for bang + + // this virtual function is obligatory for objects derived from flext_dsp + virtual void m_signal(int n, float *const *in, float *const *out); + +private: + FLEXT_CALLBACK(m_bang); // callback for method "m_bang" +}; + +// instantiate the class +FLEXT_NEW_DSP("signal2~",signal2) + + +signal2::signal2() +{ + // define inlets: + // first inlet must always by of type anything (or signal for dsp objects) + AddInAnything(); // add one inlet for any message + + // add outlets for sample rate, block size, audio in and out channel count + AddOutFloat(1); + AddOutInt(3); // although PD knows no int type, flext does! + + // set up inlets and outlets - obligatory! + SetupInOut(); + + // register methods + FLEXT_ADDBANG(0,m_bang); // register method "m_bang" for bang message into inlet 0 +} + +void signal2::m_bang() +{ + // output various parameters of the pd audio system + ToOutFloat(0,Samplerate()); + ToOutInt(1,Blocksize()); + ToOutInt(2,ChannelsIn()); + ToOutInt(3,ChannelsOut()); +} + +void signal2::m_signal(int, float *const *, float *const *) +{ + // do no dsp work +} + diff --git a/externals/grill/flext/tutorial/signal2/signal2.cw b/externals/grill/flext/tutorial/signal2/signal2.cw new file mode 100644 index 00000000..a7b29ba3 Binary files /dev/null and b/externals/grill/flext/tutorial/signal2/signal2.cw differ diff --git a/externals/grill/flext/tutorial/signal2/signal2.dsp b/externals/grill/flext/tutorial/signal2/signal2.dsp new file mode 100644 index 00000000..c70ae670 --- /dev/null +++ b/externals/grill/flext/tutorial/signal2/signal2.dsp @@ -0,0 +1,95 @@ +# Microsoft Developer Studio Project File - Name="signal2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=signal2 - Win32 Debug +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "signal2.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "signal2.mak" CFG="signal2 - Win32 Debug" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "signal2 - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "signal2 - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "max/flext/tutorial/signal2" +# PROP Scc_LocalPath "." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "signal2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "msvc" +# PROP Intermediate_Dir "msvc" +# 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 /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /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" +# ADD RSC /l 0xc07 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../msvc/signal2~.dll" /libpath:"..\..\pd-msvc" + +!ELSEIF "$(CFG)" == "signal2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "msvc-debug" +# PROP Intermediate_Dir "msvc-debug" +# 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 /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /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" +# ADD RSC /l 0xc07 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# 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 flext_d-pdwin.lib /nologo /dll /debug /machine:I386 /out:"msvc-debug/signal2~.dll" /pdbtype:sept /libpath:"..\..\pd-msvc" + +!ENDIF + +# Begin Target + +# Name "signal2 - Win32 Release" +# Name "signal2 - Win32 Debug" +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# End Target +# End Project -- cgit v1.2.1