Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion examples/max/example.cpp → example-max/example.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "maxcpp6.h"
#include "../maxcpp/maxcpp6.h"

class Example : public MaxCpp6<Example> {
public:
Expand All @@ -11,6 +11,15 @@ class Example : public MaxCpp6<Example> {
void bang(long inlet) {
outlet_bang(m_outlets[0]);
}

void assist(void *b, long m, long a, char *s) //inlet-outlet assistant
{
if (m == ASSIST_INLET) // inlet
sprintf(s, "input %i", a);
else // outlet
sprintf(s, "output");
}

void testfloat(long inlet, double v) {
outlet_float(m_outlets[0], v);
}
Expand All @@ -26,6 +35,7 @@ C74_EXPORT int main(void) {
// create a class with the given name:
Example::makeMaxClass("example");
REGISTER_METHOD(Example, bang);
REGISTER_METHOD_ASSIST(Example, assist);
REGISTER_METHOD_FLOAT(Example, testfloat);
REGISTER_METHOD_LONG(Example, testint);
REGISTER_METHOD_GIMME(Example, test);
Expand Down
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions example-max/example.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RVdtw", "example.vcxproj", "{73069FC3-D989-47DB-B15F-625703EED4DA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{73069FC3-D989-47DB-B15F-625703EED4DA}.Debug|Win32.ActiveCfg = Debug|Win32
{73069FC3-D989-47DB-B15F-625703EED4DA}.Debug|Win32.Build.0 = Debug|Win32
{73069FC3-D989-47DB-B15F-625703EED4DA}.Debug|x64.ActiveCfg = Debug|x64
{73069FC3-D989-47DB-B15F-625703EED4DA}.Debug|x64.Build.0 = Debug|x64
{73069FC3-D989-47DB-B15F-625703EED4DA}.Release|Win32.ActiveCfg = Release|Win32
{73069FC3-D989-47DB-B15F-625703EED4DA}.Release|Win32.Build.0 = Release|Win32
{73069FC3-D989-47DB-B15F-625703EED4DA}.Release|x64.ActiveCfg = Release|x64
{73069FC3-D989-47DB-B15F-625703EED4DA}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
363 changes: 363 additions & 0 deletions example-max/example.vcxproj

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions example-max/example.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
File renamed without changes.
363 changes: 363 additions & 0 deletions example-msp/example.vcxproj

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions example-msp/example.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
12 changes: 10 additions & 2 deletions examples/msp/example~.cpp → example-msp/example~.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "maxcpp6.h"
#include "../maxcpp/maxcpp6.h"

// inherit from the MSP base class, template-specialized for myself:

Expand All @@ -18,6 +18,13 @@ class Example : public MspCpp6<Example> {
void bang(long inlet) {
post("bang in inlet %i!", inlet);
}

void assist(void *b, long m, long a, char *s) { //inlet-outlet assistant
if (m == ASSIST_INLET) // inlet
sprintf(s, "input %i", a);
else // outlet
sprintf(s, "output");
}
void test(long inlet, t_symbol * s, long ac, t_atom * av) {
post("%s in inlet %i (%i args)", s->s_name, inlet, ac);
}
Expand Down Expand Up @@ -46,5 +53,6 @@ C74_EXPORT int main(void) {
// create a class with the given name:
Example::makeMaxClass("example~");
REGISTER_METHOD(Example, bang);
REGISTER_METHOD_ASSIST(Example, assist);
REGISTER_METHOD_GIMME(Example, test);
}
}
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions example-msp/example~.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RVdtw", "example.vcxproj", "{73069FC3-D989-47DB-B15F-625703EED4DA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{73069FC3-D989-47DB-B15F-625703EED4DA}.Debug|Win32.ActiveCfg = Debug|Win32
{73069FC3-D989-47DB-B15F-625703EED4DA}.Debug|Win32.Build.0 = Debug|Win32
{73069FC3-D989-47DB-B15F-625703EED4DA}.Debug|x64.ActiveCfg = Debug|x64
{73069FC3-D989-47DB-B15F-625703EED4DA}.Debug|x64.Build.0 = Debug|x64
{73069FC3-D989-47DB-B15F-625703EED4DA}.Release|Win32.ActiveCfg = Release|Win32
{73069FC3-D989-47DB-B15F-625703EED4DA}.Release|Win32.Build.0 = Release|Win32
{73069FC3-D989-47DB-B15F-625703EED4DA}.Release|x64.ActiveCfg = Release|x64
{73069FC3-D989-47DB-B15F-625703EED4DA}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
3 changes: 3 additions & 0 deletions example-msp/example~.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
File renamed without changes.
26 changes: 0 additions & 26 deletions examples/max/example.sln

This file was deleted.

Loading