timecode_tools 0.1.0
timecode_tools: ^0.1.0 copied to clipboard
SMPTE timecode reader. Reads LTC from a stream of PCM audio and MTC from a stream of MIDI bytes: 24, 25, 29.97 drop-frame and 30 fps, lock status and a jitter-free clock. Backed by the timecode-tools [...]
0.1.0 #
- Initial release.
- Decoding and the lock / loss / jump rules run in the timecode-tools Rust
core through
dart:ffi; the native library ships prebuilt for macOS, iOS, Android, Linux and Windows and is bundled by a build hook. On the web, receivers and the decoder throwUnsupportedError. LtcReceiver: reads LTC from aStream<PcmChunk>of audio, with channel selection (1-based).MtcReceiver: reads MTC from aStream<MidiChunk>of raw MIDI bytes (quarter-frame and full-frame messages).- Both implement the
TimecodeReceiverinterface:frames,events(StateEvent:lock/lost/jump/end, input errors as stream errors),isClosed,waitFor,positionAt/framesAt,offsetFrameslatency compensation, andBackpressure.latest(default) /Backpressure.allfor slow listeners.framescarries the followed timeline while locked; jumps are confirmed by two contiguous frames. - Golden files shared with the Rust core (
test/goldens) are replayed in the tests. FrameRate(auto, 24, 25, 29.97 drop-frame, 30) andTimecode(parse, format,frameRate, frame index,addFrames,compareTo).LtcDecoder: low-level streaming LTC decoder (push,pushBytes); eachLtcFramecarrieslockedandestimatedFps.LtcClockModel: least-squares clock over the input clock.encodeLtcSequence: a small LTC synthesizer for tests.