(Preliminary) sample playback cursor#34
Draft
prayerie wants to merge 3 commits intoNitrousTracker:newfrom
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(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
SampleCursorwhich 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 samplein order to accurately calculate the cursor's position for finestep commands
bendNoteandbendNoteDirectalso now return the frequency lookup result (or NULL), which is propagated throughInstrument::bendNote[Direct](it seemed like the simplest solution to me as player.cpp doesn't havelinear_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
SampleCursorsAlso see: NitrousTracker/nitroustracker#205