Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: pan() method #48

Closed
nnirror opened this issue Jun 26, 2023 · 1 comment
Closed

Feature: pan() method #48

nnirror opened this issue Jun 26, 2023 · 1 comment
Assignees

Comments

@nnirror
Copy link
Owner

nnirror commented Jun 26, 2023

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.

@nnirror nnirror self-assigned this Jun 26, 2023
@nnirror
Copy link
Owner Author

nnirror commented Jun 27, 2023

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.

@nnirror nnirror closed this as completed Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant