A driver is a crate under crates/drivers/ that exposes one
pub static DRIVER. Its folder and its driver id (Info::id) are
<vendor>-<model>, and its package is oscyl-<vendor>-<model>, for
example oscyl-korg-minilogue-xd. A crate that a family of synths shares
is oscyl-<family>, as oscyl-logue. The tutorial’s oscyl-tutorial-synth
is the one exception. Of the 53 methods of Driver, 18 are required, and the
other 35 have defaults. The apps use it only as &dyn Driver. A required
method has no default. An optional method has a default that suits a
driver which does not use it.
The synth’s protocol for one connected synth, sans IO: it never touches a
port or a clock. Oscyl gives it the bytes and the time. Most sessions keep
an Engine, the request engine,
which keeps one request in flight. Every method is required.
An operation is a SessionOp:
ReadCurrent, ReadPrograms, WritePrograms or Audition. Its results
are SessionEvents: Current,
Program, Progress, then Done or Failed.
An optional decoder of the Control Changes that a synth’s panel sends,
from Driver::panel_listener. Its one method,
control, gives the field and the value that a
Control Change sets, once the value is complete.
oscyl_conformance::run(&DRIVER) runs these checks in order, against the
driver’s simulator. A failure panics with <driver id>: <check>: <what>.
Check
What it proves
init_program
The init program is valid, and its name is not empty and uses allowed characters.
fields
Every field takes its minimum and its maximum, reads them back, and changes no other field. One step outside the range is refused.
names
A name of the longest length reads back. One character more is refused.
wrong_length_programs
A program one byte short or one byte long is refused by every method that takes a program.
rejects_bad_targets
A write to a factory slot or past the last slot, and a read past the last slot, fail at submit and send nothing.
file_formats_round_trip
Every file format gives back the programs, and the author and comment when it keeps them. A second round trip changes nothing. An unknown format is refused.
write_then_read_back
A write to the first, second and last slot of each writable bank ends Done. The simulator then holds the programs and is settled, and a read gives them back.
audition
With an edit buffer: an audition ends Done, the edit buffer holds the program, and ReadCurrent gives it back.
progress
Reads and writes report progress that rises to the total, and Done comes last.
faults_never_report_false_success
With each fault: a write that ends Done stored every program, and a read returns only what the synth holds.
lost_replies_fail
The simulator has lose_reply. With it, every operation ends Failed.
curation_covers_every_field
Every field is in exactly one section or excluded, and at least one is shown. Every shown field has a label and a control that fits it.
formats_every_value
Every field’s minimum and maximum format as text that is not empty.
generation_is_deterministic_and_valid
For each character, the same recipe gives the same bytes, and every value is in range. Kept fields and pages stay, and vary, breed and morph behave.
live_messages_are_well_formed
Live messages exist only with live_changes, and each one is one complete channel message on the channel asked for.
presentation_is_consistent
Emphasized fields are shown, labels exist, categories are listed, and graphs, handles and drags stay within the pages and fields.
recognizes_its_simulator
Port hints exist. The driver recognises its simulator’s identity reply from any channel, but not the inquiry itself and not another maker’s reply.
app_hooks
The demo library is valid and fits the writable slots, the demo simulator is recognised, and the list facet is an in-range choice field.