Docs Home
Building HMSL from Source
You probably don’t need to build HMSL from source.
You can download a precompiled binary release from GitHub and try it out.
But if you want to modify the C++ part of HMSL then read on.
Install JUCE
JUCE is required to build HMSL. Install JUCE from here
Building on OSX
The folder containing HMSL needs to be called “HMSL” so that the proper working directory can be
found by the HostFileManager in HMSL.
The XCode project was exported using the ProJucer tool.
New C/C++ files should only be added using the ProJucer.
Checking out the code
HMSL runs in a Sandbox that only allows it to access files in the ~/Music folder.
cd ~/Music
mkdir hmsl_repo # if needed
cd hmsl_repo
git clone https://github.com/philburk/hmsl.git HMSL
cd HMSL/pforth
git submodule init
git submodule update
Exporting from ProJucer
Unless you need to add a JUCE file, or update the JUCE version, you can probably skip to “Compiling the JUCE port” below.
- Open the folder “native/juce”
- Double click on JuceHMSL.jucer
- Add files if needed by opening File Explorer and right clicking on Source.
- At the top of the ProJucer page, set “Selected exporter” to “XCode (macOS)”
- Click on the white and blue circular icon to the right of that menu to “Save and Open IDE”.
Compiling the JUCE port
- Launch the XCode project at “HMSL/native/juce/Builds/MacOSX/JuceHMSL.xcodeproj”.
- In “JuceHMSL/Source/ForthThread.cpp”, set PF_COMPILE_SYSTEM to 1
- Run the application from XCode.
- It will open a terminal window and compile the pForth dictionary.
- Close the terminal window.
- Move the dictionary file from “HMSL/pforth/fth/pforth.dic” to “HMSL/hmsl/pforth.dic”.
- In “HMSL/native/juce/Source/ForthThread.cpp”, set PF_COMPILE_SYSTEM to 0
- Run the application. It will open a terminal window.
- Enter: include fth/make_hmsl.fth
- It will compile HMSL and save a new pforth.dic.
- Enter: BYE
- Close the terminal window.
- The next time you run the application, it will initialize HMSL.
Packaging a Release for Mac OS
- Checkout the master repositories of HMSL and pForth.
- Update the version number in native/juce/Source/Main.cpp
- Update master repository.
- Build the app as described above.
- Open the folder ~/Work/hmslWork/HMSL_Release/HMSL/hmsl.
- Replace the JuceHMSL.app file in that folder with “~/Music/hmsl_repo/HMSL/native/juce/Builds/MacOSX/build/Debug/JuceHMSL.app”.
- Replace the pforth.dic file with “~/Music/hmsl_repo/HMSL/hmsl/pforth.dic”.
- Replace the “pieces” folder with “~/Music/hmsl_repo/HMSL/hmsl/pieces”.
- Replace the “tools” folder with “~/Music/hmsl_repo/HMSL/hmsl/tools”.
- Replace the “amiga” folder with “~/Music/hmsl_repo/HMSL/hmsl/amiga”.
- Make a zip file from HMSL_Release/HMSL.
- Rename it “HMSL_{version}.zip” using underscores, eg. “HMSL_0_5_5.zip”
Test the Release
- Drag the ZIP file to a folder on Google Drive.
- Download the ZIP file to ~/Downloads.
- Uncompress the ZIP file and drag the resulting “HMSL” folder into ~/Music.
- Hold down the Ctrl key and right click on the JuceHMSL.app icon.
- Click the Open button. (If you are an expert in Apple certificates, please open an Issue and offer to help me fix this.)
- HMSL should ask you to initialize by entering: y
- Wait 5 seconds for HMSL to initialize.
- Enter: SHEP
- You should hear some notes and see the Shape Editor appear.
- Close the Shape Editor window.
- Enter: include hap:swirl.fth
- Enter: swirl
- Hear some odd bells and an “Uhh” sound.
- Clock the “Forward” button. The shape should start rotating in a {time,pitch} space.
- Close the SWIRL window.
Make a Release on GitHub
- Look at the PRs and Commits since the last Release and prepare Release Notes.
- Under Releases, create a new release and drag the new ZIP file to attach it.