Tabula Sonora 0.1.0
A native C++20 implementation of the Roland Sound Canvas VA synth voice
Loading...
Searching...
No Matches
ts::DrumKey Struct Reference

One drum key's settings within a kit. More...

#include <tabulasonora/drum_kit_table.hpp>

Public Attributes

int tone = 0
 Tone number. Drum sounds are ordinary melodic tones.
int level = 0
 Kit level for this key. Applies downstream as (level / 127)^2.
int pitch = 0
 Coarse pitch, 60 being the tone's natural pitch.
int group = 0
 Mute/assign group; keys sharing a non-zero group cut each other off.
int pan = 0
 Pan position, per key.
bool receives_note_off = false
 Whether this key responds to note-off at all — GS Rx.Note Off, per key.
bool receives_note_on = true
 Whether this key responds to note-on — GS Rx.Note On, bit 4 of the same plane.

Detailed Description

One drum key's settings within a kit.

Member Data Documentation

◆ tone

int ts::DrumKey::tone = 0

Tone number. Drum sounds are ordinary melodic tones.

◆ level

int ts::DrumKey::level = 0

Kit level for this key. Applies downstream as (level / 127)^2.

◆ pitch

int ts::DrumKey::pitch = 0

Coarse pitch, 60 being the tone's natural pitch.

◆ group

int ts::DrumKey::group = 0

Mute/assign group; keys sharing a non-zero group cut each other off.

◆ pan

int ts::DrumKey::pan = 0

Pan position, per key.

◆ receives_note_off

bool ts::DrumKey::receives_note_off = false

Whether this key responds to note-off at all — GS Rx.Note Off, per key.

Almost none do. A drum is a struck sound whose envelope is its whole story, so releasing it early is wrong; the exceptions are the sounds you have to be able to stop, and the kit records say exactly which. In the SC-88 Standard kit one key sets it, key 25, the snare roll. The Orchestra kit adds key 88, Applause. The SFX kit sets it on 52 of its 128 keys. That is GS's documented behaviour read straight out of the ROM rather than assumed.

Bit 0 of the kit record's receive plane. The engine copies that plane per part and lets drum-setup SysEx rewrite it, so this is the default, not the last word.

◆ receives_note_on

bool ts::DrumKey::receives_note_on = true

Whether this key responds to note-on — GS Rx.Note On, bit 4 of the same plane.

The module's note-on dispatch refuses the key outright when this is off (note_on_dispatch tests 0x480[key] & 0x10 before anything else), which is how a file silences individual drum keys without emptying their track.


The documentation for this struct was generated from the following file: