diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2009-04-01 21:13:09 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2009-04-01 21:13:09 +0000 |
commit | 0ed7a8b68dd73e2b0473b8127aeca99f3bac9061 (patch) | |
tree | 5c67818b38a5cc2f9caa5ca7f8640ca356adf02b /externals/grill/flext/tutorial/signal1 | |
parent | bb4c7f6a245394d09dac9adfb2efb093d3d98452 (diff) |
cleaned up grill externals - replaced with svn:externals to svn.grrrr.org/ext/trunk/
svn path=/trunk/; revision=10951
Diffstat (limited to 'externals/grill/flext/tutorial/signal1')
-rw-r--r-- | externals/grill/flext/tutorial/signal1/Makefile.am | 51 | ||||
-rw-r--r-- | externals/grill/flext/tutorial/signal1/main.cpp | 129 | ||||
-rw-r--r-- | externals/grill/flext/tutorial/signal1/package.txt | 2 | ||||
-rw-r--r-- | externals/grill/flext/tutorial/signal1/signal1.mcp | bin | 101183 -> 0 bytes | |||
-rw-r--r-- | externals/grill/flext/tutorial/signal1/signal1.vcproj | 177 |
5 files changed, 0 insertions, 359 deletions
diff --git a/externals/grill/flext/tutorial/signal1/Makefile.am b/externals/grill/flext/tutorial/signal1/Makefile.am deleted file mode 100644 index 857be41e..00000000 --- a/externals/grill/flext/tutorial/signal1/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -# -# automake template -# added by tim blechmann -# - -NAME = signal1 - -BUILT_SOURCES = main.cpp - -EXTRA_DIST = main.cpp \ - $(NAME).mcp \ - $(NAME).vcproj - -CXXFLAGS = @CXXFLAGS@ \ - @OPT_FLAGS@ \ - @INCLUDEDIR@ \ - -I../../source \ - $(DEFS) \ - -DFLEXT_SHARED - -LDFLAGS = @DYNAMIC_LDFLAGS@ @LDFLAGS@ \ - $(patsubst %,-framework %,$(FRAMEWORKS)) - -LIBS = @LIBS@ -lflext-pd - -FRAMEWORKS = @FRAMEWORKS@ - -TARGETDIR = @TARGETDIR@ - -TARGET =$(NAME).@EXTENSION@ - -OBJECTS = $(patsubst %.cpp,./%.@OBJEXT@,$(BUILT_SOURCES)) - -SYSDIR = @SYSDIR@ - - -# ----------------------------- targets -------------------------------- - -all-local: $(OBJECTS) - $(CXX) $(LDFLAGS) ./*.@OBJEXT@ $(LIBS) -o ../$(TARGETDIR)/$(TARGET) - strip --strip-unneeded ../$(TARGETDIR)/$(TARGET) - -./%.@OBJEXT@ : %.cpp - $(CXX) -c $(CXXFLAGS) $< -o $@ - -clean-local: - rm -f ../$(TARGETDIR)/$(TARGET) - rm -f ./$(OBJECTS) - -install-exec-local: - install ../$(TARGET) $(SYSDIR)extra diff --git a/externals/grill/flext/tutorial/signal1/main.cpp b/externals/grill/flext/tutorial/signal1/main.cpp deleted file mode 100644 index 3714e1f6..00000000 --- a/externals/grill/flext/tutorial/signal1/main.cpp +++ /dev/null @@ -1,129 +0,0 @@ -// signal1~ - a flext tutorial external written by Frank Barknecht -// -// This is a commented port of the pan~ example from the PD-Externals-Howto to -// illustrate the usage of flext. You can get the original code at -// http://iem.kug.ac.at/pd/externals-HOWTO/ - -#include <flext.h> - -#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401) -#error You need at least flext version 0.4.1 -#endif - - -// A flext dsp external ("tilde object") inherits from the class flext_dsp -class signal1: - public flext_dsp -{ - // Each external that is written in C++ needs to use #defines - // from flbase.h - // - // The define - // - // FLEXT_HEADER(NEW_CLASS, PARENT_CLASS) - // - // should be somewhere in your dsp file. - // A good place is here: - - FLEXT_HEADER(signal1, flext_dsp) - - public: - signal1(): - f_pan(0) // initialize f_pan - { - // The constructor of your class is responsible for - // setting up inlets and outlets and for registering - // inlet-methods: - // The descriptions of the inlets and outlets are output - // via the Max/MSP assist method (when mousing over them in edit mode). - // PD will hopefully provide such a feature as well soon - - AddInSignal("left audio in"); // left audio in - AddInSignal("right audio in"); // right audio in - AddInFloat("panning parameter"); // 1 float in - AddOutSignal("audio out"); // 1 audio out - - // Now we need to bind the handler function to our - // panning inlet, which is inlet 2 (counting all inlets - // from 0). We want the function "setPan" to get - // called on incoming float messages: - - FLEXT_ADDMETHOD(2,setPan); - - // We're done constructing: - post("-- pan~ with flext ---"); - - } // end of constructor - - - protected: - // here we declare the virtual DSP function - virtual void m_signal(int n, float *const *in, float *const *out); - private: - float f_pan; // holds our panning factor - - // Before we can use "setPan" as a handler, we must register this - // function as a callback to PD or Max. This is done using the - // FLEXT_CALLBACK* macros. There are several of them. - // - // FLEXT_CALLBACK_F is a shortcut, that registers a function - // expecting one float arg (thus ending in "_F"). There are - // other shortcuts that register other types of functions. Look - // into flext.h. No semicolon at the end of line!!! - FLEXT_CALLBACK_F(setPan) - - // Now setPan can get declared and defined here. - void setPan(float f) - { - // set our private panning factor "f_pan" to the inlet - // value float "f" in the intervall [0,1] - f_pan = (f<0) ? 0.0f : (f>1) ? 1.0f : f ; - - // if you want to debug if this worked, comment out the - // following line: - //post("Set panning to %.2f, maybe clipped from %.2f", f_pan,f); - } // end setPan -}; // end of class declaration for signal1 - - -// Before we can run our signal1-class in PD, the object has to be registered as a -// PD object. Otherwise it would be a simple C++-class, and what good would -// that be for? Registering is made easy with the FLEXT_NEW_* macros defined -// in flext.h. For tilde objects without arguments call: - -FLEXT_NEW_DSP("signal1~ pan~", signal1) -// T.Grill: there are two names for the object: signal1~ as main name and pan~ as its alias - -// Now we define our DSP function. It gets this arguments: -// -// int n: length of signal vector. Loop over this for your signal processing. -// float *const *in, float *const *out: -// These are arrays of the signals in the objects signal inlets rsp. -// oulets. We come to that later inside the function. - -void signal1::m_signal(int n, float *const *in, float *const *out) -{ - - const float *ins1 = in[0]; - const float *ins2 = in[1]; - // As said above "in" holds a list of the signal vectors in all inlets. - // After these two lines, ins1 holds the signal vector ofthe first - // inlet, index 0, and ins2 holds the signal vector of the second - // inlet, with index 1. - - float *outs = out[0]; - // Now outs holds the signal vector at the one signal outlet we have. - - // We are now ready for the main signal loop - while (n--) - { - - // The "++" after the pointers outs, ins1 and ins2 walks us - // through the signal vector with each n, of course. Before - // each step we change the signal value in the outlet *outs - // according to our panning factor "f_pan" and according to the - // signals at the two signal inlets, *ins1 and *ins2 - - *outs++ = (*ins1++) * (1-f_pan) + (*ins2++) * f_pan; - } -} // end m_signal diff --git a/externals/grill/flext/tutorial/signal1/package.txt b/externals/grill/flext/tutorial/signal1/package.txt deleted file mode 100644 index b4861858..00000000 --- a/externals/grill/flext/tutorial/signal1/package.txt +++ /dev/null @@ -1,2 +0,0 @@ -NAME=signal1~
-SRCS=main.cpp
diff --git a/externals/grill/flext/tutorial/signal1/signal1.mcp b/externals/grill/flext/tutorial/signal1/signal1.mcp Binary files differdeleted file mode 100644 index 32e82771..00000000 --- a/externals/grill/flext/tutorial/signal1/signal1.mcp +++ /dev/null diff --git a/externals/grill/flext/tutorial/signal1/signal1.vcproj b/externals/grill/flext/tutorial/signal1/signal1.vcproj deleted file mode 100644 index 136003b7..00000000 --- a/externals/grill/flext/tutorial/signal1/signal1.vcproj +++ /dev/null @@ -1,177 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="signal1" - SccProjectName="max/flext/tutorial/signal1" - SccAuxPath="" - SccLocalPath="." - SccProvider="MSSCCI:Jalindi Igloo"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Release|Win32" - OutputDirectory=".\msvc" - IntermediateDirectory=".\msvc" - ConfigurationType="2" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PD" - StringPooling="TRUE" - RuntimeLibrary="4" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile=".\msvc/signal1.pch" - AssemblerListingLocation=".\msvc/" - ObjectFile=".\msvc/" - ProgramDataBaseFileName=".\msvc/" - WarningLevel="3" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="pd.lib flext-pdwin.lib" - OutputFile="../pd-msvc/signal1~.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="..\..\pd-msvc" - ProgramDatabaseFile=".\msvc/signal1~.pdb" - ImportLibrary=".\msvc/signal1~.lib" - TargetMachine="1"/> - <Tool - Name="VCMIDLTool" - PreprocessorDefinitions="NDEBUG" - MkTypLibCompatible="TRUE" - SuppressStartupBanner="TRUE" - TargetEnvironment="1" - TypeLibraryName=".\msvc/signal1.tlb" - HeaderFileName=""/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="3079"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\msvc-debug" - IntermediateDirectory=".\msvc-debug" - ConfigurationType="2" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="c:\programme\audio\pd\src,..\..\source" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PD" - BasicRuntimeChecks="3" - RuntimeLibrary="5" - UsePrecompiledHeader="2" - PrecompiledHeaderFile=".\msvc-debug/signal1.pch" - AssemblerListingLocation=".\msvc-debug/" - ObjectFile=".\msvc-debug/" - ProgramDataBaseFileName=".\msvc-debug/" - BrowseInformation="1" - BrowseInformationFile=".\msvc-debug/" - WarningLevel="3" - SuppressStartupBanner="TRUE" - DebugInformationFormat="4" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="pd.lib flext_d-pdwin.lib" - OutputFile="msvc-debug/signal1~.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="..\..\pd-msvc" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile=".\msvc-debug/signal1~.pdb" - ImportLibrary=".\msvc-debug/signal1~.lib" - TargetMachine="1"/> - <Tool - Name="VCMIDLTool" - PreprocessorDefinitions="_DEBUG" - MkTypLibCompatible="TRUE" - SuppressStartupBanner="TRUE" - TargetEnvironment="1" - TypeLibraryName=".\msvc-debug/signal1.tlb" - HeaderFileName=""/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="3079"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <File - RelativePath="main.cpp"> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PD;$(NoInherit)" - BasicRuntimeChecks="3" - BrowseInformation="1"/> - </FileConfiguration> - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> |