Skip to content

Website that transforms discrete input signals and visualizes them.

Notifications You must be signed in to change notification settings

alias313/sig-transformer

Repository files navigation

Visualize Transforms

This is a project to visualize the transforms of discrete signals and operations between two or multiple discrete signals (mainly DFT and convolution)

Installation

  1. Install fftw3 in /usr/include
  2. Inside /src/signals/ folder run gcc signal_computer.c -lm -lfftw3 -o signal_computer_exec
  3. Activate a nodejs environment
  4. Run pnpm install
  5. Run pnpm run dev

Code Improvements

  • Use structs to encapsulate parameters

  • Make global argv, argc as such:

    char **gargv;
    int gargc;

Snippet from here

Another way of doing a similar thing here

IDEAS

  • IndexedDB for function domain instead of csv?
  • Let the user adjust the necessary parameters and you can save those function parameters and combine them (sum, product, convolution) with other saved functions
    • Input is done with buttons:
      • A signal button, you can choose between the square, triangle, sine, etc. icons
      • Amplitude, frequency, range wheels
    • Chain functions to simulate operations (add, subtract, multiply, divide, convolve, correlate, circular convolution???, etc.)
    • Discrete sums and products (look for periodization in IPAV)
    • Also delta of kronecker
  • Real, Imaginary & Complex graph
  • Add the sum of cos & sin
  • Add complex exponential (cos+isin)
  • Load your signal with a formatted text/JSON/whatever file
  • Use IPC message passing or memory sharing instead of using node to invoke execution
  • Add auto set button
  • Fix rounding errors (for freq)
  • Show only a narrow window of frequencies (different for cos, sin, exp, etc.)
  • Add debug mode (with #ifndef)
  • Allow only parametrized input (you can only input the parameters to the function that I permit, with limited degrees of freedom)
  • Lead to the discovery of the ft by convolution (like in Mark Newman's video)
  • Build an FFT and convolution algorithm
  • Other transforms (Cosine, sine, sinc transforms...)
  • Load graphs by chunks (first 100 samples, etc.) or lazy load (load average of every 10, 5, 2 samples etc.)
  • Try using another plotting library (canvas, function plot, etc.)

In accordance with the licence of the charts library lightweight-charts read this notice: TradingView Lightweight Charts™ Copyright (с) 2025 TradingView, Inc. https://www.tradingview.com/