Skip to content

Generates different test signals like noises, waves and sweep tones.

License

Notifications You must be signed in to change notification settings

xaviliz/signalGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

signalGenerator

Generates different test signals such as noises, waveforms and sweep tones:

  • sine
  • triangle
  • sawtooth
  • square
  • white_noise
  • MLS
  • delta
  • pulse
  • level
  • lin_ramp
  • log_ramp
  • log_sweep
  • inverse_log_filter
  • lin_sweep
  • inverse_lin_filter

It also generates train of any kind of signal.

Installation

For the latest releases install from the GitHub repo

pip install git+https://github.com/xaviliz/signalGenerator

Usage

Generate a sine wave

import signal_generator as sg

signal_generator = sg.SignalGenerator("sine", 20)
sine_20_seg = signal_generator()

Generate a train of sine waves

signal_generator = sg.SignalGenerator("sine", 1, nCycles=10)
sine_train = signal_generator()

Generate a linear ramp

amplitude = 1
duration = 10
sample_rate = 44100
signal_type = "lin_ramp"
fade_in = 0.0
fade_out = 0.0
logger = sg.getLogger(level="DEBUG")

# synthesize signal
signal_generator = sg.SignalGenerator(
    signal_type,
    duration,
    amplitude=amplitude,
    sampleRate=sample_rate,
    logger=logger,
    fadeIn=fade_in,
    fadeOut=fade_out,
)
testSignal = signal_generator()

Dependencies

Citation

@misc{xlizarraga2022signal-generator,
  author = {Lizarraga, Xavier},
  title = {signal-generator},
  year = {2022},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/xaviliz/signalGenerator}},
  commit = {623ded5e08eed84b18131d0642068534e4c80154}
}

About

Generates different test signals like noises, waves and sweep tones.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages