Version 1.0 (20th April 2018): by Benoit Bouchez (alias iModularSynth)
Version 1.1 (20th April 2018): typos corrected.
Version 2.0 (23rd February 2024): Overhaul.
Version 3.0 (22nd May 2025) : Overhaul and update.
This document is a short tutorial explaining how to create a user module for Usine Hollyhock using Visual Studio on Windows platform. It is not meant to explain how Usine modules are working, the SDK User Manual made by Martin Fleurent is perfect for that.
The example given here was created for Usine Hollyhock 7 and ascendent compatibility is ensured.
Before you begin, ensure that Visual Studio (v2017 or later) is installed on your machine.
Download the Usine SDK from BrainModular's website and copy the entire directory to your hard drive. The SDK includes examples that help you understand how Usine operates and what’s required to develop your own modules. Each example comes with its solution files, allowing you to explore the code and understand every key aspect of user module development.
We will concentrate here on the steps to follow to create modules from scratch (you can then copy source code from the projects in the SDK to have a good starting point).
Once the SDK is copied on your hard drive, you should see the following structure in the SDK folder.

Technically, user modules are DLLs (Dynamic Library), but certain project properties must be configured to ensure that Usine can load and use them properly. The screenshots in this tutorial were taken with Visual Studio Community 2022. Other versions of Visual Studio may look slightly different, but the procedure remains the same.
Start Visual Studio and create a new project :

On the next page, select "Empty C++ project", enter the chosen name for your module and its location.

First you should add the SDK files to your project. To do so, right click on the solution name in the solution explorer and navigate to “Add” → “New Filter” :

Rename the newly created filter to “SDK” then, right click it and navigate to “Add” → “Existing Item…” :

In the following popup screen, find Usine’s SDK on your computer, navigate to its “sdk” subfolder, select all contained files and click “Add” :

You will at least need one C++ class to build your module. In the future you may freely add more classes to your project.
To add your class to the project, right click on the project’s name in the solution explorer and navigate to “Add” → “Class…”. On the next popup screen, select the wanted name of the class and click “Ok” :

You should now have a project with the following architecture :

In this section we will only consider a debug build configuration for Intel x86_64, the steps taken here must be repeated for any other build configuration you may choose. First open the project’s properties by opening the “Project” tab in the top toolbar then “Properties” :

This will open the project’s properties window. This window contains multiple sections, we will go over what settings need changing for each of them next.
First in the general tab change the Configuration Type to “Dynamic Library (.dll)”. You may also need to change the C++ Language Standard, Usine’s SDK should support any standard for C++11 onwards. As this setting depends on what you’re doing we will leave it as default :

Then navigate to the “Advanced” tab, here you’ll need to change two settings :

In the “C/C++” → “General” tab, add the path to the sdk folder on your computer, this path can either be absolute or relative to the solution :

We’ve covered every step needed to build a user module for Usine, you may want to set post build events to copy your binary into Usine’s installation folder automatically. Also, you can freely include any library or header file that you wish to use.
To use Visual Studio’s debugger, you need to declare the executable used to start your module (don't forget that a user module in Usine is nothing than a DLL, it can't then run by itself)
In your project’s properties, go to the Debugging tab. Click on Command Line editing area and when the drop-down list appears (down arrow on the right), scroll to "Browse". Browse to the Usine executable located into the bin folder of Usine (the executable located at the root of Usine’s installation folder is a dummy .exe file that only serves to launch the real program in the bin directory) :

version 7.0.250121
Edit All Pages