Skip to content

TT: copying Queue to a pattern erases complete pattern #295

Description

@wolfgangschaltung

TT: copying Queue to a pattern erases complete pattern

Teletype v4.0.0 CBAEE74

What steps are required to reproduce the bug?

  1. load empty scene
  2. ensure you are in Live mode
  3. P 63 1 (in Live mode, set index 63 of working pattern to 1, working pattern is 0)
  4. Q 2 (in Live mode, place 2 into the queue)
  5. Q.N (in Live mode, get queue length: length is 1)
  6. Q.2P (in Live mode, copy entire queue to current pattern)
  7. TAB twice to see Tracker
  8. in Tracker, index 0 of pattern 0 contains 2 (expected)
  9. in Tracker, index 0 of pattern 0 contains 0 (unexpected, expected to still be 1 per step 3)

Notes

As I am not a developer, my code knowledge is extremely (!) limited, so please take the following with the proverbial grain of salt, as it is just a dilettante thinking out loud: Both lines 524 and 535 in teletype/src/ops/queue.c say
int8_t end_at = PATTERN_LENGTH < Q_LENGTH ? PATTERN_LENGTH : Q_LENGTH;
which to my naive understanding indicates that the copy process should end at either the pattern length (if it is shorter than the Queue length) or at the Queue length (if this is shorter than the Pattern length), which leads me to believe that the current behavior is a bug.

Beside this, clearing a whole pattern with 64 entries while copying a queue of 16 into the pattern seems a rather substantial data loss.

Thanks for having a look into this!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions