nnirror/facet

Feature: pan() method

Closed this issue · 1 comments

Input to the pan() method should be a float, array, or FacetPattern. clip the input between 0 and 1 and use for channel 0. Determine how many channels specified in this.dacs are set to 1. Loop through that many times and slowly interpolate from the original panning FP to the inverse, AM-ing the data. In a separate loop afterwards, for all this.dacs set to 0, AM the data by 0.

Save all files in tmp as ${name}-pan${channelnum}

If multiple panning FPs are supplied, there needs to be an extra loop that superposes those.

If the array of multiple panning FPs is larger than number of channels, first reduce the panning FPs to match.

If the array of multiple panning FPs is less than number of channels - e.g., two panning FPs on 8 channels - by default it should wrap, so it would go LRLRLRLR. but there should be another argument to the pan method that could make it go LLLLRRRR.

added in v0.5.43: 465a03c#diff-e266ca056c3bb3fe3171af1510bb775c541284befd575416de47aa978ee89131R64

I chose to keep it simple and just have a single panning pattern. Later on I could make it so that multiple panning patterns could be specified. In that case, the panning patterns for each channel would need to be superposed on top of each other and and clipped from 0-1 before multiplying the FP data.