fredwillmore / si2 Goto Github PK
View Code? Open in Web Editor NEWDSP learning project - Propellerhead Reason rack extension, based on the SimpleInstrument provided with examples in SDK
DSP learning project - Propellerhead Reason rack extension, based on the SimpleInstrument provided with examples in SDK
WHAT IS THIS? This is an example rack extension instrument. It's basically a very simple 128 voice synthesizer. But it has a few features to demonstrate different aspects of rack extension development. For instance: - a GUI with knobs, lamps, displays, wheels and buttons - patch handling with a default patch - an oscillator with sinus and triangle waveforms, that respects the master tuning of Reason - a button (Sample start) that makes each note play a loaded sample - a snare drum sound - CV handling with note and pitch. Connect a Matrix or an RPG-8 and get going - configuration and scripts to generate localized tooltips/remote texts/units and more GET STARTED Build using XCode or Visual Studio. This builds the project either with LLVM/Clang or the native compiler, depending on configuration/target. Both should work, but you will only be able to debug using the native compiler. The normal build scripts (build.py) also installs the rack extension by copying the resulting .lua files, resources and .dll/.dylib to the Rack Extensions folder placed in Windows: %APPDATA%\Propellerhead Software\RackExtensions_Dev Mac: ~/Library/Application Support/Propellerhead Software/RackExtensions_Dev If you want to build using command line, use Python 2.7 and check out build.py found in SDK_DIR/Tools/Build. To get right into the start point where audio is rendered, check out JukeboxExports.cpp/RenderRealtime and SimpleInstrument.h/RenderBatch CODE PROJECT OVERVIEW For this example the most important class is probably CSimpleInstrument. Here's where the rack extension's state is stored. It creates a voice pool and in the render call lets each voice render waveform and sample data to the buffer. Basic MIDI and CV handling is also done in CSimpleInstrument. There is also GUI "project", found under /GUI, that is to be used with the Rack Extension Designer. Declaring all possible properties and configuration of the rack extension is done via the lua scripts found under /Scripts. Note that the gui.lua script is generated via the GUI/scripts/hdgui.lua and Rack Extension Designer. SO YOU WANT TO ... ... change front skin or back skin: Check out the GUI folder and open up the SimpleInstrument.device in Rack Extension Designer. Almost every file in the GUI folder is an XML file (even the .device file). You'll find that scengraphs/front.sg is a good starting point. Much of the appearence can be controlled by the texture .tga files. Check out Panel_Brushed_Metal_01_2U_df and Panel_Back_2U_part_02_df.tga. Change them if you like and make a new export from Rack Extension designer. Read more about graphics in Jukebox GUI Designer Manual. ... add a parameter/knob/slider or similar: There are usually at least three parts to adding e.g. a slider: 1. Check out motherboard_def.lua and add properties under the custom_properties node. More information can be found in GUI Script Reference.pdf 2. You must edit the scenegraph files and hdgui.lua file and make a new export in Rack Extension designer. Do check out the bundled part library in the SDK for UI elements. 3. Write DSP code to handle the slider. Do this in CSimpleInstrument::RenderBatch. ... add some DSP code: If you just want to change something that is audible - a good starting point is the CVoice::RenderIntoBatch function. TIPS Make sure you build for the right architecture (32/64 bit) - the same as Recon. When you're developing your rack extensions it's nice to get a fast workflow. Make sure your build process installs the rack extension in Recon by copying the relevant files. As long as there are no instances of the rack extension in the open song, the .dll/.dylib should be replaceable. By using "Delete devices and tracks" in Recon, then build/install and then press "Undo" you can quickly make the library replaceable on disk and still get working in the state you left off. Sometimes when you make script errors in lua, you'll get a popup that asks if you want to retry to parse the file. It may be tempting to correct the script file and press "Retry" but this function is unfortunately not very stable and you may experience weird errors if using this function. NOTE ON NAMES AND PREFIXES We've used the following naming conventions: iXXX for input parameter (e.g. iSampleBuffer) kXXX for compile time constant value (e.g. kPi = 3.14) CXXX for classes (e.g. CVoice) EXXX for enums (e.g. EWaveformType) declaring public: and private: for every member doxygen style comments
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.