Skip to content

Commit

Permalink
initial commit of max-devkit clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Wolek authored and Nathan Wolek committed May 16, 2017
0 parents commit dbfdfc5
Show file tree
Hide file tree
Showing 19 changed files with 1,410 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sysbuild
*.sdf
*.suo
*.sln
*.opensdf
log.txt
externals
support
build
*.o
*.dylib
tmp

package-info.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "source/max-api"]
path = source/max-api
url = https://github.com/Cycling74/max-api.git
47 changes: 47 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
language:
- objective-c
- c++

compiler:
- clang

sudo: false
os: osx
osx_image: xcode7.3

script:
- mkdir build
- cd build
- cmake -G Xcode ..
- cmake --build . --config Release
- cd ..
- PACKAGE_NAME=`echo $TRAVIS_REPO_SLUG | sed 's/.*\///g'`
- PACKAGE_REV=`echo $TRAVIS_COMMIT | sed -e 's/^[[:alnum:]]\{6\}/&-/g' | sed 's/-.*//'`
- mkdir $PACKAGE_NAME
- if [ -e *.json ]; then cp *.json $PACKAGE_NAME; fi
- if [ -e *.md ]; then cp *.json $PACKAGE_NAME; fi
- if [ -e *.png ]; then cp *.json $PACKAGE_NAME; fi
- if [ -d docs ]; then cp -r docs $PACKAGE_NAME; fi
- if [ -d externals ]; then cp -r externals $PACKAGE_NAME; fi
- if [ -d extras ]; then cp -r extras $PACKAGE_NAME; fi
- if [ -d help ]; then cp -r help $PACKAGE_NAME; fi
- if [ -d init ]; then cp -r init $PACKAGE_NAME; fi
- if [ -d javascript ]; then cp -r javascript $PACKAGE_NAME; fi
- if [ -d media ]; then cp -r media $PACKAGE_NAME; fi
- if [ -d misc ]; then cp -r misc $PACKAGE_NAME; fi
- if [ -d patchers ]; then cp -r help $PACKAGE_NAME; fi
- mkdir dist
- zip -r dist/$PACKAGE_NAME-$PACKAGE_REV.zip $PACKAGE_NAME

deploy:
provider: s3
access_key_id: AKIAIWE3SI2TMXC5AJBA
secret_access_key:
secure: wQAmebCgHvllRBx9Qf1k1aA0m+fcA+Kpmh/U1YKjMVALQkQd9fxC+hCo/BivmX9V2UghARXTstJLlpgqCro/x5ZvF3yrO1T4DWp3/QYEMeqPT6Oc4FXZM2M0VyEcHA16SsgKS9iZus+33u7WIQNszA418Z7doZyaShdYIALp1qSjWBATjoHKmMX7ObJYf3JETANilriJ5D/aVgKYBKt1Zi0HeM5xL/Zgdop+yHmeoAQwtqbFNCE0lpDVTsukVTuS4/I9CGga4Efv6AHKfZEhppWXbm4U+MnBKCWBdJqIlie5JgdJRnN5yVtY+oNGwNpvaSypR1v9KC+2vK4HCA7BMYX3oLQQHZK/IfrUNECSkKP653nVrvTSAkhM8vHRUl+M1GNVXBDn8dWk/FZ9xe06QY1Oqt9C/eK+BCHPdC6XFKeVc27QpawPaDW+DKnLqsIUumew95BcTAOz6JeaZ8tAkXjeXyr10feLiWwhNdw9KJJ+LJjwHyc07DMTELRFZ6NIDjE17rc58mTR0h078p9zu4vXcmmR8HVmJRGiAvZ9yG4YM3le1ziTmKRD3zH4BpLhYVkYF6A2Tx3aYt3s5MitlrAzvEHZRXw4vfoLfEGti40SqHOxoETT1/9VCv7zhkMr1xnDPGIgcRULByxxVwzZnmlTIi2BVVC0QuSCto4CRy8=
bucket: cycling74-ci
skip_cleanup: true
local-dir: dist
upload-dir: max-devkit
acl: public_read
on:
repo: Cycling74/max-devkit
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.0)

# Fetch the correct verion of the max-api
message(STATUS "Updating Git Submodules")
execute_process(
COMMAND git submodule update --init --recursive
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)


# Misc setup and subroutines
include(${CMAKE_CURRENT_SOURCE_DIR}/source/max-api/script/max-package.cmake)


# Generate a project for every folder in the "source/projects" folder
SUBDIRLIST(PROJECT_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/source/projects)
foreach (project_dir ${PROJECT_DIRS})
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/source/projects/${project_dir}/CMakeLists.txt")
message("Generating: ${project_dir}")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/source/projects/${project_dir})
endif ()
endforeach ()
11 changes: 11 additions & 0 deletions License.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The software to which this license pertains is the Max API that consists of the C/C++ language header files and source code examples contained within this archive.

The MIT License

Copyright (c) 2016, Cycling '74

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
91 changes: 91 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Max-DevKit
[![Build Status](https://travis-ci.org/Cycling74/max-devkit.svg?branch=master)](https://travis-ci.org/Cycling74/max-devkit)
[![Build status](https://ci.appveyor.com/api/projects/status/4u6n0eseaemdp2t5?svg=true)](https://ci.appveyor.com/project/tap/max-devkit)


Tools, documentation, and reference implementation of a Max Package built using the Max-API.

For full backwards compatibility or additional functionality, the [legacy Max SDK](https://github.com/Cycling74/max-sdk) may provide an alternate path for those wishing to create their own package including Max external objects written in C/C++.

## Structure

There are two levels of material included in the Max-DevKit package. The outer level is a Max package folder named, appropriately, "max-devkit". The inner level is a folder called "max-api".

* `max-devkit` is an example package following current best-practices package creation.
* `max-api` is a folder containing all of the support files you will need to compile an external object written in C/C++. This folder you will include in your own package's source folder.


## Prerequisites

To build the externals in this package you will need some form of compiler support on your system.

* On the Mac this means Xcode (you can get from the App Store for free).
* On Windows this most likely means some version of Visual Studio (the free versions should work fine).

You will also need to install [CMake](https://cmake.org/download/).


## Building

0. Get the code from Github, or download a zip and unpack it into a folder.
1. In the Terminal or Console app of your choice, change directories (cd) into the folder you created in step 0.
2. `mkdir build` to create a folder with your various build files
3. `cd build` to put yourself into that folder
4. Now you can generate the projects for your choosen build environment:

### Mac

You can build on the command line using Makefiles, or you can generate an Xcode project and use the GUI to build.

* Xcode: Run `cmake -G Xcode ..` and then run `cmake --build .` or open the Xcode project from this "build" folder and use the GUI.
* Make: Run `cmake ..` and then run `cmake --build .` or `make`. Note that the Xcode project is preferrable because it is able substitute values for e.g. the Info.plist files in your builds.

### Windows

The exact command line you use will depend on what version of Visual Studio you have installed. You can run `cmake --help` to get a list of the options available. Assuming some version of Visual Studio 2013, the commands to generate the projects will look like this:

* 32 bit: `cmake -G "Visual Studio 12" ..`
* 64 bit: `cmake -G "Visual Studio 12 Win64" -DWIN64:Bool=True ..`

Having generated the projects, you can now build by opening the .sln file in the build folder with the Visual Studio app (just double-click the .sln file) or you can build on the command line like this:

`cmake --build . --config Release`


## Testing

It is highly recommended that you test your code thoroughly. One option is use the [max-test](https://github.com/Cycling74/max-test) package.

## Continuous Integration

Continuous Integration (CI) is...

The Max-DevKit project models CI using two different services, both of which are free and very easy to set up if your project is hosted publically on Github.

* **Mac**: go to http://travis-ci.org and sign up. If your repository follows the same model as Max-DevKit, you can copy `.travis.yml` directly with no changes. Now every push to your repository will trigger an automatic build for the Mac with Travis CI.
* **Windows**: go to http://appveyor.com and sign up. If your repository follows the same model as Max-DevKit, you can copy `appveyor.yml` directly with no changes. Now every push to your repository will trigger automatic builds for both 32 and 64-bit Windows with Appveyor.

### Fetching your builds

* **Windows**: On Appveyor it is simple. You go to the latest build, choose the "Platform" and then look under the "Artifacts" tab.
* **Mac**: Travis CI does not host your build files for you like Appveyor. Instead, you need to configure a place for Travis to upload your builds. This is most easily done by signing up for a [free Amazon Web Services account](http://aws.amazon.com/free/).

#### S3 Integration

The builds from Travis for this package can be found on [this S3-hosted page](https://s3-us-west-2.amazonaws.com/cycling74-ci/index.html?prefix=max-devkit/).

To setup your own page:

0. Sign up for a free AWS account as mentioned above
1. Create a "bucket" for your Travis builds
2. Add the correct info to your `.travis.yml` file for your S3 bucket as described in the [Travis S3 Documentation](https://docs.travis-ci.com/user/deployment/s3).
3. At this point, builds should go from Travis to a folder in your S3 bucket.
4. To access the build, you can log in to your S3 account and download it. Alternatively you may want to make your builds publically available. If you wish to do the later, read on...
5. upload the files from this folder's `source/max-api/site` folder to your S3 bucket's root folder. For more information on the content of these files, please visit the Github page for the [S3 Bucket Listing Code](https://github.com/rgrp/s3-bucket-listing).
6. As described on the above Github page, you will need to set the permissions for your bucket such that "Everyone" has both `listing` and `viewing` access.


## Support

For support, please use the developer forums at:
http://cycling74.com/forums/
35 changes: 35 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#version: '7.2.0.{build}'

environment:
CMAKE_PATH: $(APPVEYOR_BUILD_FOLDER)\cmake-3.4.1-win32-x86
VS_VERSION: "Visual Studio 12"

configuration: Release
shallow_clone: false

platform:
- x86
- x64

build_script:
- if "%platform%" == "x86" SET VS_FULL=%VS_VERSION%
- if "%platform%" == "x86" SET CUSTOM_FLAG=""
- if "%platform%" == "x64" SET VS_FULL=%VS_VERSION% Win64
- if "%platform%" == "x64" SET CUSTOM_FLAG="-DWIN64:Bool=True"
- mkdir build
- cd build
- cmake -G "%VS_FULL%" %CUSTOM_FLAG% .. > %APPVEYOR_BUILD_FOLDER%\configure.log
- cmake --build . --config Release > %APPVEYOR_BUILD_FOLDER%\build.log
- cd ..
- mkdir %APPVEYOR_PROJECT_NAME%
- cp -r externals %APPVEYOR_PROJECT_NAME%
- cp -r help %APPVEYOR_PROJECT_NAME%
- cp License.md %APPVEYOR_PROJECT_NAME%
- cp ReadMe.md %APPVEYOR_PROJECT_NAME%
- 7z a %APPVEYOR_PROJECT_NAME%-win-%platform%.zip %APPVEYOR_PROJECT_NAME% > %APPVEYOR_BUILD_FOLDER%\archive.log

artifacts:
- name: Build
path: '*.zip'
- name: Log files
path: '*.log'
122 changes: 122 additions & 0 deletions docs/sin~.maxref.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<c74object name="sin~" module="msp" category="MSP Operators, MSP Synthesis">
<digest>
Signal sine function (0-1 range)
</digest>
<description>
Use the <o>sin~</o> object to calculate and output a signal that is the cosine function of each sample of the input signal.
</description>


<!--METADATA-->
<metadatalist>
<metadata name="author">
Cycling '74
</metadata>
<metadata name="tag">
MSP
</metadata>
<metadata name="tag">
MSP Operators
</metadata>
<metadata name="tag">
MSP Synthesis
</metadata>
</metadatalist>


<!--INLETS-->
<inletlist>
<inlet id="0" type="signal">
<digest>
(signal) Phase (0-1)
</digest>
<description>
TEXT_HERE
</description>
</inlet>
<inlet id="1" type="signal">
<digest>
</digest>
<description>
TEXT_HERE
</description>
</inlet>
</inletlist>


<!--OUTLETS-->
<outletlist>
<outlet id="0" type="signal">
<digest>
(signal) Sine Output
</digest>
<description>
TEXT_HERE
</description>
</outlet>
</outletlist>


<!--ARGUMENTS-->
<objarglist>
<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
<digest>
TEXT_HERE
</digest>
<description>
TEXT_HERE
</description>
</objarg>
</objarglist>


<!--MESSAGES-->
<methodlist>
<method name="signal">
<arglist />
<digest>
Input to a sine function
</digest>
<description>
Input to a sine function. The input is stated as a fraction of a cycle (typically in the range from 0 to 1), and is multiplied by 2π before being used in the sine function.
</description>
</method>
</methodlist>


<!--SEEALSO-->
<seealsolist>
<seealso name="acos~" />
<seealso name="acosh~" />
<seealso name="asin~" />
<seealso name="asinh~" />
<seealso name="atan~" />
<seealso name="atanh~" />
<seealso name="atan2~" />
<seealso name="cosh~" />
<seealso name="cosx~" />
<seealso name="cycle~" />
<seealso name="phasor~" />
<seealso name="sinh~" />
<seealso name="sinx~" />
<seealso name="tanh~" />
<seealso name="tanx~" />
<seealso name="trapezoid~" />
<seealso name="triangle~" />
<seealso name="wave~" />
<seealso name="2d.wave~" />
</seealsolist>


<misc name="Output">
<entry name="signal">
<description>
The sine of 2π times the input. The method used in this object to calculate the cosine directly is typically less efficient than using the stored cosine in a <o>cycle~</o> object.
</description>
</entry>
</misc>
</c74object>
Loading

0 comments on commit dbfdfc5

Please sign in to comment.