libtrackerboy/private/player

Source   Edit  

DO NOT INCLUDE THIS MODULE!

This module is intended to only be used internally by trackerboy modules.

take me back home ↩

Types

Player = object
  
Source   Edit  

Procs

func init(__1862270996: typedesc[Player]; song: Immutable[ref Song];
          loops: Natural): Player
Creates a player to loop the given song a given number of times. If song is nil or loops is 0, the resulting player will not play. Source   Edit  
func init(__1862271003: typedesc[Player]; frames: Natural): Player
Creates a new player that will play for a given number of frames. Source   Edit  
func init(__1862271008: typedesc[Player]; framerate: float; seconds: Natural): Player
Creates a new player that will play for a given number of seconds. The number of frames that are played is determined by the given framerate in units of frames per second (Hz). Source   Edit  
func isPlaying(p: Player): bool {....raises: [], tags: [], forbids: [].}
The player's playing status. The player is finished playing when the status is false. Source   Edit  
func progress(p: Player): int {....raises: [], tags: [], forbids: [].}
Current progress until the player finishes. A number from 0 to progressMax will be returned. This value can be used to indicate progress to the user. The unit of this value depends on how the Player was initialized. Source   Edit  
func progressMax(p: Player): int {....raises: [], tags: [], forbids: [].}
Maximum value of the player's progress. Source   Edit  
proc step(p: var Player; engine: var Engine; instruments: InstrumentTable): bool {.
    ...raises: [], tags: [RootEffect], forbids: [].}
Steps the engine if the player is currently playing. Source   Edit  

Templates

template play(p: var Player; engine: var Engine; instruments: InstrumentTable;
              body: untyped): untyped
Calls p.step until the player finishes playing, executing body for each step. Source   Edit  

Exports

PositiveByte, pansRight, isNil, currentSong, takeOperation, ByteIndex, ==, EngineFrame, halt, currentFrame, getLocked, Engine, stepAndApply, apply, getTrackEnvelope, lock, Immutable, init, isLocked, toImmutable, Pcm, isHalted, PcmF32, Module, ApuIo, unlock, MixMode, Song, jump, ==, setup, getTrackPanning, currentNote, ChannelId, ==, [], step, getTrackTimbre, reset, play, currentState, pansLeft, [], new, isValid, editTrack, new, viewPattern, PcmF32, toEffectType, ==, contains, SomeTable, TrackId, ModulePiece, Track, init, nextUnused, defaultSpeed, $, viewTrack, isValid, EffectIndex, getTickrate, items, new, remove, InstrumentTable, isEmpty, revisionMinor, defaultTrackSize, [], MixMode, data, ==, EffectType, WaveData, version, SomeData, add, insert, capacity, editPattern, ==, remove, defaultRpb, parseSequence, len, pansRight, items, init, setInstrument, init, [], ByteIndex, ==, Tickrate, setTrack, setEffectParam, [], unitSpeed, OrderId, OrderRow, Immutable, init, moveUp, Effect, ==, init, [], []=, [], estimateSpeed, new, duplicate, speedToFloat, defaultTickrate, setLen, len, setNote, TableId, [], queryNote, SequenceKind, [], tempo, patternLen, [], [], PositiveByte, data=, init, SongList, Speed, items, []=, data=, getRow, moveDown, init, OrderSize, getTrackView, Order, [], trackIds, totalRows, Pcm, pansLeft, totalTracks, removeAllTracks, Instrument, setEffect, getRow, nextAvailableId, []=, next, len, EffectCounts, mitems, Sequence, totalRows, mitems, new, System, speedToTempo, init, isNil, swap, TrackRow, queryInstrument, defaultRpm, add, duplicate, setEffectType, SomeTrack, init, remove, data, Waveform, ==, InfoString, init, $, TrackLen, ==, setLen, wavedata, Module, parseWave, getTrack, items, Song, [], EffectColumns, add, []=, len, toInfoString, TrackView, ChannelId, add, hertz, SequenceSize, toImmutable, WaveformTable, effectTypeShortensPattern, revisionMajor, insert