Examples
This section of the documentation is a autogenerated collection of the HISE Snippet database, which is also accessible through the Help Menu in HISE.
The snippets are single files in this repository and are coallescated at non-regular intervals into this collection, so in order to get the latest examples, make sure to use the inbuilt HISE Snippet browser.
The Snippet Browser
The snippet browser will open a separate HISE instance that can be used to load various snippets and port them over to your project. It has an additional tab on the left that lets you search for snippets:
Note: You can hide that tab with View -> Toggle Snippet Browser .
If you open the snippet browser the first time, you'll be asked to pick a folder where it can download the snippets, just pick any directory and press the download button.
There are also a few example assets for each type (MIDI files, samples, etc.) which are referenced by the snippets to make sure that that everybody can load the snippets correctly.
Contributing to the snippet database
The snippet collection is supposed to be the central hub for any examples for HISE going forward and if you have an example snippet that you think is a good piece of knowledge for other users, it's highly encouraged to share it here.
There are two ways of contributing:
- Do pull requests in the official repository. If you're going to do that regularly we're happy to grant you write access to the repo so you don't have to wait for the pull request approvals.
- Post the snippet content in a dedicated sub forum of the HISE forum. We'll add those to the repos and then delete the posts so that there is no redundant information floating around.
Guidelines for snippets
In order to keep the organisation of the snippet database consistent, please stick to those guidelines when creating the snippets:
Name
Please try to be as descriptive as possible so that your snippet can be found with the search bar.
Note that the search function of the HISE documentation also picks up this title, so if you're naming it after the thing you want to show off, it can be searched in the docs too.
Category
Please pick the relevant category:
- Modules is supposed to demonstrate the usage of HISE modules (eg. the Parametric Equalizer)
- MIDI is supposed to be used for script snippets that perform some kind of MIDI processing (eg. transposing)
- Scripting is the category for anything related to general scripting stuff (eg. API examples or HiseScript language features)
- Scriptnode is the category for snippets that use scriptnode for implementing custom DSP
- UI is used for snippets that show some user interface use cases.
Tags
In addition to the category you can assign one or more tags to your snippet. These are more or less self-descriptive, so if you're using a SNEX node, slap that bad boy on your snippet, etc...
Priority
This field will allow the user to sort snippets by priority - the rationale behind this is that there are some snippets that are supposed to be at the top of the list so that people start with those.
Description
This should be a short description of 2-3 sentences (so that it fits in the preview below). If you're focussing on a single thing in the snippet (eg. a module), then a link to the documenation of that thing would be great.
Snippet design
When designing the actual snippets, please consider these suggestions:
- make the interface as small as possible. If you're making a snippet with a custom slider, make that interface exactly as big as the slider. This way it can be opened with the house icon while still browsing the script code
- if you need external assets (like samples or MIDI files), stick to the example assets provided by the snippet browser. Also if you think that there is a asset type missing, let us know, then we'll add that.
- HISE snippets can now embed external files and you can make use of this for snippets that contain "frameworks" which are supposed to be copied to other projects. Take a look at the RectHelpers example - it has a external script file with all the functions and the main script only includes it and calls some example functions. If you stick to this guideline, people can easily copy the file to their current project using File Menu -> Copy Snippet Script files to current project