• Stars
    star
    210
  • Rank 187,534 (Top 4 %)
  • Language
    C++
  • License
    Other
  • Created almost 9 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build audio applications and plugins with gen~

gen~ Plugin Export

This is an example project that should help you get started with building your own VST3 plugins and iOS applications with the help of the code-export feature of gen~, part of Max 8 made by Cycling '74.

It is based on the JUCE Framework. Please be aware that the JUCE has its own license terms (mostly GPL with the availability of commercial licenses). See their website for further details.

With the release of Max 7.2.6 the licensing terms of code exported from gen also changed. This article addresses this change and will help you understand how it might affect you.

CMake

As of v2.1.0 (f2de092ea), gen-plugin-export uses CMake to build plugins. If you are experiencing issues with CMake and would like to try using the Projucer, you can check out a previous version of this project and use it instead (e.g. git checkout v2.0.4).

Prerequisites

  • Download and install CMake. Version 3.18 or higher is required. Make sure you add it to your path.1
  • (MacOS) Download and install Xcode. We have tested using Xcode 12.
  • (Windows) Download and install Visual Studio 2019. Community Edition is enough!

How to use

Everything you need to build a plugin is outlined in GenPluginExport.maxpat.

In short here are the steps:

  1. Begin with a gen~ patcher. Important! In the inspector, change the export name attribute to C74_GENPLUGIN. gen patcher with inspector shown

  2. Export the C++ code from gen~ using the codeexport message. Export to the misc/exported-code directory of this package. You should eventually see

    • misc/exported-code/gen_dsp/
    • misc/exported-code/C74_GENPLUGIN.cpp
    • misc/exported-code/C74_GENPLUGIN.h exported code
  3. Open a Terminal (MacOS) or PowerShell (Windows) window. Navigate to the gen~ Plugin Export (or gen-plugin-export) directory using cd.2 (See footnote for help if you're new to using the terminal.)

Note: Working with CMake involves two steps --- "generating" a project, and "building" the project. This is because CMake takes care of OS specific things (like figuring out where your C++ compiler is and creating any IDE projects you would like to work in, and so on). For building a simple plugin, you don't need to be a CMake expert.3

  1. To generate, do one of the following:
Option Command
MacOS (Xcode project generator) cmake -G "Xcode" -S misc -B misc/build
MacOS (Makefile generator) cmake -G "Unix Makefiles" -S misc -B misc/build"
MacOS (Ninja generator) cmake -G "Ninja" -S misc -B misc/build"
Windows (Visual Studio generator) cmake -G "Visual Studio 16 2019" -S misc -B misc/build

If you're unsure of what option to use, Xcode and Visual Studio are probably the ones to pick from. If you're on Windows using a Visual Studio version other than 2019, you'll need to substitute the proper string for the -G option. You can find it by running cmake --help and using the appropriate string for your Visual Studio version.

  1. Now you can build with cmake --build misc/build --config Release.

  2. Once the build step completes, you should be able to find your build artifact in misc/build/C74GenPlugin_artefacts/Release. Copy the plugin file to wherever you keep your plugins, and test your new plugin out!

File structure

Most of the code is located within the misc/ directory. So that the launch patcher is available from the Extras dropdown in Max, it lives in the extras/ directory.

Some notable files/directories:

Location Explanation
extras/GenPluginExport.maxpat main Max patcher to automate building plugins
misc/exported-code/ the folder where gen~ will export C++ code
misc/CoreAudioUtilityClasses/ required for building Audio Units
misc/Source-App/ Source for iOS Application - feel free to edit (includes sample UI)
misc/Source-Plugin/ Source for Audio Plugins - feel free to edit
misc/JUCE/ The JUCE framework - do not edit these

Build locations

Location Explanation
misc/build/App-Builds/ iOS projects
misc/build/AU-Builds/ AudioIUnit projects
misc/build/VST3-Builds/ VST3 projects

Customization

Plugin building is based on the JUCE Framework. Please refer to tutorials from JUCE on building UIs, for instance.

Enjoy!

Footnotes

  1. To check that CMake is on your path, you can run the command cmake --version. If you see a version number, all is well. If not, Google how to make sure CMake is found on your path for your OS. ↩

  2. If you're new to navigating the terminal, learn about how to use the cd command here or here for Windows. ↩

  3. It's a useful tool to become familiar with, though, so check out the documentation if you want to get up to speed. ↩

More Repositories

1

n4m-examples

Repository of examples using Node For Max authored by Cycling '74
Max
317
star
2

max-sdk

Software Development Kit for Max by Cycling '74
HTML
231
star
3

min-devkit

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

miraweb

JavaScript
132
star
5

cv.jit

A collection of max/msp/jitter externals, abstractions and help files for computer vision applications originally authored by Jean-Marc Pelletier.
Max
125
star
6

percolate

A collection of synthesis, signal processing, and image processing objects originally authored by Dan Trueman and Luke Dubois
Max
115
star
7

max6-sdk

Max 6 Software Development Kit
C
107
star
8

rnbo.example.webpage

Running a RNBO patch in the browser, using a local static web server
JavaScript
88
star
9

xebra.js

Xebra.js connects Max to the browser, and the browser to Max.
81
star
10

n4m-core-examples

Basic examples and core techniques for using Node For Max
Max
69
star
11

n4m-community

Repository of community resources for Node For Max
63
star
12

rnbo.example.juce

Template project for creating RNBO and JUCE based Desktop applications and/or Audio Plugins
Max
62
star
13

gen-workshop

Materials for the gen~ workshop and presentation at GRAME
C++
59
star
14

min-api

High-level C++-language application programming interface for Max
C++
49
star
15

median

Rust wrappers for interacting with the Max SDK.
Rust
47
star
16

max-devkit

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

max-test

Automated Test Harness for Max by Cycling '74
Max
38
star
18

max-api

Low-level C-language application programming interface for Max
C++
35
star
19

genPi

gen~-exported code on Raspberry Pi
C++
25
star
20

rnbo.oscquery.runner

RNBO runner with OSCQuery interaction/discovery interface
C++
18
star
21

max-mxj

Java support for Max by Cycling '74
Max
15
star
22

rnbo.unity.audioplugin

RNBO Adapter for Unity's Native Audio Plugin
C++
14
star
23

rnbo.example.vcvrack

An example of using RNBO exports in VCV Rack plugins
Max
14
star
24

genBela

gen~ code export for Bela (Beaglebone Black + Bela Cape -- bela.io)
C++
14
star
25

max-sdk-base

Headers, libs, and scripts for Max external development
C
13
star
26

xebra-communicator

XebraCommunicator is the underlying communication package for xebra.js, which provides Web enabled communication with Max.
13
star
27

rnbo.example.supercollider

An example of using RNBO exports in SuperCollider UGens
Max
13
star
28

ml-ddsp

Max
11
star
29

jit.mo

jit.mograph package
Max
11
star
30

RNBOSynthBuildingBlocks

Max
10
star
31

max-air-guitar

Strum on your air guitar in Max
Max
10
star
32

adc2021-workshop

Materials for the ADC 2021 workshop "Getting Max Out of Max with gen~"
Max
10
star
33

node-music-theory

Node For Max Music experiments
Max
10
star
34

rnbo-runner-panel

Web interface to the RNBO runner
TypeScript
9
star
35

rnbo-adc-workshop

How to use RNBO–A workshop for ADC 2022
C++
9
star
36

ease

Max
8
star
37

n4m-max-api

Placeholder / Stub Node package for users that accidentally install "max-api" when attempting to use the dynamic "max-api" within [node.script]
JavaScript
7
star
38

max5-sdk

Max 5 Software Development Kit
C
6
star
39

filter

Max
6
star
40

zero

Zero-configuration networking for Max
C
5
star
41

max-package-template

A minimal template for building a package with the Max SDK.
Max
5
star
42

codegen-eng-blog

Source code for the engineering blog pilot
TypeScript
5
star
43

n4m-recipes

4
star
44

eslint-config-c74

Packaged configuration of ESLint Rules according to Cycling '74 guide
TypeScript
4
star
45

mock

A mocked/stubbed library for linking unit tests of Max externals built with the Min-DevKit.
C++
3
star
46

node-sqlite3

PLpgSQL
2
star
47

min-package-template

A minimal template for building a package with the min-api.
Max
1
star
48

rnbo.example.command-line

Very simple command line application using RNBO
C++
1
star