jamoma / jamoma2

A header-only C++ library for building dynamic and reflexive systems with an emphasis on audio and media.
MIT License
30 stars 6 forks source link

Add padding functions to SampleBundle #82

Closed nwolek closed 8 years ago

nwolek commented 8 years ago

I have already begun work on this. Creating a new issue for tracking and so that I can cleanly turn this into a separate pull request. These functions would help resolve some of the specific concerns that are related to interpolation in a periodic wavetable (raised as part of issue #5 and pull https://github.com/jamoma/jamoma2/pull/81).

By adding samples as padding to the beginning and ended of the wavetable, we can better interpolate between the first and last sample without having to introduce branching to stay within the bounds of the SampleBundle. Since the implementations are likely to be so similar, resolving this issue should introduce and test two type of padding:

  1. copying samples from beginning to end, as well as end to beginning
  2. adding samples with a value of zero (which was called for in issue #44)

A few notes on the features needed:

Happy to receive feedback from others, including calls for clarification in the above notes.

nwolek commented 8 years ago

Closed pending code review on pull #83 by @tap