DrumMachineProcessor

One tracker node that is a TR-808 or a TR-909, switchable.

Declared in src/libs/libbahn/bahn/tracker/processor/DrumMachineProcessor.hpp
Inherits Processor
Group bahn

Detailed description

The instrument is DrumMachine, a composite Unit<T> in libmediacore. This class is the tracker's side of it: the column layout, what each column is called on the current model, and what its numbers mean.

The columns are the panel, and the panel changes

A combined machine has one problem a single machine does not: the same slot does different jobs on different models. The 808's bass drum has Tone and Decay; the 909's has Tune, Attack and Decay. Both are three knobs in the same three places, so the pattern does not move when the model does — only the labels.

That is what parameterDisplayName is for, and this is its first customer. A slot the current model does not use says "-" rather than showing a number that changes nothing, which is the difference between a control that is off and a control that is absent.

Why the triggers are columns and not notes

A drum machine is not played by pitch. Each drum gets its own column and the value in it is how hard it was hit, which is exactly how the pattern reads on the machines this copies. A single Note column would force one drum per row, and the whole point of a drum machine is that the kick and the hat land together.

0xFF is the no-value on every byte column in this tracker, so it is also "this row does not hit this drum". That costs the loudest velocity, which is why the velocity scale tops out at 0xFE.

Member function documentation

parameterDisplayName

[override virtual] QString DrumMachineProcessor::parameterDisplayName(int parameterIndex) const

What this machine calls each control right now.

Returns the name of the column at parameterIndex on the current model, "-" for a column the model does not use, or an empty string when the schema's own name applies.

specs/bahn-live-feedback, extended to names. The 808 and the 909 put different jobs in the same slots, and the pattern must not move when the model does — so the label moves instead.

parameterDisplayText

[override virtual] QString DrumMachineProcessor::parameterDisplayText(int parameterIndex, Value value) const

What each value reads as.

Returns the text for value in the column at parameterIndex. A column the current model does not use reads "-". The no-value, and a value that keeps its number, give an empty string.

specs/bahn-live-feedback §BLD-3b. Levels are percentages, switches name the jack they have selected, the model names itself, and everything else keeps its number because a tone control has no unit worth printing.

In this section