Skip to content

Commit

Permalink
#4: Generate AU Plugin Manufacturer code from name
Browse files Browse the repository at this point in the history
Do not copy audio-unit folder when not enabled
  • Loading branch information
ypujante committed Oct 6, 2018
1 parent fc2b911 commit c479998
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ Follow the prompt (example run)
Plugin Name (must be a valid C++ class name) = Kooza
Enable VST2 (Y/n)?
Enable Audio Unit (Y/n)?
Filename (leave empty for default [Kooza]) =
Audio Unit manufacturer code (4 chars / one capital letter) (leave empty for default [Kooz]) =
Filename (leave empty for default [Kooza]) =
Company (leave empty for default [acme]) = pongasoft
Short Company Name (4 chars / one capital letter) (leave empty for default [Pong]) = Psft
Company URL (leave empty for default [https://www.pongasoft.com]) =
Company URL (leave empty for default [https://www.pongasoft.com]) =
Company Email (leave empty for default [[email protected]]) =
C++ namespace (leave empty for default [pongasoft::VST::Kooza]) =
Project directory (leave empty for default [/private/tmp]) =
Expand All @@ -89,9 +89,9 @@ Follow the prompt (example run)
Plugin Name - Kooza
VST2 Enabled - ON
Audio Unit Enabled - ON
AU Plugin Code - Kooz
Filename - Kooza (will generate Kooza.vst3)
Company - pongasoft
Company (short) - Psft
Company URL - https://www.pongasoft.com
Company Email - [email protected]
Jamba git hash - v2.1.0
Expand Down Expand Up @@ -203,6 +203,9 @@ Documentation
Release Notes
-------------

### 2018-10-06 - `v2.1.1`
* Fixed #4: Generate AU Plugin Manufacturer code from name instead of company

### 2018-10-06 - `v2.1.0`
* Implemented #1: _Eliminate resource declaration duplication_
* Implemented #2: _Optionally generate audio unit wrapper_
Expand Down
5 changes: 3 additions & 2 deletions blank-plugin/audio-unit/audiounitconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
#define kAUPluginSubType unkw

/* A manufacturer code for the audio unit, such as Aaud. This value must be exactly 4 alphanumeric characters.
* This value should be unique across audio units of the same manufacturer
* Manufacturer OSType should have at least one non-lower case character */
#define kAUPluginManufacturer [-company_short_4-]
#define kAUPluginManufacturer [-audio_unit_manufacturer_code-]

// Definitions for the resource file
#define kAudioUnitName "[-company-]: [-name-]" // same as kAUPluginName
#define kAudioUnitDescription "[-name-]" // same as kAUPluginDescription
#define kAudioUnitType 'aufx' // same as kAUPluginType
#define kAudioUnitComponentSubType 'unkw' // same as kAUPluginSubType
#define kAudioUnitComponentManuf '[-company_short_4-]' // same as kAUPluginManufacturer
#define kAudioUnitComponentManuf '[-audio_unit_manufacturer_code-]' // same as kAUPluginManufacturer

#define kAudioUnitCarbonView 1 // if 0 no Carbon view support will be added
13 changes: 8 additions & 5 deletions create-plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
parser.add_argument("-l", "--local", help="Use local jamba", action="store_true")
parser.add_argument("-f", "--filename", help="The filename of the plugin")
parser.add_argument("-C", "--company", help="The name of the company")
parser.add_argument("-c", "--company4", help="The (4 characters) name of the company")
parser.add_argument("-c", "--aucode", help="The 4 characters for the audio unit manufacturer code")
parser.add_argument("-u", "--url", help="The url for the company")
parser.add_argument("-e", "--email", help="The email for the company")
parser.add_argument("-n", "--namespace", help="The C++ namespace")
Expand Down Expand Up @@ -85,11 +85,12 @@ def config(plugin):
plugin['name'] = maybe_ask_user(args.plugin, "Plugin Name (must be a valid C++ class name)", None)
plugin['enable_vst2'] = "ON" if maybe_confirm_user(args.vst2, "Enable VST2") else "OFF"
plugin['enable_audio_unit'] = "ON" if maybe_confirm_user(args.au, "Enable Audio Unit") else "OFF"
plugin['audio_unit_manufacturer_code'] = \
maybe_ask_user(args.aucode,
"Audio Unit manufacturer code (4 chars / one capital letter)",
plugin['name'][0:4].capitalize())[0:4] if plugin['enable_audio_unit'] == "ON" else "N/A"
plugin['filename'] = maybe_ask_user(args.filename, "Filename", plugin['name'])
plugin['company'] = maybe_ask_user(args.company, "Company", 'acme')
plugin['company_short_4'] = maybe_ask_user(args.company4,
"Short Company Name (4 chars / one capital letter)",
plugin['company'][0:4].capitalize())[0:4]
plugin['company_url'] = maybe_ask_user(args.url, "Company URL", f'https://www.{plugin["company"]}.com')
plugin['company_email'] = maybe_ask_user(args.email, "Company Email", f'support@{plugin["company"]}.com')
plugin['namespace'] = maybe_ask_user(args.namespace, "C++ namespace", f"{plugin['company']}::VST::{plugin['name']}")
Expand All @@ -105,9 +106,9 @@ def config(plugin):
Plugin Name - {plugin["name"]}
VST2 Enabled - {plugin["enable_vst2"]}
Audio Unit Enabled - {plugin["enable_audio_unit"]}
AU Plugin Code - {plugin["audio_unit_manufacturer_code"]}
Filename - {plugin["filename"]} (will generate {plugin["filename"]}.vst3)
Company - {plugin["company"]}
Company (short) - {plugin["company_short_4"]}
Company URL - {plugin["company_url"]}
Company Email - {plugin["company_email"]}
Jamba git hash - {plugin["jamba_git_hash"]}
Expand Down Expand Up @@ -148,6 +149,8 @@ def generate_uuid():

ignoredFiles = ['.DS_Store']

if plugin['enable_audio_unit'] != "ON":
ignoredFiles += ["audio-unit"]

# class Processor
class Processor(Template):
Expand Down
2 changes: 1 addition & 1 deletion jamba.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(JAMBA_ROOT ${CMAKE_CURRENT_LIST_DIR})
#-------------------------------------------------------------------------------
set(JAMBA_MAJOR_VERSION 2)
set(JAMBA_MINOR_VERSION 1)
set(JAMBA_PATCH_VERSION 0)
set(JAMBA_PATCH_VERSION 1)
execute_process(COMMAND git describe --long --dirty --abbrev=10 --tags
RESULT_VARIABLE result
OUTPUT_VARIABLE JAMBA_GIT_VERSION
Expand Down

0 comments on commit c479998

Please sign in to comment.