libtrackerboy

Support library for Trackerboy, also known as the back end of Trackerboy.

v0.9.0 2024-05-27
Links
Changes

Important

  • Nim 2.0.0 is now required.
  • All init procs have been renamed, init(T, ...) -> initT(...)
  • Immutable[ref T] has been replaced by iref[T]
  • Immutable[ptr T] has been replaced by iptr[T]
  • Renamed toImmutable -> immutable

The API in the data module has been completely overhauled:

  • removed types EffectIndex, EffectColumns
  • added consts rangeSpeed, noLoopPoint, noteNone, instrumentNone and effectNone
  • Speed
    • is now a distinct uint8
    • Renamed speedToFloat -> toFloat
    • Renamed speedToTempo -> tempo
    • Added toSpeed, isValid, $ procs
  • added type LoopPoint
  • Sequence
    • renamed field loopIndex -> loop
    • loop field is now of type LoopPoint
    • add isValid proc
    • removed data, data= procs
  • Instrument
    • removed new overload
    • add hash overload
  • Waveform
    • removed new overload
    • add hash overload
  • Renamed SequenceSize -> SequenceLen
  • Renamed OrderSize -> OrderLen
  • Table
    • added proc uniqueIds
  • Order
    • Order is now a seq[OrderRow]
    • add proc initOrderRow, template orow
    • removed procs [], []=, len, setLen, setData, add, insert, remove and swap
  • Effect
    • renamed EffectType -> EffectCmd, each enum starts with ec instead of et
    • renamed field effectType -> cmd
    • renamed proc effectTypeShortensPattern -> shortensPattern
    • renamed proc toEffectType -> toEffectCmd
    • renamed proc effectTypeToChar -> effectCmdToChar
  • TrackRow
    • add types NoteColumn and InstrumentColumn
    • field note is now of type NoteColumn
    • field instrument is now of type InstrumentColumn
    • added procs has, value, asOption, $ for Column types
    • removed procs clearNote, clearInstrument, hasNote, hasInstrument, setNote, setInstrument, queryNote, queryInstrument,
  • Track
    • Track data is now stored using a ref seq[TrackRow]
    • added proc data for accessing the track's data seq
    • removed procs setNote, setInstrument, setEffect, setEffectType, setEffectParam
    • add converter to a TrackView, toView
  • added types Pattern, PatternView, SomePattern, SomeTrack
  • Song
    • add procs $, isValid, removeUnusedTracks, allocateTracks, getRow, effectiveTickrate, patternLen
    • trackLen is now a property instead of a field
    • editPattern and viewPattern templates inject a Pattern variable instead of a template. Use value[channel] instead of value(channel)
  • add types SongPos, SongSpan
  • SongList
    • add procs isValid, data
    • removed overload for get that returns a ref Song
    • added proc mget that returns a ref Song
    • removed procs add, duplicate, remove, moveUp, moveDown
  • Module
    • add proc isValid

Changes to the API in engine:

  • engine internals now utilize the new tracking module
  • modules apucontrol, enginecontrol and frequency have an unstable API, so any changes made to them will not be documented.
  • added proc isPlaying
  • getLocked renamed to locked
  • added proc unlocked
  • invalid starting position given to play no longer results in an IndexDefect being raised, instead the engine is halted.
  • step renamed to tick
  • currentFrame renamed to frame
  • currentSong renamed to song
  • currentNote renamed to note
  • currentState renamed to trackState
  • getTrackTimbre renamed to trackTimbre
  • getTrackEnvelope renamed to trackEnvelope
  • getTrackPanning renamed to trackPanning
  • stepAndApply renamed to tickAndApply
  • EngineFrame object changed
    • halted, startedNewRow, startedNewPattern fields replaced by status: TrackerStatus
    • speed is now of type Speed
    • order and row fields are replaced by pos: SongPos
  • GlobalState object removed, as the engine internals no longer requires it
  • ufAll renamed to updateAll

Added

  • (common) iref[T] and iptr[T] (these replace Immutable[T])
  • (common) FixedSeq[N, T] type for a seq-like container of fixed capacity.
  • (common) Tristate enum
  • (ir) == operator overload for RowIr
  • (ir) runtime proc for an Operation
  • (ir) toTrackRow proc for converting an Operation back into a TrackRow
  • (ir) overload for toIr proc for partial ir conversion
  • (note) NoteRange, Octave, Letter, NoteIndex and NotePair types
  • (note) procs for converting a NoteIndex to a NotePair and vice versa
  • New module, text, for text conversion and parsing of libtrackerboy data.
  • New module, tracking, for tracking playback of a song.

Changed

  • (data) The data module has been overhauled, see above
  • (ir) fromIr(TrackIr) returns a tuple containing a track and a bool
  • (ir) setFromIr proc now returns bool
  • (ir) renamed proc toEffectType -> toEffectCmd
  • modules apucontrol, enginecontrol and enginestate are no longer private and are now located in libtrackerboy/engine
  • (engine) see above for detailed changes.
  • (editing) completely rewritten, safer and easier to use.

Removed

  • (common) MixMode type and related procs.
  • (common) Immutable[T] type and related procs.
  • (data) $ procs for Sequence and WaveData types. Use text module instead.
  • (data) parseSequence proc, use text module instead.
  • (data) parseWave proc, use text module instead.
  • (ir) SongPath and PatternVisit types.
  • (editing) PatternIter, ColumnIter types
  • (notes) note compile-time proc