@gorilla-engine-sdk/create-gorilla-engine-plugin 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +64 -0
- package/README.md +103 -0
- package/generator-gorilla-engine-plugin/app/index.js +338 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/SKILL.md +295 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/effects-filters.md +186 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/indexing.md +129 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/instrument-files.md +547 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/key-rules.md +81 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/modulation.md +210 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-control.md +217 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-bus-effects.md +663 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-core.md +145 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-misc.md +59 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-modulation.md +85 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-voice-effects.md +407 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/note-events.md +278 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/properties.md +230 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/script-patterns.md +494 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/time-tempo.md +209 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/SKILL.md +104 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/advanced-controls.md +194 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/base-props.md +167 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/basic-controls.md +230 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/bindings.md +183 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/composite-components.md +258 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/containers.md +149 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/editors.md +191 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/event-handlers.md +150 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/getting-started.md +143 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/gorilla-engine-api.md +147 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/instrument-api.md +250 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/visualization.md +209 -0
- package/generator-gorilla-engine-plugin/app/templates/.prettierignore +13 -0
- package/generator-gorilla-engine-plugin/app/templates/.vscode/settings.json +14 -0
- package/generator-gorilla-engine-plugin/app/templates/.vscode_input/launch.json +89 -0
- package/generator-gorilla-engine-plugin/app/templates/README.md +36 -0
- package/generator-gorilla-engine-plugin/app/templates/assets/fonts/OFL.txt +93 -0
- package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Bold.otf +0 -0
- package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Medium.otf +0 -0
- package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Regular.otf +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/Presets/Factory/Category 1/Init.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/Presets/Factory/Category 1/Three Quarters.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Horizontal Slider.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Horizontal Slider@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary Bipolar.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary-Bipolar@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-default.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-default@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-hover.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-hover@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-pressed.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-pressed@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-default.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-default@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-hover.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-hover@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-pressed.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-pressed@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-default.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-default@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-pressed.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-pressed@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/instruments/Basic Synth Example_part1.blob +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/instruments/Basic Synth Example_part2.blob +1 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/instrument/Basic Synth Example.inst +157 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/instrument/Basic Synth Example.txt +184 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/Root.tsx +35 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/components/ErrorBoundary.tsx +138 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/components/UserInterface.tsx +338 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/pluginConfig.ts +4 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/dialogsCustomStyle.ts +98 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/index.tsx +217 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/presetBrowserCustomStyle.ts +124 -0
- package/generator-gorilla-engine-plugin/app/templates/build.ugep +173 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/01 - All The Way Down.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/02 - About Half.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/03 - Three Quarters.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/04 - All The Way Up.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/images/Rotary.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/images/Rotary@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/instruments/Reverb Example_part1.blob +0 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/instruments/Reverb Example_part2.blob +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/instrument/Reverb Example.inst +73 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/instrument/Reverb Example.txt +21 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/app/Root.tsx +35 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/app/components/ErrorBoundary.tsx +114 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/app/components/UserInterface.tsx +85 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/app/pluginConfig.ts +4 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/dialogsCustomStyle.ts +101 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/index.tsx +214 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/presetBrowserCustomStyle.ts +124 -0
- package/generator-gorilla-engine-plugin/app/templates/gitignore +9 -0
- package/generator-gorilla-engine-plugin/app/templates/licence.txt +0 -0
- package/generator-gorilla-engine-plugin/app/templates/package.json +38 -0
- package/generator-gorilla-engine-plugin/app/templates/prettierrc +9 -0
- package/generator-gorilla-engine-plugin/app/templates/tsconfig.json +20 -0
- package/generator-gorilla-engine-plugin/package.json +17 -0
- package/index.js +72 -0
- package/package.json +42 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
**IMPORTANT NOTICE: PLEASE READ CAREFULLY BEFORE DOWNLOADING, INSTALLING OR USING THE GORILLA ENGINE SDK:**
|
|
2
|
+
|
|
3
|
+
- BY SIGNING THIS AGREEMENT, OR CLICKING ON THE “ACCEPT” BUTTON BELOW (IF AVAILABLE), OR BY DOWNLOADING, INSTALLING, OR USING THE GORILLA ENGINE SDK, YOU AGREE TO THE TERMS OF THIS AGREEMENT, AND ALL INCORPORATED TERMS INCLUDING GORILLA ENGINE’S PRIVACY POLICY, AS APPLICABLE, WHICH WILL BIND YOU.
|
|
4
|
+
|
|
5
|
+
- IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, WE WILL NOT LICENSE THE GORILLA ENGINE SDK TO YOU AND YOU MUST DISCONTINUE THE INSTALLATION OR DOWNLOAD PROCESS OR CEASE USE OF THE UJAM GORILLA ENGINE SDK.
|
|
6
|
+
|
|
7
|
+
**GORILLA ENGINE FREE TIER LICENSE**
|
|
8
|
+
|
|
9
|
+
This Gorilla Engine Free Tier License ("Agreement") is entered between UJAM, Inc., a Delaware corporation (hereinafter "UJAM" or "we") and you (“Licensee” or “you”) and becomes effective once you download, install, or use the GORILLA ENGINE SDK.
|
|
10
|
+
|
|
11
|
+
1. OBJECT OF AGREEMENT. This Agreement governs UJAM’s GORILLA ENGINE SDK (“SDK”) and all related software and documentation and any update, upgrades or bug fixes (collectively referred to as the "UJAM GORILLA ENGINE SDK SERVICE").
|
|
12
|
+
|
|
13
|
+
2. GRANT OF LICENSE: Subject to your full compliance with all of the terms and conditions of this Agreement, we grant you a non-exclusive, revocable, nonsublicensable (except as specifically provided herein), non-transferable license to use the UJAM GORILLA ENGINE SDK SERVICE solely to: (i) download, install, and use the UJAM GORILLA ENGINE SDK SERVICE for the sole purpose of building audio plugins such as virtual instruments and effects ("Application") and using such Application for music productions and live performances. **HOWEVER, YOU MUST NOT SHARE OR OTHERWISE EXPLOIT YOUR GORILLA ENGINE BASED APPLICATION WITH ANY THIRD PARTY UNTIL YOU HAVE ACQUIRED ONE OF THE ADD-ON LICENSES AS FURTHER DESCRIBED IN SECTION 8 OF THIS AGREEMENT.** If you have any questions regarding this license and allowed uses of the SDK, please reach out to us via email at support@gorilla-engine.com.
|
|
14
|
+
|
|
15
|
+
3. LICENSE RESTRICTIONS AND OBLIGATIONS: Except as expressly and unambiguously authorized under this Agreement, you must not
|
|
16
|
+
1. copy, rent, lease, sell, transfer, assign, sublicense, disassemble, reverse engineer or decompile (except to the limited extent expressly authorized by applicable statutory law), modify, create derivative works from, or alter any part of the UJAM GORILLA ENGINE SDK SERVICE;
|
|
17
|
+
2. sublicense your Application to end-users until you have acquired a license as further described in Section 8 of this Agreement.
|
|
18
|
+
3. use any automated means, including, without limitation, agents, robots, scripts or spiders, to access the UJAM GORILLA ENGINE SDK SERVICE or bypass the UJAM GORILLA ENGINE SDK SERVICE or to interfere or attempt to interfere with the proper working of the UJAM GORILLA ENGINE SDK SERVICE;
|
|
19
|
+
4. use the UJAM GORILLA ENGINE SDK SERVICE as a dynamic-link library (for clarity: the SDK shall solely be used as a statically linked library); (g) use the SDK or any part of the SDK in connection with building or distributing your own or a third-party SDK or framework; or (h) use the Licensed Software to train artificial intelligence, your own or a third-party algorithm, and/or any other kind of machine learning processes.
|
|
20
|
+
5. use the UJAM GORILLA ENGINE SDK SERVICE for the benefit of a third party, other than end users of your Applications as expressly authorized by this Agreement;
|
|
21
|
+
6. use the UJAM GORILLA ENGINE SDK SERVICE to implement or enhance a product or service that is competitive with the UJAM GORILLA ENGINE SDK SERVICE;
|
|
22
|
+
7. modify and/or rename the UJAM binary libraries; or
|
|
23
|
+
8. otherwise engage in activity that interrupts the proper working of the UJAM GORILLA ENGINE SDK SERVICE or is otherwise fraudulent or illegal.
|
|
24
|
+
|
|
25
|
+
Furthermore, you agree
|
|
26
|
+
|
|
27
|
+
9. display attribution on all embodiments and uses of the Gorilla Engine SDK by displaying the language “powered by Gorilla Engine” ; and
|
|
28
|
+
10. to contact UJAM once you intend to Distribute (as defined in Section 8\) your Application to obtain the appropriate license to do so – which you agree is required for such a scenario (as further described in Section 8 below).
|
|
29
|
+
|
|
30
|
+
We reserve the right to discontinue, modify, cease support of, and alter the pricing structure of this Agreement (the Gorilla Engine Free Tier License) of the UJAM GORILLA ENGINE SDK SERVICE.
|
|
31
|
+
|
|
32
|
+
10. LICENSE TO UJAM: You hereby grant to us the non-exclusive, perpetual, worldwide, royalty-free right and license to any and all content ("Content") provided by you or your end users in connection with your use or your end users' use of the SDK, including but not limited to feedback or other contributions made towards the UJAM GORILLA ENGINE SDK SERVICE (including so-called re-usable components, made available by UJAM via its repositories), in order for us to provide and improve the UJAM GORILLA ENGINE SDK SERVICE. You represent and warrant that all Content provided by you shall not violate any third party rights and shall be free of any and all claims.
|
|
33
|
+
|
|
34
|
+
11. REPRESENTATIONS AND WARRANTIES: You represent and warrant that you: (i) are fully authorized to enter into this agreement; (ii) shall use the UJAM GORILLA ENGINE SDK SERVICE in compliance with all applicable local, state, national and foreign laws, treaties and regulations, including those related to data privacy, international communications, export laws and the transmission of technical or personal data laws; (iii) shall not (and shall not permit any third party, including a permitted sublicensee to), directly or indirectly, take any action or upload, download, post, submit or otherwise distribute or facilitate distribution of Content or any material on or through the UJAM GORILLA ENGINE SDK SERVICE, that: (a) infringes any patent, trademark, trade secret, copyright, right of publicity/privacy or other right of any third party or induces infringement thereof; (b) breaches any third party contract or obligation; (c) is unlawful, threatening, abusive, harassing, defamatory, deceptive, fraudulent, invasive of another's privacy, tortious, obscene, offensive, or profane.
|
|
35
|
+
|
|
36
|
+
12. OWNERSHIP AND PROPRIETARY RIGHTS: As between UJAM and Licensee (and any permitted sublicensees), the SDK and all intellectual property rights in and to the UJAM GORILLA ENGINE SDK SERVICE, are and shall at all times remain the sole and exclusive property of UJAM and are protected by applicable intellectual property laws and treaties. You shall not obscure, remove or otherwise alter our copyright or trademark notices or other proprietary rights' notices affixed to or within the SDK or elsewhere.
|
|
37
|
+
|
|
38
|
+
13. SUPPORT AND UPGRADES: This Agreement does not entitle you to any support for the SDK, unless you enter into a separate agreement with us in writing, either signed by both parties or agreed upon via click-through agreement. Any such support provided by us shall be subject to the terms and disclaimers of this Agreement.
|
|
39
|
+
|
|
40
|
+
14. ADD-ON LICENSES FOR A PERMITTED DISTRIBUTION OF GORILLA ENGINE BASED APPLICATION:
|
|
41
|
+
1. **Add-On Licenses (Upgrade to Pro Tier):** You agree to contact UJAM to obtain one of our commercial license (including the so-called “Pro Tier” License, including available optional Add-On upgrades which can be ) (collectively referred to as “Add-On Licenses”), whichever deemed to be appropriate for your intended use of the SDK, to Distribute (as defined below in subsection ii.) your Gorilla Engine based Application to end-users. Such Add-On License shall supersede this Agreement, as agreed to by the parties.
|
|
42
|
+
2. **Failure to comply with Section 8:** If you fail to comply with Section 8(i) by Distributing the SDK as part of an Application beyond the allowed use under this Agreement, you shall immediately contact UJAM and pay to UJAM a royalty per each Distribution (as defined below) in an amount as solely determined by UJAM. A Distribution refers to either an embedded, pre-bundled, pre-installed platform application or software application that is downloaded, delivered, or served to a user or device by any means of distribution including directly from you or through any platform, including cloud based platforms. In avoidance of doubt, any subscription or rental shall be considered a Distribution.
|
|
43
|
+
3. **Audit Rights**: Should (i) you fail to obtain an Add-On License and distribute the SDK as part of an Application, or should (ii) UJAM believe that you distribute the Application without having obtained an Add-On License, then UJAM shall have the right, upon reasonable notice, to audit/inspect any premises, computer(s), and networks on or in which the SDK is installed or used to monitor compliance with the terms of this Agreement, including but not limited to confirming the number of Distributions of the Application. If an audit reveals any unauthorized use, in addition to all other remedies available to UJAM, you shall be responsible to UJAM for all reasonable expenses related to the audit.
|
|
44
|
+
4. **Third Party Libraries:** You acknowledge that certain third-party libraries, including JUCE 6 ([https://juce.com/legal/juce-6-license/](https://juce.com/legal/juce-6-license/)), may be used in connection with the SDK, subject to their respective license agreements as further disclosed by UJAM. It is your sole responsibility to abide to such third-party terms, which may include your obligations, amongst others, to provide certain disclosures accompanying your Gorilla Engine based Software and/or acquiring a JUCE license (if applicable).
|
|
45
|
+
|
|
46
|
+
15. DATA PROTECTION AND PRIVACY: We may collect and process information about you and your use of the Gorilla Engine SDK, some of which may amount to personal data, subject to Gorilla Engine’s Privacy Policy.
|
|
47
|
+
|
|
48
|
+
16. TRADE SECRETS AND CONFIDENTIAL INFORMATION: You acknowledges that the SDK contains valuable trade secrets of UJAM and, should you access any such trade secrets in violation of this Agreement, you agree to maintain the confidentiality of the trade secrets of the SDK using at least the same degree of care that you use with your own confidential information.
|
|
49
|
+
|
|
50
|
+
17. WARRANTY DISCLAIMER: THE UJAM GORILLA ENGINE SDK SERVICE, INCLUDING THE SDK, IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, WE DISCLAIM ALL WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, REGARDING THE UJAM GORILLA ENGINE SDK SERVICE, INCLUDING WITHOUT LIMITATION ANY AND ALL IMPLIED WARRANTIES OF MERCHANTABILITY, ACCURACY, RESULTS OF USE, RELIABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AVAILABILITY, PERFORMANCE, BANDWIDTH, AND NON-INFRINGEMENT OF THIRD-PARTY RIGHTS. FURTHER, WE DISCLAIM ANY WARRANTY THAT LICENSEE'S USE OF THE UJAM GORILLA ENGINE SDK SERVICE WILL BE AVAILABLE, UNINTERRUPTED OR ERROR FREE.
|
|
51
|
+
|
|
52
|
+
18. LIABILITY LIMITATION: REGARDLESS OF WHETHER ANY REMEDY SET FORTH HEREIN FAILS OF ITS ESSENTIAL PURPOSE OR OTHERWISE, AND EXCEPT FOR BODILY INJURY, IN NO EVENT WILL WE OR OUR CONTRACTORS, EMPLOYEES OR AFFILIATES BE LIABLE TO YOU OR TO ANY THIRD PARTY UNDER ANY TORT, CONTRACT, NEGLIGENCE, STRICT LIABILITY OR OTHER LEGAL OR EQUITABLE THEORY FOR ANY LOST PROFITS, LOST OR CORRUPTED DATA, COMPUTER FAILURE OR MALFUNCTION, INFRINGEMENT, INTERRUPTION OF BUSINESS, OR OTHER SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING OUT OF THE USE OR INABILITY TO USE THE UJAM GORILLA ENGINE SDK SERVICE, EVEN IF WE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES AND WHETHER OR NOT SUCH LOSS OR DAMAGES ARE FORESEEABLE. IN NO EVENT SHALL OUR TOTAL LIABILITY TO YOU OR ANY THIRD PARTY EXCEED TEN USD DOLLARS. ANY CLAIM ARISING OUT OF OR RELATING TO THIS AGREEMENT MUST BE BROUGHT WITHIN ONE (1) YEAR AFTER THE OCCURRENCE OF THE EVENT GIVING RISE TO SUCH CLAIM.
|
|
53
|
+
|
|
54
|
+
19. INDEMNITY: You agree that we shall have no liability whatsoever for your or your end users of the UJAM GORILLA ENGINE SDK SERVICE. You shall indemnify, defend and hold us harmless from any and all claims, damages, liabilities, costs, and fees (including reasonable attorneys' fees) arising from your or your end users' use of the UJAM GORILLA ENGINE SDK SERVICE or for any breach of this Agreement, including any breach of the representations and warranties you made herein.
|
|
55
|
+
|
|
56
|
+
20. TERM AND TERMINATION: This Agreement shall continue until terminated as set forth in this Section. Either party may terminate this Agreement at any time, for any reason, or for no reason including, but not limited to, if you violate any provision of this Agreement. We reserve the right to cancel, amend, or modify the SDK at any time. Any termination of this Agreement shall also terminate the license granted hereunder. Upon termination of this Agreement for any reason, you shall immediately destroy and remove from all computers, hard drives, networks, and other storage media all copies of the SDK, and shall so certify to us that such actions have occurred (including all cached ephemeral copies). Sections 5 (“REPRESENTATIONS AND WARRANTIES”), 6 (“OWNERSHIP AND PROPRIETARY RIGHTS”), 10 (“TRADE SECRETS AND CONFIDENTIAL INFORMATION”), 11 (“WARRANTY DISCLAIMER”), 12 (“LIABILITY LIMITATION”), 13 (“INDEMNITY”), 16 (“GOVERNING LAW”), 18 (“GENERAL PROVISIONS”) shall survive termination of this Agreement.
|
|
57
|
+
|
|
58
|
+
21. EXPORT CONTROLS: You shall comply with all applicable export laws and restrictions and regulations and you shall not export, or allow the export or re-export of the SDK in violation of any such restrictions, laws, or regulations.
|
|
59
|
+
|
|
60
|
+
22. GOVERNING LAW: This Agreement shall be governed by New York law, excluding conflict of law provisions. The parties agree to and submit to the exclusive jurisdiction of courts located in New York City, New York. The application of the United Nations Convention of Contracts for the International Sale of Goods is expressly excluded.
|
|
61
|
+
|
|
62
|
+
23. PREVAILING PARTY. Notwithstanding Section 12 (“LIABILITY LIMITATION”), in the event of any court action relating to enforcement of this Agreement, including injunctive relief, the non-prevailing party shall reimburse the prevailing party for all reasonable attorneys’ fees and costs, including expert witness fees, resulting therefrom.
|
|
63
|
+
|
|
64
|
+
24. GENERAL PROVISIONS. If any part of this Agreement is found void or unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. This Agreement may only be modified by written agreement between the Parties. Updates to the UJAM GORILLA ENGINE SDK SERVICE may be licensed to you by UJAM with additional or different terms. UJAM further reserves rights, in its discretion, not to license updates. This is the entire Agreement between UJAM and you relating to the UJAM GORILLA ENGINE SDK SERVICE and it supersedes any prior representations, discussions, undertakings, communications, or advertising relating to the UJAM GORILLA ENGINE SDK SERVICE. This Agreement is not assignable by you.
|
package/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# 🎛️ Create Gorilla Engine Plugin
|
|
2
|
+
|
|
3
|
+
> Scaffold a Gorilla Engine plugin with a React and TypeScript user interface.
|
|
4
|
+
|
|
5
|
+
`@gorilla-engine-sdk/create-gorilla-engine-plugin` generates a complete starting point for Gorilla Engine instrument and effect plugins.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
- [Prerequisites](#prerequisites)
|
|
10
|
+
- [Quick Start](#quick-start)
|
|
11
|
+
- [Usage](#usage)
|
|
12
|
+
- [After Scaffolding](#after-scaffolding)
|
|
13
|
+
- [License](#license)
|
|
14
|
+
|
|
15
|
+
## 📋 Prerequisites
|
|
16
|
+
|
|
17
|
+
- [Node.js](https://nodejs.org/)
|
|
18
|
+
- A [Gorilla SDK](https://www.gorilla-engine.com/) installation
|
|
19
|
+
|
|
20
|
+
The generator checks for the Gorilla Engine compiler before it runs. You can continue without it, but it is required to build the generated plugin.
|
|
21
|
+
|
|
22
|
+
## 🚀 Quick Start
|
|
23
|
+
|
|
24
|
+
Generate an instrument plugin interactively:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx @gorilla-engine-sdk/create-gorilla-engine-plugin
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then move into the generated directory and build it:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd your-plugin-folder
|
|
34
|
+
npm run buildAndInstall
|
|
35
|
+
npm start
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 💻 Usage
|
|
39
|
+
|
|
40
|
+
### Install globally
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install -g @gorilla-engine-sdk/create-gorilla-engine-plugin
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Interactive mode
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
create-gorilla-engine-plugin [folder]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
When `folder` is omitted, the generator creates a folder named after the plugin. Otherwise, it generates the project in the supplied folder.
|
|
53
|
+
|
|
54
|
+
### Non-interactive mode
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
create-gorilla-engine-plugin [folder] --manufacturer "Acme Audio" --name "Bass Forge" --effect
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
| Option | Description |
|
|
61
|
+
| ---------------------- | ------------------------------------------------------------- |
|
|
62
|
+
| `--manufacturer`, `-m` | Manufacturer name. |
|
|
63
|
+
| `--name`, `-n` | Plugin name. |
|
|
64
|
+
| `--effect`, `-f` | Create an effect plugin. The default is an instrument plugin. |
|
|
65
|
+
|
|
66
|
+
The generated project includes a Gorilla Engine project file (`.ugep`), a React and TypeScript UI, instrument and asset templates, and build/deploy scripts.
|
|
67
|
+
|
|
68
|
+
## 🔧 After Scaffolding
|
|
69
|
+
|
|
70
|
+
### ☁️ Build and install
|
|
71
|
+
|
|
72
|
+
Build and install the plugin for local development:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm run buildAndInstall
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The plugin build is compiled in the cloud and may take a few minutes. Run it again when the `.ugep` file changes, such as when changing outputs, exposed parameters or something of that nature.
|
|
79
|
+
|
|
80
|
+
The first time you run `npm run buildAndInstall` or `npm run build` on a machine, you will be prompted for the credentials which you signed up with on https://www.gorilla-engine.com/ and then credentials are stored user-wide so you don't have to provide them again:
|
|
81
|
+
|
|
82
|
+
| Platform | Credential path |
|
|
83
|
+
| -------- | -------------------------------------------------- |
|
|
84
|
+
| macOS | `~/.gorilla-engine/credentials.json` |
|
|
85
|
+
| Windows | `%USERPROFILE%\\.gorilla-engine\\credentials.json` |
|
|
86
|
+
|
|
87
|
+
To override those credentials for a project, add an optional `buildCredentials.json` file to the project root.
|
|
88
|
+
|
|
89
|
+
### 🔄 Develop
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm start
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
This starts the standalone plugin, deploys source changes automatically, and restarts the standalone application.
|
|
96
|
+
|
|
97
|
+
- Build and install the plugin once before starting development mode.
|
|
98
|
+
- In a DAW, re-instantiate the plugin after source updates.
|
|
99
|
+
- The deploy script requires write access to the installed plugin output folder and prompts to repair permissions when necessary.
|
|
100
|
+
|
|
101
|
+
## 📄 License
|
|
102
|
+
|
|
103
|
+
Licensed under the [GORILLA ENGINE FREE TIER LICENSE](./LICENSE.md).
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import Generator from 'yeoman-generator';
|
|
2
|
+
import { randomBytes } from 'node:crypto';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
|
|
7
|
+
const gorillaHeadBanner = `
|
|
8
|
+
##############
|
|
9
|
+
####-...-++-...-####
|
|
10
|
+
###-.-####+---####-.-###
|
|
11
|
+
##-.##+. .+##.-##
|
|
12
|
+
##.+#- -##.##
|
|
13
|
+
##+-#- -#--##
|
|
14
|
+
#### .#+ -#. ####
|
|
15
|
+
##- -#. .#- -###
|
|
16
|
+
##. ## ## ##
|
|
17
|
+
##- #+ -# .##
|
|
18
|
+
## -#. .################- .#+ ##
|
|
19
|
+
-#+ ## -##-..++++++..-##- ## +#-
|
|
20
|
+
## .#- ...+#-++-#+... -#. +#
|
|
21
|
+
##- +# .###--###. #+ .##
|
|
22
|
+
##- +# .########+#- #+ -##
|
|
23
|
+
##+ .#- +#..... -##+ .#. +##
|
|
24
|
+
#####. -##########- .#####
|
|
25
|
+
+#+ -########- +#+
|
|
26
|
+
+##+ .+##+. +##+.
|
|
27
|
+
-###- -###-
|
|
28
|
+
.+########+.
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
const gorillaTextBanner = `
|
|
32
|
+
____ _ _ _
|
|
33
|
+
/ ___| ___ _ __(_) | | __ _
|
|
34
|
+
| | _ / _ \\| '__| | | |/ _ |
|
|
35
|
+
| |_| | (_) | | | | | | (_| |
|
|
36
|
+
\\____|\\___/|_| |_|_|_|\\__,_|
|
|
37
|
+
|
|
38
|
+
_____ _
|
|
39
|
+
| ____|_ __ __ _(_)_ __ ___
|
|
40
|
+
| _| | _ \\ / _ | | _ \\ / _ \\
|
|
41
|
+
| |___| | | | (_| | | | | | __/
|
|
42
|
+
|_____|_| |_|\\__, |_|_| |_|\\___|
|
|
43
|
+
|___/
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
const gradientStart = [59, 130, 246];
|
|
47
|
+
const gradientEnd = [168, 85, 247];
|
|
48
|
+
|
|
49
|
+
const colorizeBanner = (banner) => {
|
|
50
|
+
const lines = getBannerLines(banner);
|
|
51
|
+
const maxLineLength = lines.reduce((maxWidth, line) => Math.max(maxWidth, line.length), 0);
|
|
52
|
+
const maxDistance = Math.max(lines.length + maxLineLength - 2, 1);
|
|
53
|
+
|
|
54
|
+
return lines
|
|
55
|
+
.map((line, rowIndex) =>
|
|
56
|
+
Array.from(line, (char, columnIndex) => {
|
|
57
|
+
if (char === ' ') {
|
|
58
|
+
return char;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const distance = rowIndex + columnIndex;
|
|
62
|
+
const mix = distance / maxDistance;
|
|
63
|
+
const red = Math.round(gradientStart[0] + (gradientEnd[0] - gradientStart[0]) * mix);
|
|
64
|
+
const green = Math.round(gradientStart[1] + (gradientEnd[1] - gradientStart[1]) * mix);
|
|
65
|
+
const blue = Math.round(gradientStart[2] + (gradientEnd[2] - gradientStart[2]) * mix);
|
|
66
|
+
|
|
67
|
+
return chalk.rgb(red, green, blue)(char);
|
|
68
|
+
}).join(''),
|
|
69
|
+
)
|
|
70
|
+
.join('\n');
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const getBannerLines = (banner) =>
|
|
74
|
+
banner.split('\n').filter((line, index, lines) => {
|
|
75
|
+
const isEdgeLine = index === 0 || index === lines.length - 1;
|
|
76
|
+
return !isEdgeLine || line.trim() !== '';
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const getDisplayWidth = (banner) =>
|
|
80
|
+
getBannerLines(banner).reduce((maxWidth, line) => Math.max(maxWidth, line.length), 0);
|
|
81
|
+
|
|
82
|
+
const combineBannersSideBySide = (leftBanner, rightBanner, gap = 4) => {
|
|
83
|
+
const leftLines = getBannerLines(leftBanner);
|
|
84
|
+
const rightLines = getBannerLines(rightBanner);
|
|
85
|
+
const leftWidth = leftLines.reduce((maxWidth, line) => Math.max(maxWidth, line.length), 0);
|
|
86
|
+
const totalLines = Math.max(leftLines.length, rightLines.length);
|
|
87
|
+
|
|
88
|
+
return Array.from({ length: totalLines }, (_, index) => {
|
|
89
|
+
const leftLine = leftLines[index] ?? '';
|
|
90
|
+
const rightLine = rightLines[index] ?? '';
|
|
91
|
+
|
|
92
|
+
if (!rightLine) {
|
|
93
|
+
return leftLine;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return `${leftLine.padEnd(leftWidth)}${' '.repeat(gap)}${rightLine}`.trimEnd();
|
|
97
|
+
}).join('\n');
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const fullBanner = combineBannersSideBySide(gorillaHeadBanner, gorillaTextBanner);
|
|
101
|
+
const fullBannerWidth = getDisplayWidth(fullBanner);
|
|
102
|
+
const headBannerWidth = getDisplayWidth(gorillaHeadBanner);
|
|
103
|
+
|
|
104
|
+
const getBannerForTerminal = (terminalWidth = process.stdout.columns ?? 0) => {
|
|
105
|
+
if (terminalWidth >= fullBannerWidth) {
|
|
106
|
+
return fullBanner;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (terminalWidth >= headBannerWidth) {
|
|
110
|
+
return gorillaHeadBanner;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return '';
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const isPromptCancellationError = (error) =>
|
|
117
|
+
error?.name === 'ExitPromptError' ||
|
|
118
|
+
(typeof error?.message === 'string' && error.message.includes('SIGINT'));
|
|
119
|
+
|
|
120
|
+
const createIdentifier = (value) => value.replace(/[^A-Z0-9]/gi, '').toLowerCase();
|
|
121
|
+
|
|
122
|
+
const createFourCharacterCode = (value) =>
|
|
123
|
+
createIdentifier(value).toUpperCase().padEnd(4, 'X').slice(0, 4);
|
|
124
|
+
|
|
125
|
+
const createHexCode = (value) =>
|
|
126
|
+
`0x${Array.from(value, (character) => character.charCodeAt(0).toString(16)).join('')}`;
|
|
127
|
+
|
|
128
|
+
const pluginTemplates = {
|
|
129
|
+
effect: 'effect',
|
|
130
|
+
instrument: 'basic-synth',
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const validateIdentity = (value, label) => {
|
|
134
|
+
if (typeof value !== 'string' || value.trim() === '') {
|
|
135
|
+
return `${label} is required`;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (createIdentifier(value) === '') {
|
|
139
|
+
return `${label} must contain at least one letter or number`;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return true;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const validatePluginName = (value) => {
|
|
146
|
+
const identityValidation = validateIdentity(value, 'Plugin name');
|
|
147
|
+
if (identityValidation !== true) {
|
|
148
|
+
return identityValidation;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return /[\\/]/.test(value) ? 'Plugin name cannot contain path separators' : true;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export default class extends Generator {
|
|
155
|
+
// The name `constructor` is important here
|
|
156
|
+
constructor(args, opts) {
|
|
157
|
+
// Calling the super constructor is important so our generator is correctly set up
|
|
158
|
+
super(args, opts);
|
|
159
|
+
|
|
160
|
+
// Plugin Name
|
|
161
|
+
// Effect or instrument
|
|
162
|
+
// git repo
|
|
163
|
+
|
|
164
|
+
this.justCopy = (array) =>
|
|
165
|
+
array.forEach((item) =>
|
|
166
|
+
this.fs.copyTpl(this.templatePath(item), this.destinationPath(`./${item}`)),
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
this.answers = {
|
|
170
|
+
plugin_manufacturer: opts.cli?.manufacturer,
|
|
171
|
+
plugin_name: opts.cli?.name,
|
|
172
|
+
is_effect: opts.cli?.effect,
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
this.outputFolder = opts.cli?.folder ?? undefined;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
async prompting() {
|
|
179
|
+
const prompts = [];
|
|
180
|
+
|
|
181
|
+
const addPromptIfNotSet = (name, message, options = { type: 'input' }) => {
|
|
182
|
+
if (this.answers[name] === undefined) {
|
|
183
|
+
prompts.push({ ...options, name, message });
|
|
184
|
+
} else {
|
|
185
|
+
console.log(chalk.whiteBright(`${name} is:`), chalk.cyan(this.answers[name]));
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
addPromptIfNotSet('plugin_manufacturer', 'Enter a manufacturer name for the new plugin:', {
|
|
190
|
+
type: 'input',
|
|
191
|
+
validate: (value) => validateIdentity(value, 'Manufacturer name'),
|
|
192
|
+
});
|
|
193
|
+
addPromptIfNotSet('plugin_name', 'Enter a name for the new plugin:', {
|
|
194
|
+
type: 'input',
|
|
195
|
+
validate: validatePluginName,
|
|
196
|
+
});
|
|
197
|
+
addPromptIfNotSet('is_effect', 'Do you want to create an effect plugin?', {
|
|
198
|
+
type: 'confirm',
|
|
199
|
+
default: false,
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
if (prompts.length > 0) {
|
|
203
|
+
const banner = getBannerForTerminal();
|
|
204
|
+
if (banner) {
|
|
205
|
+
console.log(colorizeBanner(banner));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
try {
|
|
209
|
+
Object.assign(this.answers, await this.prompt(prompts));
|
|
210
|
+
} catch (error) {
|
|
211
|
+
if (isPromptCancellationError(error)) {
|
|
212
|
+
console.error('cancelled by user input');
|
|
213
|
+
process.exit(130);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
throw error;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
configuring() {
|
|
222
|
+
const manufacturerValidation = validateIdentity(
|
|
223
|
+
this.answers.plugin_manufacturer,
|
|
224
|
+
'Manufacturer name',
|
|
225
|
+
);
|
|
226
|
+
if (manufacturerValidation !== true) {
|
|
227
|
+
throw new Error(manufacturerValidation);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const pluginNameValidation = validatePluginName(this.answers.plugin_name);
|
|
231
|
+
if (pluginNameValidation !== true) {
|
|
232
|
+
throw new Error(pluginNameValidation);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
console.log(
|
|
236
|
+
chalk.whiteBright('Generating plugin in folder:'),
|
|
237
|
+
chalk.cyan(this.outputFolder ?? this.answers.plugin_name),
|
|
238
|
+
);
|
|
239
|
+
const folder = this.outputFolder ?? this.answers.plugin_name;
|
|
240
|
+
const destPath = path.resolve(this.contextRoot, folder);
|
|
241
|
+
this.destinationRoot(destPath);
|
|
242
|
+
this.env.cwd = this.destinationPath();
|
|
243
|
+
process.chdir(destPath);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
git() {
|
|
247
|
+
// NPM doesn't like .gitignore files and will not check them out
|
|
248
|
+
this.fs.copyTpl(this.templatePath('gitignore'), this.destinationPath(`.gitignore`));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
workspace() {
|
|
252
|
+
this.justCopy(['.agents', '.vscode', '.prettierignore', 'prettierrc', 'tsconfig.json']);
|
|
253
|
+
|
|
254
|
+
const sanitizeForEnvVar = (s) => s.toUpperCase().replace(/[^A-Z0-9]/g, '_');
|
|
255
|
+
|
|
256
|
+
this.fs.copyTpl(
|
|
257
|
+
this.templatePath('.vscode_input/launch.json'),
|
|
258
|
+
this.destinationPath('./.vscode/launch.json'),
|
|
259
|
+
{
|
|
260
|
+
plugin_name: this.answers.plugin_name,
|
|
261
|
+
plugin_manufacturer: this.answers.plugin_manufacturer,
|
|
262
|
+
debug_env_var: `${sanitizeForEnvVar(this.answers.plugin_manufacturer)}_${sanitizeForEnvVar(this.answers.plugin_name)}_DEBUG_PORT`,
|
|
263
|
+
},
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
this.fs.copyTpl(this.templatePath('package.json'), this.destinationPath('./package.json'), {
|
|
267
|
+
ugep_filename: `${this.answers.plugin_name}.ugep`,
|
|
268
|
+
plugin_manufacturer: this.answers.plugin_manufacturer,
|
|
269
|
+
is_effect: this.answers.is_effect,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
project() {
|
|
274
|
+
const plugin_manufacturer = this.answers.plugin_manufacturer;
|
|
275
|
+
const plugin_manufacturer_lower_nospaces = createIdentifier(plugin_manufacturer);
|
|
276
|
+
const manufacturer_code = createFourCharacterCode(plugin_manufacturer);
|
|
277
|
+
const manufacturer_code_hex = createHexCode(manufacturer_code);
|
|
278
|
+
|
|
279
|
+
const plugin_name = this.answers.plugin_name;
|
|
280
|
+
const plugin_name_lower_nospaces = createIdentifier(plugin_name);
|
|
281
|
+
const plugin_code = createFourCharacterCode(plugin_name);
|
|
282
|
+
const plugin_code_hex = createHexCode(plugin_code);
|
|
283
|
+
|
|
284
|
+
const ugep_filename = `${this.answers.plugin_name}.ugep`;
|
|
285
|
+
|
|
286
|
+
const is_effect = this.answers.is_effect;
|
|
287
|
+
|
|
288
|
+
const randomHex = Array.from({ length: 8 }, () =>
|
|
289
|
+
'0123456789ABCDEF'.charAt(Math.floor(Math.random() * 16)),
|
|
290
|
+
).join('');
|
|
291
|
+
|
|
292
|
+
this.fs.copyTpl(this.templatePath('build.ugep'), this.destinationPath(`./${ugep_filename}`), {
|
|
293
|
+
manufacturer_name: plugin_manufacturer,
|
|
294
|
+
manufacturer_name_lower_nospaces: plugin_manufacturer_lower_nospaces,
|
|
295
|
+
manufacturer_code: manufacturer_code,
|
|
296
|
+
manufacturer_code_hex: manufacturer_code_hex,
|
|
297
|
+
|
|
298
|
+
plugin_name: plugin_name,
|
|
299
|
+
plugin_name_lower_nospaces: plugin_name_lower_nospaces,
|
|
300
|
+
plugin_code: plugin_code,
|
|
301
|
+
plugin_code_hex: plugin_code_hex,
|
|
302
|
+
|
|
303
|
+
is_effect: is_effect,
|
|
304
|
+
app_uuid: uuidv4(),
|
|
305
|
+
content_encryption_key: randomBytes(16).toString('hex'),
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
const pluginTemplate = is_effect ? pluginTemplates.effect : pluginTemplates.instrument;
|
|
309
|
+
this.fs.copy(this.templatePath(pluginTemplate), this.destinationPath());
|
|
310
|
+
this.fs.copy(this.templatePath('assets/fonts'), this.destinationPath('./assets/fonts'));
|
|
311
|
+
|
|
312
|
+
const templateInstrumentName = is_effect ? 'Reverb Example' : 'Basic Synth Example';
|
|
313
|
+
const instrumentPath = this.destinationPath(`instrument/${plugin_name}.inst`);
|
|
314
|
+
|
|
315
|
+
this.fs.move(this.destinationPath(`instrument/${templateInstrumentName}.inst`), instrumentPath);
|
|
316
|
+
this.fs.move(
|
|
317
|
+
this.destinationPath(`instrument/${templateInstrumentName}.txt`),
|
|
318
|
+
this.destinationPath(`instrument/${plugin_name}.txt`),
|
|
319
|
+
);
|
|
320
|
+
for (const blobPart of ['part1', 'part2']) {
|
|
321
|
+
this.fs.move(
|
|
322
|
+
this.destinationPath(`assets/instruments/${templateInstrumentName}_${blobPart}.blob`),
|
|
323
|
+
this.destinationPath(`assets/instruments/${plugin_name}_${blobPart}.blob`),
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const instrument = this.fs.readJSON(instrumentPath);
|
|
328
|
+
instrument.Name = plugin_name;
|
|
329
|
+
instrument.Scripts = instrument.Scripts.map((script) =>
|
|
330
|
+
script['Script Path'] === `${templateInstrumentName}.txt`
|
|
331
|
+
? { ...script, 'Script Path': `${plugin_name}.txt` }
|
|
332
|
+
: script,
|
|
333
|
+
);
|
|
334
|
+
this.fs.writeJSON(instrumentPath, instrument);
|
|
335
|
+
|
|
336
|
+
this.justCopy(['licence.txt', 'README.md']);
|
|
337
|
+
}
|
|
338
|
+
}
|