Skip to content

Releases

openvave 0.4.0

Choose a tag to compare

@gustavolima00 gustavolima00 released this 18 Nov 21:07

Remote editing without edit mode, and the first release that can change stored presets:
set now works in normal mode, preset reload discards edits, bypass and loopback toggle
volatile state, and preset save / preset restore write stored presets behind --unsafe and
an automatic, verified backup. Every new message was first sent by openvave on the owner's pedal
(fw 96) in two gate sessions, with a backup before and after each step.

Added

  • Several fields over one connection: openvave set gain=95 treble=58 reverb_decay=room:18 delay_on=on led_colour=#2040ff --experimental. One session reads the pedal once, sends every
    knob field in a single knob-block write (rebuilt from that read), then each block switch and the
    LED colour, and checks each write's ACK and re-read before the next. Typed knobs take
    POSITION, TYPE:POSITION or raw:N. The batch is refused as a whole, with nothing sent, if
    any field is; fields already set are skipped. --dry-run prints every frame; --json prints
    a set-fields-result.schema.json document, also when the batch stops midway. A failure
    mid-batch (NAK, lost link, re-read differs) stops without retrying and lists every field as
    applied / unknown / not applied / not sent. The set FIELD VALUE [--type | --raw] form is
    unchanged. Library: TankG.plan_set_fields(changes) / set_fields(changes), new types
    EditPlan, EditWrite, FieldEdit, EditResult, EditWriteOutcome, and
    OpenvaveError.edit (the partial result on an error raised mid-batch).

  • openvave preset reload [--discard-edits] [--dry-run] / TankG.reload_preset() /
    TankG.plan_reload(): discards unsaved edits by selecting the loaded preset again (the
    confirmed preset-select write) and verifies the buffer equals the stored preset. Nothing is sent
    when there is nothing to discard; edit mode needs --discard-edits.

  • Reverb types for the decay knob, named as in the Tank-G manual: room, spring, cloud
    (the app's blue, orange, green sections; between two types the reverb is off).
    openvave set reverb_decay 10 --type spring; without --type the preset's current type is
    kept (refusal type_required when the knob sits between two types); --raw 53 writes the raw
    byte. Library: set_field("reverb_decay", ("spring", 10)), (None, 10) to keep the type,
    openvave.protocol.REVERB_TYPES, TYPED_FIELDS, type_raw(), type_parts(). Output shows
    both readings (5 (room 6) → 53 (spring 10)).

  • The same for MOD FX (chorus, phaser, tremolo) and DLY MIX (analog, tape, dual):
    set mod_fx 20 --type phaser, set delay_mix 30 --type tape; preset dump / watch show
    type: chorus 1. Their split was checked against the phone app on the pedal (15 readings, all
    fit). openvave.protocol.MOD_FX_TYPES, DELAY_MIX_TYPES.

  • Bypass: openvave bypass on [--discard-edits] sends 01 to
    0xE1000000 + i for the loaded preset (normal mode only) and reports applied when the pedal
    reads slot ff with an all-zero buffer, then prints Leave bypass: openvave bypass off 1B.
    openvave bypass off <position> leaves bypass with the confirmed preset select, only when the
    pedal is bypassed (refusal not_bypassed otherwise); without a position it exits 2 and names
    the bank the pedal reports. Library: TankG.plan_bypass_on() / bypass_on() (result
    return_index), plan_bypass_off(i) / bypass_off(i), WriteTarget.bypass(i). The message is
    confirmed on fw 96 (spec 004 gate sessions A and B), so bypass on runs without
    --experimental.

  • Loopback (experimental): openvave loopback on|off reads the status byte (0xD0000000),
    writes 01/00, and reads it back; never followed by a commit; an equal value sends nothing.
    Library: TankG.plan_loopback(on) / set_loopback(on), WriteTarget.loopback(). Message
    observed: on mixes the pedal's Bluetooth audio (e.g. a phone backing track) into the USB
    recording, off leaves it out (still heard); the flag persists across a power cycle.

  • WriteTarget.persistent and refusal reasons edit_mode and not_bypassed. The write
    allowlist grows by the two volatile kinds above; bypass data other than 01, an index above 35,
    loopback data other than 00/01 or any other length stay unencodable.

  • Save (UNSAFE): openvave preset save [--to POSITION] --unsafe stores the edit
    buffer in the loaded slot (or --to), normal mode only, with the phone app's sequence: slot
    write to 2 + 21·i (21 bytes), read back (a mismatch stops before the commit), 300 ms, the
    empty commit write to 0xF0000000, 100 ms, select, then verifies stored slot, position and
    buffer. Nothing to save: 1C already holds this sound; nothing sent. Library:
    TankG.plan_save(to) / save_preset(to, unsafe=True, on_backup=…). The slot write and the
    commit are confirmed on fw 96 (gate sessions A and B).

  • Restore (UNSAFE): openvave preset restore FILE (--slot POSITION | --all) --unsafe writes back an openvave backup file, checked before connecting
    (openvave.backup.restore_problems). --slot uses the save sequence with the file's bytes;
    --all writes the whole 758-byte image to 0x0 in one message (split over several Bluetooth
    writes by the transport), commits, selects the preset that was loaded and verifies with a full
    read. Lists the slots that differ; nothing differs → nothing sent. A file from another firmware
    needs --experimental (firmware_mismatch); unsaved edits need --discard-edits. Library:
    TankG.plan_restore(backup, slot=i | all=True) / restore(...). The slot write, the image
    write and the commit are confirmed on fw 96 (gate sessions A and B).

  • Both take an automatic backup before the first write
    (tankg-backup-<time>-before-save|restore.json in --backup-dir, never overwriting) and stop
    if it fails its cross-check or cannot be written. A failure mid-sequence prints every step
    (ACK / NAK / no reply / not sent), whether stored presets may have changed, and the recovery
    commands; nothing is retried. Exit codes as before (1 refused, 6 lost link, 7 NAK, 8 read-back
    differs). JSON: sequence-result.schema.json.

  • New opt-in --unsafe (unsafe=True), required by every command that changes stored presets and
    never implied by --experimental; refusal reasons unsafe_required and firmware_mismatch.

  • Three persistent write targets, WriteTarget.stored_slot(i), .commit() and
    .stored_image() (persistent is true for them), rows in "Write messages" at confirmed
    on fw 96 (spec 004 gate sessions A and B), so save and restore run without --experimental;
    --unsafe is still required. Only save_preset / restore send them, only with
    unsafe=True, after the backup. Library types SequencePlan, SequenceStep,
    SequenceResult, StepOutcome; errors raised mid-sequence carry .sequence.

  • The BLE transport splits a request longer than one Bluetooth write (ATT MTU − 3) into
    consecutive chunks (only the 773-byte image write needs it; observed at MTU 185: one ACK).

  • Pedal state: openvave.PedalState, openvave.protocol.classify(global, buffer),
    TankG.state() (confirms bypass with a second read 300 ms later) and
    DeviceSnapshot.pedal_state. info and preset dump print a state: line (in bypass: no
    decoded preset fields and bank <n>, slot not reported); watch prints the state in its header
    and a line when it changes (loading for one bypass-looking cycle, bypass for two). JSON adds
    a top-level pedal_state to info and preset dump and to watch --json start and change
    events; existing fields keep their meaning (schema_version 2).

Changed

  • openvave set works in normal mode (spec 004 check 1: the app never enters edit mode, and
    the knob block is applied in normal mode, confirmed over two connections). It is refused in
    tuner mode (tuner_mode), while the pedal is bypassed (bypassed) and in states openvave does
    not recognise (unrecognised_state). The refusal reason not_edit_mode is no longer raised.
    Block switches and led_colour still need --experimental.

  • The "Not saved" line after a write now names the discard command
    (Not saved. Discard: openvave preset reload).

  • openvave can now change stored presets, replacing the 0.3.0 statement that it never saves or
    overwrites one: it does so only through preset save and preset restore, only with --unsafe,
    and always after an automatic, verified backup. Every other write stays volatile.

  • openvave preset dump now also reads the global block (to report the pedal state).

  • Connecting is faster: the Bluetooth scan stops 1 s after the pedal is seen (or as soon as the
    --device identifier is seen) instead of always waiting --scan-timeout (5 s). A second pedal
    seen within that second still gives exit 4. openvave.discover() still scans the whole timeout.
    Measured before: set gain 90 took 11 s on macOS.

  • JSON write results validate against the spec 004 extension of the schema
    (write-result.schema.json):
    commands preset reload, bypass on|off, loopback on|off, target kinds bypass and
    loopback, the new refusal reasons, change region status, and return_index /
    return_position in a bypass on result.

  • A write refused because the pedal is bypassed now points to openvave bypass off <position>.

  • preset dump and watch human output show reverb decay (preset byte 15) as reverb type and
    position: type: room 6 after the field line (off between types), and
    5 (room 6) → 64 (spring 21) in watch changes. JSON is unchanged (schema_version 2, raw value
    only). Library: `openv...

Read more

openvave 0.3.0

Choose a tag to compare

@gustavolima00 gustavolima00 released this 17 Nov 17:12

The first release that writes to the pedal, and only to the edit buffer: a full backup of the
36 stored presets, then guarded writes of one field or one preset select at a time. Nothing is
ever saved: leaving edit mode on the pedal without saving restores the stored preset. Every write
was first sent by hand on the owner's pedal (fw 96) with a backup before and after; the backups
were identical.

Added

  • openvave preset backup [--output PATH] [--force]: reads the stored-image header, the 36 stored
    presets one by one and the whole image, cross-checks them, and writes a versioned JSON file
    (backup.schema.json).
    Read-only (0x11 and 0x23 only). A cross-check mismatch writes no file and exits 7.
  • openvave set <field> <value>: changes one field of the current preset in the edit buffer. Knobs
    and selectors (gain, treble, …, amp_type, ir_cab), block switches (amp_on, mod_on,
    delay_on, reverb_on: on/off) and led_colour (#rrggbb or r,g,b). Refused unless
    the pedal is in edit mode. After the write it checks the ACK and re-reads the buffer.
  • openvave preset select <position>: selects preset 1A–9D (or index 0–35). Refused in edit
    mode unless --discard-edits (the unsaved edits are lost). Reports applied only when the pedal
    shows the new bank and slot and the buffer equals the stored preset.
  • --dry-run on set and preset select: does the reads, prints the exact write frame, sends
    nothing. The frame printed is the frame that would be sent.
  • --experimental: needed for a write whose message is not yet confirmed, or on firmware other
    than 96. Confirmed on fw 96 (two independent hardware sessions): the knob block and preset
    select, so set gain 90 and preset select 2C run without it. Still observed (one session):
    the four block switches and the LED colour.
  • Exit code 8: the pedal acknowledged a write but the re-read does not show it (not applied).
    Exit 1 now also covers a refused write; exit 7 covers a NAK (raw reply printed). Writes are never
    retried.
  • --json for the three commands: the 0.2.0 envelope plus backup / saved_to, or plan and
    result
    (write-result.schema.json).
    schema_version stays 2.
  • Library: TankG.backup(), plan_set(), set_field(), plan_select(), select_preset();
    types Backup, StoredPreset, WritePlan, WriteResult; errors WriteRefusedError,
    WriteNakError, WriteNotAppliedError; openvave.protocol.StorageRead, WriteTarget,
    WRITE_MESSAGES, build_write, parse_write_reply, build_storage_read,
    parse_storage_reply
    (library contract).
  • openvave.protocol.reverb_decay_parts(raw) and REVERB_SECTIONS: preset byte 15
    (reverb_decay) read the way the phone app shows it, as a colour section (blue, orange or green,
    44 raw values each; most likely the reverb type) and a position 1–40, or X past 40. JSON is
    unchanged (schema_version 2): reverb_decay still reports the raw 0–127 value.

Changed

  • Safety: the encoder now accepts write memory (0x22), but only to four targets, all in the
    edit buffer (Write messages):

    • knob block 0x10000004 × 14 (preset bytes 4–17),
    • block switch 0x10000000 + k × 1, k = 0–3 (preset bytes 0–3),
    • LED colour 0x10000012 × 3 (preset bytes 18–20; whether they drive the LED is still a
      hypothesis, so the byte map leaves them unnamed),
    • preset select 0xE0000000 + i × 1, data 01, i = 0–35.

    Erase (0x21), the save commit (0xF0000000), stored-preset writes (0x0–0x2F5) and the
    loopback write (0xD0000000) still cannot be encoded: openvave never saves or overwrites a
    stored preset.

Tested

  • Firmware 96 on macOS 26: two backups identical; two gate sessions of writes (2026-11-17),
    eleven writes in all, each ACKed and applied, each followed by a backup equal to the first.

Full changelog: https://github.com/gustavolima00/openvave/blob/v0.3.0/CHANGELOG.md