A virtual instrument in CLAP format that emulates various sound chips and converts Midi events into sound chip register writes.
This plugin is controlled entirely with midi commands.
Compatible midi files can be obtained by using vgm-to-midi-converter or gbs2midi
Downloads are in the Releases section of this page.
A sysex message at the start of Midi data is used to select which sound chip that an instance of Thaumoc should emulate.
They use the following format (hexadecimal bytes):
F0 // sysex starting byte
00 43 16 // "Manufacturer ID" for Thysbelon plugins
08 // ID for Thaumoc
03 // The ID of the sound chip to use
00 // The ID of the command to use on the sound chip. "00" is the command to initialize the sound chip, and set that chip as the chip that Thaumoc should emulate.
F7 // sysex end byteLine breaks have been added for clarity; line breaks are optional.
Here is a table of all of the sound chip IDs:
| ID | Soundchip |
|---|---|
| 00 | SN76489 |
| 01 | YM2413 |
| 02 | YM2612 |
| 03 | YM2151 |
| 04 | SegaPCM |
| 05 | RF5C68 |
| 06 | YM2203 |
| 07 | YM2608 |
| 08 | YM2610 (or YM2610B) |
| 09 | YM3812 |
| 0A | YM3526 |
| 0B | Y8950 |
| 0C | YMF262 |
| 0D | YMF278B |
| 0E | YMF271 |
| 0F | YMZ280B |
| 10 | RF5C164 |
| 11 | PWM |
| 12 | AY8910 |
| 13 | GB_DMG |
| 14 | NES_APU |
| 15 | MultiPCM |
| 16 | uPD7759 |
| 17 | MSM6258 |
| 18 | MSM6295 |
| 19 | K051649 |
| 1A | K054539 |
| 1B | HuC6280 |
| 1C | C140 |
| 1D | K053260 |
| 1E | Pokey |
| 1F | QSound |
| 20 | SCSP |
| 21 | WonderSwan |
| 22 | VSU |
| 23 | SAA1099 |
| 24 | ES5503 |
| 25 | ES5506 |
| 26 | X1_010 |
| 27 | C352 |
| 28 | GA20 |
| 29 | Mikey |
| 7F | BLANK |
The list of global sysex commands is as follows (using YM2151 as an example):
- Initialize chip:
F0 00 43 16 08 03 00 F7 - Set clock speed of chip:
4000000 Hz example:F0 00 43 16 08 03 7F 04 00 00 00 00 00 00 F7
3579545 Hz example:F0 00 43 16 08 03 7F 03 05 07 09 05 04 05 F7
Soundchips that can have their clock speed changed:
- YM2151
The YM2151 soundchip is also known as the OPM.
Thaumoc does not have a user interface or extensive documentation. Furnace's user interface and documentation can be a useful tool for learning about the OPM.
The YM2151 core of Thaumoc is designed to be compatible with almost all VOPMex extended mode midi messages.
Features of VOPMex that will not be supported: VOPM and VOPMex compatibility mode, register accurate non-inverted ranges for Total Level (unintuitive range where 0 is loud) and others, enhancements included in VOPMex that aren't accurate to the YM2151 (examples: software LFO, LFO delay).
- Sysex:
Set the emulator core to "ymfm" (default, fast):F0 00 43 16 08 03 01 F7
Set the emulator core to "Nuked-OPM" (accurate):F0 00 43 16 08 03 02 F7 - Midi Note On:
Changes pitch and sends a "note-on" event to the OPM if velocity is greater than or equal to 64; if not, the note will only change pitch. - Midi Note Off:
If the end of a note does not overlap with the start of the next note, a Midi Note Off will send a note-off event to the OPM. - Pitch Bend:
Changes the pitch of a channel without sending a note-on. - LFO Frequency (CC01 and CC33):
A 14-bit combined Control Change. CC01 is the MSB and CC33 is the LSB. Sets the frequency (speed) of LFO, which controls vibrato and tremolo. Global (set for entire chip, not per channel). - LFO Phase Modulation Depth (CC02):
Mutually exclusive with LFO Amplitude Modulation Depth. Using this CC02 will enable LFO PMD and disable LFO AMD. Global. - LFO Amplitude Modulation Depth (CC03):
Mutually exclusive with LFO Phase Modulation Depth. Using this CC03 will enable LFO AMD and disable LFO PMD. Global. - Pan (CC10):
Pans the channel to the left ear, right ear, or center. The YM2151's channels can only be hard panned or centered. Per channel. - LFO Waveform (CC12):
Sets the waveform to use for LFO.
Thresholds (from min to max, the value at which the Midi Control Change will start selecting this waveform):
0: Saw, 32: Square, 64: Triangle, 96: Noise.
Global. - Operator Connections (CC14):
Determines how a channel's operators will be connected to each other. Image that demonstrates how the operators connect for each option.
Thresholds: 0, 16, 32, 48, 64, 80, 96, 112. Per channel. - Feedback Level (CC15): Per channel.
- Total Level (CC16-19):
Sets the volume of a single operator. Each channel has four operators. The exact CC used determines which operator is affected; in this case, CC16-19 selects operators 1-4 respectively.
A high Total Level CC means that operator will be loud. A low Total Level CC means that operator will be quiet.
Per operator. - Multiply (CC20-23): Per operator.
- Detune1 (CC24-27): Per operator.
- Detune2 (CC28-31): Per operator.
- Key Scale (CC39-42):
Determines how much a channel's volume envelope scales with the current note. Per operator. - Attack (CC43-46): Per operator.
- Decay Rate 1 (CC47-50): Per operator.
- Decay Rate 2 (CC51-54): Per operator.
- Decay Level (CC55-58): Per operator.
- Release Rate (CC59-62): Per operator.
- AMS Enable (CC70-73): Per operator.
- LFO Force Reset (CC74):
Use CC74 with a value of 127 (max) to begin the reset, then use CC74 with a value of 0 (min) to finish the reset. Global. - LFO Phase Modulation Sensitivity (CC75): Per channel.
- LFO Amplitude Modulation Sensitivity (CC76): Per channel.
- Noise Enable (CC80): Global.
- Pitch Bend Range (CC81):
This Midi Control Change is not equivalent to any YM2151 register. This CC determines how much a midi pitch bend can change the pitch. For example, at the default pitch bend range of 2, a midi pitch bend set to the maximum value will pitch a note up by 2 semitones. Global. - Noise Frequency (CC82): Global.
- Operator Mask (CC93):
Determines which operators to send a note-on event to during a midi note-on.
This CC contains a bitmask value in binary format. The leftmost 4 digits of the CC's value in binary determine which of the four operators are on. Examples:- A CC93 value of 120 will turn on all operators (binary view of 120: 1111000)
- A CC93 value of 8 will only turn on operator 1 (binary view of 8: 0001000)
- A CC93 value of 16 will only turn on operator 3 (binary view of 16: 0010000)
- A CC93 value of 32 will only turn on operator 2 (binary view of 32: 0100000)
- A CC93 value of 64 will only turn on operator 4 (binary view of 64: 1000000)
Per channel.
Contains all of the wavetable data used in a song. This event should be placed at the start of a midi file.
The wave data consists of values from 0x00 to 0x0F.
example of a simple sysex message that contains two waves:
F0
0F 0F 0F 0F 0F 0D 0B 08 05 03 01 00 00 00 00 00 00 00 00 00 00 01 03 05 08 0B 0D 0F 0F 0F 0F 0F
00 00 00 00 00 00 00 00 00 00 00 00 0F 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0F 0F 00 00
F7
The plugin doesn't have a user interface, so I recommend using Furnace's wavetable editor to create waves, then copy and paste the hexadecimal representation of the wave data into a midi sysex message.
- Midi Note On:
This midi event affects multiple GB registers:- Sets the pitch to the pitch of the note
- Triggers the channel if the velocity of the note is greater than or equal to 64
- Resets the volume (and envelope) of the channel if it was silenced by a note off event The values are reset to whatever the last CC-defined value was.
- Midi Note Off:
Silences the channel.
(On channels with an envelope, envelope direction will be set to "up" and envelope length will be set to zero.)
Because the Game Boy APU doesn't have anything like a note off, the plugin is designed so that midi note off events only have a temporary effect on the Game Boy APU. If the volume (or envelope) is changed or another note is played, the channel will no longer be silent. - Pitch Bend:
Changes the pitch of a channel without triggering it.
Currently, this plugin does not allow the user to change the pitch bend range, but this will be added in a future release. In the meantime, the user can create large pitch bends by using Legato Mode. - Volume MSB (CC07):
Sets the volume of the channel - Pan (CC10):
Sets the stereo panning of the channel. The Game Boy can only pan hard left, hard right, or center. - Pan Mute (CC09) (custom):
In the Game Boy APU, it is possible to mute a channel by setting the panning value to 0. The Midi pan control does not have this functionality, so CC09 sets the panning register to 0 when CC09 is 127. - Envelope Direction (CC12) (custom):
Sets whether the volume envelope should gradually increase or decrease volume. 127 is increase, 0 is decrease. - Envelope Length (CC13) (custom):
Sets the length of the envelope. 0 disables the envelope and makes volume constant. A high number is a long envelope, a low number is a short envelope. - Sound Length Enable (CC14) (custom):
Sets whether the sound length feature is enabled or disabled. 0 is disabled, 127 is enabled. - Sound Length (CC15) (custom):
Sets the length before the channel is automatically silenced. The lower the value, the longer the time before the channel is silenced. - Sweep Speed (CC16) (custom):
Sets the speed of a sweep (singular pitch slide up or down). - Sweep Shift (CC17) (custom):
Sets how much the pitch changes each "step". - Sweep Direction (CC18) (custom):
Sets whether a sweep should cause the pitch to increase or decrease. - Duty Cycle (CC19) (custom):
Sets the shape of a square's waveform. - Noise Length (CC20) (custom):
Sets whether the noise should be long (percussive) or short (slightly melodic). 0 is long and 127 is short. - Wave Index Selector (CC21 and CC53) (custom):
A 14-bit combined CC. CC21 is the MSB and CC53 is the LSB. Sets the waveform to use for the wave channel from the list given in a sysex message. A midi file can have up to 16383 waves.
Thaumoc doesn't have a user interface, it relies on Midi messages to set all of its settings. Because of this, it is important to disable any Midi Reset features in a DAW so that the midi messages sent to Thaumoc match up with the Midi messages you are sending.
If you want to smoothly play many notes in succession, as if all of the notes were a single note with pitch bend, this tip will be helpful.
Set the velocity of all but the first note in the legato sequence to less than half (velocity < 64), this disables sending a note-on event to the emulated soundchip.
Then, select the note ends of every note in the legato sequence and extend them slightly so that the notes overlap each other, overlapping the notes will disable sending a note-off event to the emulated soundchip;
the overlapping notes will not play two notes at once because most soundchips have monophonic channels.
Soundchips that support this method of legato:
- Game Boy APU
- YM2151
Please do not attempt to use this plugin in FL Studio.
Because this plugin converts midi events to Game Boy APU register writes, understanding how the Game Boy APU functions will be very helpful for making music using this plugin. Please read Pan Docs' section on Game Boy Audio.
This happens because this plugin resets its internal emulated APU whenever playback is paused. This is necessary in order to make sure that loud sounds do not continously play when playback is paused, but it also clears wave data from the APU's memory (though the wave data is still stored in the plugin's memory, and the correct wave will be played when resuming the song).
I work around this by placing my notes on channel 1 or 2, then moving those notes to channel 3. This workaround works best if you also have each midi channel on a separate track in your DAW.
The clap folder in src should contain the contents of the clap repository's include folder.
The last time I worked on the CLAP version of this plugin, I used CLAP commit 69a6925.
- ymfm by aaronsgiles and Nuked-OPM by nukeykt which are used to emulate the YM2151.
- This plugin uses Furnace's Game Boy APU emulation core, which is itself derived from SameBoy's APU emulation code.