Skip to content

Commit

Permalink
[v0.5.28] improved fft documentation and fix after contd testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nnirror committed Mar 17, 2023
1 parent 6d59764 commit d4c467b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ You might need to activate a MIDI driver on your machine in order to send MIDI f
---
- **fft** ( )
- computes the FFT of the FacetPattern, translating the FacetPattern data into "phase data" that could theoretically reconstruct it using sine waves.
- **NOTE**: by default, this command will compute the FFT for the entire input FacetPattern, which can produce artifacts with patterns larger than the typical FFT window sample sizes (> 8192). In order to avoid this, first use the `slices()` command to slice the pattern into smaller chunks, then run the FFT on each of those chunks.
- example:
- `$('example').randsamp().slices(32,()=>{this.fft().shift(rf()).ifft()}).play(); // break the sample into 32 slices, compute the FFT for each slice, shift each slice's spectral data by a random amount, and run IFFT to return back into the audio realm before playback`
- `$('example').from([1,0,1,1]).fft(); // 3 0 0 1 1 0 0 -1`
---
- **flipAbove** ( _maximum_ )
Expand Down
2 changes: 0 additions & 2 deletions js/FacetPattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -987,8 +987,6 @@ class FacetPattern {
let out = f.createComplexArray();
f.inverseTransform(out, data);
this.data = f.fromComplexArray(out);
// IFFT result here is a palindrome; we only want the first half
this.range(0,0.5);
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "facet",
"version": "0.5.27",
"version": "0.5.28",
"description": "Facet is a live coding system for algorithmic music",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit d4c467b

Please sign in to comment.