Skip to content

Commit

Permalink
new max implementation based on new max-api
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechnobear committed Jan 28, 2017
1 parent 941267e commit a901f26
Show file tree
Hide file tree
Showing 13 changed files with 538 additions and 474 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "mec-max/source/max-api"]
path = mec-max/source/max-api
url = https://github.com/Cycling74/max-api.git
10 changes: 5 additions & 5 deletions mec-api/devices/eigenharp/picross/src/pic_usb_macosx.cpp
Expand Up @@ -298,7 +298,7 @@ namespace
static void __finder(void *impl_, IOUSBDeviceInterface197 **device)
{
__finderdata *f = (__finderdata *)impl_;
unsigned int dl;
UInt32 dl;

(*device)->GetLocationID(device,&dl);

Expand Down Expand Up @@ -1780,7 +1780,7 @@ void pic::usbenumerator_t::impl_t::device_attached(void *impl_, io_iterator_t i)
IOCFPlugInInterface **plug;
IOUSBDeviceInterface **device;
char name[10];
unsigned int location;
UInt32 location;

while((s=IOIteratorNext(i)))
{
Expand All @@ -1800,7 +1800,7 @@ void pic::usbenumerator_t::impl_t::device_attached(void *impl_, io_iterator_t i)
continue;
}
(*device)->GetLocationID(device,&location);
sprintf(name,"%08x",location);
sprintf(name,"%08x",(unsigned int) location);

notify_context_t *n = new notify_context_t(impl,name);
e=IOServiceAddInterestNotification(impl->notification_port_,s,kIOGeneralInterest,&notify_context_t::notify,n,&(n->obj_));
Expand All @@ -1827,10 +1827,10 @@ void pic::usbenumerator_t::impl_t::device_attached(void *impl_, io_iterator_t i)
static void _enumerate_visitor_(void *callback_, IOUSBDeviceInterface197 **device)
{
char buffer[10];
unsigned int name;
UInt32 name;

(*device)->GetLocationID(device,&name);
sprintf(buffer,"%08x",name);
sprintf(buffer,"%08x",(unsigned int) name);

try
{
Expand Down
2 changes: 2 additions & 0 deletions mec-api/devices/push2/push2lib/CMakeLists.txt
Expand Up @@ -6,6 +6,8 @@ set(PUSH_DRIVER_SOURCES

add_library(mec-push2 SHARED ${PUSH_DRIVER_SOURCES})

find_library(LIBUSB_LIB NAME libusb)

target_link_libraries(mec-push2 libusb)

if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
Expand Down
3 changes: 0 additions & 3 deletions mec-max/.gitmodules

This file was deleted.

47 changes: 47 additions & 0 deletions mec-max/max/mec-max-demo/mec-max-demo.maxproj
@@ -0,0 +1,47 @@
{
"name" : "mec-max-demo",
"version" : 1,
"creationdate" : -726495322,
"modificationdate" : -726489057,
"viewrect" : [ 25.0, 70.0, 300.0, 500.0 ],
"autoorganize" : 1,
"hideprojectwindow" : 0,
"showdependencies" : 1,
"autolocalize" : 0,
"contents" : {
"patchers" : {
"demo.maxpat" : {
"kind" : "patcher",
"local" : 1,
"toplevel" : 1
}

}
,
"externals" : {

}

}
,
"layout" : {

}
,
"searchpath" : {
"0" : {
"bootpath" : "~/Projects/MEC/mec-max/externals",
"projectrelativepath" : "../../externals",
"label" : "",
"recursive" : 1,
"enabled" : 1
}

}
,
"detailsvisible" : 0,
"amxdtype" : 1633771873,
"readonly" : 0,
"devpathtype" : 0,
"devpath" : "."
}
149 changes: 149 additions & 0 deletions mec-max/max/mec-max-demo/patchers/demo.maxpat
@@ -0,0 +1,149 @@
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 7,
"minor" : 3,
"revision" : 1,
"architecture" : "x64",
"modernui" : 1
}
,
"rect" : [ 386.0, 613.0, 640.0, 480.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 1,
"gridsize" : [ 15.0, 15.0 ],
"gridsnaponopen" : 1,
"objectsnaponopen" : 1,
"statusbarvisible" : 2,
"toolbarvisible" : 1,
"lefttoolbarpinned" : 0,
"toptoolbarpinned" : 0,
"righttoolbarpinned" : 0,
"bottomtoolbarpinned" : 0,
"toolbars_unpinned_last_save" : 0,
"tallnewobj" : 0,
"boxanimatetime" : 200,
"enablehscroll" : 1,
"enablevscroll" : 1,
"devicewidth" : 0.0,
"description" : "",
"digest" : "",
"tags" : "",
"style" : "",
"subpatcher_template" : "",
"boxes" : [ {
"box" : {
"id" : "obj-6",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 153.0, 365.0, 395.0, 22.0 ],
"style" : ""
}

}
, {
"box" : {
"id" : "obj-3",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 255.0, 214.0, 100.0, 22.0 ],
"style" : "",
"text" : "mec-max"
}

}
, {
"box" : {
"id" : "obj-4",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 243.0, 102.0, 50.0, 22.0 ],
"style" : "",
"text" : "error"
}

}
, {
"box" : {
"id" : "obj-1",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 169.0, 138.0, 50.0, 22.0 ],
"style" : "",
"text" : "start"
}

}
, {
"box" : {
"id" : "obj-2",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 377.0, 109.0, 50.0, 22.0 ],
"style" : "",
"text" : "stop"
}

}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-1", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-2", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-6", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-3", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-4", 0 ]
}

}
],
"dependency_cache" : [ {
"name" : "mec-max.mxo",
"type" : "iLaX"
}
],
"autosave" : 0
}

}
14 changes: 7 additions & 7 deletions mec-max/package-info.json.in
@@ -1,9 +1,9 @@
{
"author" : "Cycling '74",
"description" : "Lightweight reference implementation of a package built around the core Max-API.",
"homepatcher" : "max-devkit.maxpat",
"author" : "Mark Harris",
"description" : "MEC for MAX",
"homepatcher" : "mecdemo.maxpat",
"max_version_min" : "7.1",
"name" : "max-devkit",
"name" : "mec-max",
"os" : {
"macintosh" : {
"platform" : [ "ia32", "x64" ],
Expand All @@ -15,10 +15,10 @@
}
},
"package_extra" : {
"reverse_domain" : "com.cycling74",
"copyright" : "Copyright (c) 2016 Cycling '74"
"reverse_domain" : "com.technobear",
"copyright" : "TheTechnobear"
},
"tags" : [ ],
"version" : "@GIT_VERSION_MAJ@.@GIT_VERSION_MIN@.@GIT_VERSION_SUB@",
"website" : "http://www.github.com/Cycling74/max-devkit"
"website" : "http://www.github.com/TheTechnobear/MEC"
}
1 change: 1 addition & 0 deletions mec-max/source/max-api
Submodule max-api added at 54fc0c
21 changes: 20 additions & 1 deletion mec-max/source/projects/mec-max/CMakeLists.txt
Expand Up @@ -6,15 +6,34 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../../max-api/script/max-pretarget.cmake)

include_directories(
"${C74_INCLUDES}"
"../../../../mec-api"
)

link_directories(../../../../build/release/lib)



add_library(
${PROJECT_NAME}
MODULE
${PROJECT_NAME}.c
${PROJECT_NAME}.cpp
)



SET(CMAKE_SKIP_BUILD_RPATH TRUE)
# SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/Frameworks")
# SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

target_link_libraries(${PROJECT_NAME} mec-api)

message( STATUS "install ${INSTALL_NAME_DIR} ")

include(${CMAKE_CURRENT_SOURCE_DIR}/../../max-api/script/max-posttarget.cmake)




# set(CMAKE_INSTALL_RPATH "/Users/kodiak/Projects/MEC/build/release/lib")


0 comments on commit a901f26

Please sign in to comment.