Skip to content

Randomized offset for shorter fractional loop playback #96

@hburgund

Description

@hburgund

For loop fractions that are less than or equal to 1/2, it would provide more playback variation if the first possible loop fraction wasn't always used. In other words, if there was a possible offset in the start time of the fractional loop.

Proposed Strategy

  • only apply to loop fractions of 1/2 or less because these are the only cases in which more than one full fractional loop can exist within the full loop length without overlap
  • maybe even better, only apply to loop lengths specified in the config e.g. loopFractions: [1/8o, 1/16o, 4/8o, 5/8, 6/8, 1/1] whereby all loops with "o" suffix are allowed to have an offset. This approach, I suppose, would circumvent any need to programmatically determine if a loop fractions can be offset, so maybe easier? Also might be a pain for other loop calc stuff since we now have non-numbers!
  • for each loop fraction available for offset, calculate possible starting places by incrementing the specified fraction length while remaining less than full-length - fraction-length.
    • for 4/8o, possible starting offsets are 0 or 1/2
    • for 1/8o, possible starting offsets are 0, 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, 7/8
    • there would be 16 available for 1/16o
  • randomly select which offset to apply and then put that slice of the speaker audio into the playback buffer

I imagine there are other ways to go about this, so lmk what you think. This one seemed the simplest to me; maybe not the most ultimate flexibility, but captures the basics.

Metadata

Metadata

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions