Skip to content

(Preliminary) sample playback cursor#34

Closed
prayerie wants to merge 3 commits into
NitrousTracker:newfrom
prayerie:samplecursor-ntxm
Closed

(Preliminary) sample playback cursor#34
prayerie wants to merge 3 commits into
NitrousTracker:newfrom
prayerie:samplecursor-ntxm

Conversation

@prayerie

@prayerie prayerie commented Feb 17, 2026

Copy link
Copy Markdown

(maybe the way I have done things here isn't really optimal, hence the draft status)

Adds required prerequisites to libntxm for sample cursor display, specifically:

the struct SampleCursor which contains information needed by the sample display to render the cursor: specifically the calculated current position of played audio (playbackpos), the frequency it is currently playing at (playbackfreq) to calculate how far the cursor should move, whether the note is playing, whether it is currently playing backwards (in the case of a ping-pong loop), and finally the sample and instrument idx so the sample display can ignore it if it's not relevant to the selected sample

in order to accurately calculate the cursor's position for finestep commands bendNote and bendNoteDirect also now return the frequency lookup result (or NULL), which is propagated through Instrument::bendNote[Direct] (it seemed like the simplest solution to me as player.cpp doesn't have linear_freq_table_lookup, and the sample's existing finetune property does not relate to effect commands.

also a new FIFO command to communicate the shared memory address of the array of SampleCursors

Also see: NitrousTracker/nitroustracker#205

@prayerie

Copy link
Copy Markdown
Author

closing this because i renamed/redid some stuff

@prayerie prayerie closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant