Holzhaus / rekordcrate

Library for parsing Pioneer Rekordbox device exports
https://holzhaus.github.io/rekordcrate/
Mozilla Public License 2.0
77 stars 12 forks source link

High Level API #92

Open Holzhaus opened 1 year ago

Holzhaus commented 1 year ago

This is an attempt to look into a high-level API to make it easier to read from (and later also write to) Rekordbox device exports without knowing much about the internals.

As first step, I only added support for setting files:

let mut export = DeviceExport::default();
export.load(path)?;
let settings = export.get_settings();

The CLI makes use of the new API when calling the new list-settings subcommand:

$ rekordcrate list-settings data/complete_export/demo_tracks/
On Air Display:                 On
LCD Brightness:                 3
Quantize:                       On
Auto Cue Level:                 Memory
Language:                       English
Jog Ring Brightness:            2 (Bright)
Jog Ring Indicator:             On
Slip Flashing:                  On
Disc Slot Illumination:         2 (Bright)
Eject Lock:                     Unlock
Sync:                           Off
Play Mode:                      Single / Off
Quantize Beat Value:            1 Beat
Hotcue Autoload:                On
Hotcue Color:                   Off
Needle Lock:                    Lock
Time Mode:                      Remain
Jog Mode:                       Vinyl
Auto Cue:                       On
Master Tempo:                   Off
Tempo Range:                    ±10%
Phase Meter:                    Type 1
Vinyl Speed Adjust:             Touch
Jog Display Mode:               Auto
Pad Button Brightness:          3
Jog LCD Brightness:             3
Waveform Divisions:             Phrase
Waveform:                       Waveform
Beat Jump Beat Value:           16 Beat
Channel Fader Curve:            Linear
Crossfader Curve:               Fast Cut
Headphones Pre Eq:              Post EQ
Headphones Mono Split:          Stereo
Beat FX Quantize:               On
Mic Low Cut:                    On
Talk Over Mode:                 Advanced
Talk Over Level:                -18dB
MIDI Channel:                   1
MIDI Button Type:               Toggle
Display Brightness:             5
Indicator Brightness:           3
Channel Fader Curve Long Fader: Exponential
Overview Waveform Type:         Half Waveform
Waveform Color:                 Blue
Key Display Format:             Classic
Waveform Current Position:      Center

Based on #90 and #91.