{
  "slug": "fft-analyzer",
  "name": "gizza-ai/fft-analyzer",
  "version": "0.1.0",
  "title": "FFT Analyzer — Fast Fourier Transform Calculator — gizza.ai",
  "description": "Paste samples and get the frequency spectrum: magnitude, phase, dominant peaks, bin resolution and Nyquist, with windowing, dB scaling, CSV and JSON.",
  "tags": [
    "fft calculator",
    "fast fourier transform",
    "dft calculator",
    "frequency spectrum analyzer",
    "signal frequency analysis",
    "magnitude and phase spectrum",
    "window function",
    "dominant frequency finder"
  ],
  "category": "audio",
  "urls": {
    "page": "https://gizza.ai/tools/fft-analyzer/",
    "markdown": "https://gizza.ai/tools/fft-analyzer/index.md",
    "descriptor": "https://gizza.ai/tools/fft-analyzer/tool.json",
    "deep_link_example": "https://gizza.ai/tools/fft-analyzer/?data=0%2C%201.1690%2C%200.6464%2C%200.5158%2C%200.5%2C%20-0.8984%2C%20-1.3536%2C%20-0.2452&sample_rate=16&window=rectangular&pad=pow2&spectrum=auto&scale=amplitude&phase_unit=degrees&remove_dc=true&peaks=5&decimals=4&format=text"
  },
  "cli": "gizza tool fft-analyzer \"0, 1.1690, 0.6464, 0.5158, 0.5, -0.8984, -1.3536, -0.2452\"",
  "tool": {
    "description": "Compute the discrete Fourier transform of a pasted list of samples and return the frequency spectrum. Accepts real or complex samples separated by commas, semicolons, spaces, or newlines, in decimal or scientific notation. Supports a sample rate for a real frequency axis, six window functions with coherent-gain amplitude correction, zero-padding to the next power of two or an exact-length DFT, one-sided/two-sided views, amplitude/magnitude/normalized/dB/power scaling, phase in degrees or radians, optional DC removal, and a ranked dominant-peak list. Reports bin resolution and the Nyquist frequency, warns when a top peak sits in the Nyquist bin, and outputs text, a Unicode bar chart, CSV, or JSON with real and imaginary columns.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "description": "The sample list to transform, in time order. Values may be separated by commas, semicolons, spaces, or newlines, and written as integers, decimals, or scientific notation (1, -2.5, 2.7e3). Complex samples are accepted in the forms 3+4i, -2i, or 1.25-0.5j (j is treated as i); any complex sample switches the default view to the two-sided spectrum. Minimum 2 samples, maximum 65536.",
          "type": "string"
        },
        "decimals": {
          "default": 4,
          "description": "Decimal places for every number in the output, 0 to 12. Default 4.",
          "maximum": 12,
          "minimum": 0,
          "type": "integer"
        },
        "format": {
          "default": "text",
          "description": "Output format. text (default) prints a header, the peak list, and the bin table. chart draws a Unicode bar chart of the spectrum by frequency (first 256 bins). csv emits the metadata, peaks, and a bin,frequency,level,phase,real,imaginary table. json emits the same data as a structured object. Default text.",
          "enum": [
            "text",
            "csv",
            "json",
            "chart"
          ],
          "type": "string"
        },
        "pad": {
          "default": "pow2",
          "description": "Transform length. pow2 (default) zero-pads the input up to the next power of two and uses the radix-2 FFT. none transforms the samples at their exact length with a direct DFT, which is O(N^2) and therefore capped at 4096 samples for non-power-of-two lengths. Zero padding interpolates the spectrum onto a finer grid; it does not add real resolution.",
          "enum": [
            "pow2",
            "none"
          ],
          "type": "string"
        },
        "peaks": {
          "default": 5,
          "description": "How many dominant peaks to list above the bin table, 0 to 20. Default 5. Peaks are local maxima of the spectrum ranked by magnitude, each reported with its bin index, frequency, level, and phase. Set 0 to omit the peak list.",
          "maximum": 20,
          "minimum": 0,
          "type": "integer"
        },
        "phase_unit": {
          "default": "degrees",
          "description": "Unit for the phase column. degrees (default) reports -180 to 180; radians reports -pi to pi. Bins whose magnitude is numerically zero report a phase of 0 rather than a meaningless rounding-noise angle.",
          "enum": [
            "degrees",
            "radians"
          ],
          "type": "string"
        },
        "remove_dc": {
          "default": false,
          "description": "Subtract the mean of the samples before windowing and transforming (default false). Turn this on when a constant offset dominates bin 0 and hides the tones you care about; the removed offset is reported in the output header.",
          "type": "boolean"
        },
        "sample_rate": {
          "default": 1.0,
          "description": "Sampling rate of the input in samples per second (Hz). This only sets the frequency axis: bin k maps to k * sample_rate / transform_length, the bin resolution is sample_rate / transform_length, and Nyquist is sample_rate / 2. Default 1.0, which reports normalised frequency in cycles per sample. Use 48000 for 48 kHz audio.",
          "type": "number"
        },
        "scale": {
          "default": "amplitude",
          "description": "How the level column is scaled. amplitude (default) reports the amplitude of the underlying sinusoid, so a unit cosine reads 1.0. magnitude reports the raw unnormalised |X[k]|, which grows with the number of samples. normalized divides the magnitude by the sample count without the one-sided doubling. db is 20*log10 of the amplitude, so a unit tone reads 0 dB and an empty bin reads -inf. power is the amplitude squared.",
          "enum": [
            "amplitude",
            "magnitude",
            "normalized",
            "db",
            "power"
          ],
          "type": "string"
        },
        "spectrum": {
          "default": "auto",
          "description": "Which half of the spectrum to report. auto (default) shows the one-sided spectrum (bins 0 to N/2) for real input and the full two-sided spectrum for complex input. one-sided forces bins 0 to N/2 and doubles the amplitude of every bin except DC and Nyquist. two-sided forces all N bins and labels bins above N/2 as negative frequencies.",
          "enum": [
            "auto",
            "one-sided",
            "two-sided"
          ],
          "type": "string"
        },
        "window": {
          "default": "rectangular",
          "description": "Window applied to the samples before the transform, to suppress spectral leakage from tones that do not land exactly on a bin. rectangular (default) applies no taper and gives the sharpest peaks for exactly-periodic input; hann and hamming are the general-purpose choices; blackman and blackman-harris trade a wider main lobe for much lower side lobes; flattop is the most accurate for measuring peak amplitude. Amplitudes are corrected for the window's coherent gain, so a windowed tone still reads its true amplitude.",
          "enum": [
            "rectangular",
            "hann",
            "hamming",
            "blackman",
            "blackman-harris",
            "flattop"
          ],
          "type": "string"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  }
}