Description here
- Cmake >= 2.8.12
- Csound with development headers
- libADLMIDI (https://github.com/Wohlstand/libADLMIDI)
Create a build directory at the top of the source tree, execute cmake .., make and optionally make install as root. If the latter is not used/possible then the resulting library can be used with the --opcode-lib flag in Csound.
eg:
mkdir build && cd build
cmake ..
make && sudo make install
Cmake should find Csound and any other required libraries using the modules in the cmake/Modules directory and installation should be as simple as above.
Multiple types of OPL3 emulation are provided as in libADLMIDI. These are:
DOSBox : fast and quite accurate
Nuked : Very accurate, very CPU intensive
All parameter ranges are representative of the original OPL3 chip which used 8-bit registers, hence ranges such as 0 - 15 and 0 - 3.
The parameters are all integers, so for example with attack, there are actually only 16 possible attack times. Any floating point numbers passed will just
be converted accordingly.
Some examples are provided in the examples directory.
Create an instance of the emulated OPL3 synthesiser.
- ioplhandle : handle to be used in other opcodes to control synthesis
-
aleft, aright : stereo audio outputs
-
iemulation : OPL3 chip emulation type (0 = DOSBox, 1 = Nuked_1.8, 2=Nuked_1.74, 3=Opal, 4=Java)
- irunatpcmrate : run emulation at PCM rate; setting to 1 may reduce CPU usage but lessen emulation accuracy
Play a note using the synthesiser specified by ioplhandle.
- ioplhandle : handle created by the opl opcode
- ichannel : channel for playback (0 - 15)
- inote : midi note number to play
- ivelocity : midi note velocity (0 - 127)
Modify the current instrument parameters and obtain handles to all four operators (oscillators) for further manipulation with the oploperator opcode.
- iop1, iop2, iop3, iop4 : handles for the individual operators to be used by the oploperator opcode.
Alter individual operator parameters. Out of range parameters will wrap around.
Terminate all current notes for the given opl instance.
- ioplhandle : handle created by the opl opcode