Skip to main content

Introduction

wav file generator.

  1. it can have different amplitude, frequency in multichannel wav file
  2. it uses different plug-in to produce different wave form.

Wave file command

python3 SampleTone.py          # basic waveform from InToneFunc.py plu-in
python3 SampleSquareFourier.py # squarewave by fourier series from plu-in InSquareFourier.py

Help

python3 SampleTone.py  -h
usage: SampleTone.py [-h] [-t DURATION] [-r {8,16,24,32}] [-s SAMPLERATE]
                     [-o OUTPUT] [-c CHANNELS]
                     [-w {square,sine,triangle,sawtooth,dc}]
                     [-W {square,sine,triangle,sawtooth,dc} [{square,sine,triangle,sawtooth,dc} ...]]
                     [-f FREQUENCY] [-F FREQUENCYS [FREQUENCYS ...]]
                     [-v VOLUME] [-V VOLUMES [VOLUMES ...]] [-p PHASE]
                     [-P PHASES [PHASES ...]]

Generate wave file.

optional arguments:
  -h, --help            show this help message and exit
  -t DURATION           set wav's duration in seconds (3.0)
  -r {8,16,24,32}       set wav's resolution
  -s SAMPLERATE         set wav's sampling rate [8000Hz:1000000000Hz]
  -o OUTPUT             set name of wav file
  -c CHANNELS           set wav's channels [1:16]
  -w {square,sine,triangle,sawtooth,dc}
                        set wav's default wave form
  -W {square,sine,triangle,sawtooth,dc} [{square,sine,triangle,sawtooth,dc} ...]
                        set wav's wave forms for multichannel
  -f FREQUENCY          set wav's default frequency [0:20000]
  -F FREQUENCYS [FREQUENCYS ...]
                        set wav's each frequency for each channel [0:20000]
  -v VOLUME             set wav's default amplitude [0:100]
  -V VOLUMES [VOLUMES ...]
                        set wav's each amplitude for each channel [0:100]
  -p PHASE              set wav's default phase [-360:360]
  -P PHASES [PHASES ...]
                        set wav's each phase for each channel [-360:360]

Wav file spec

WaveFile Gem
Audio File Format Specifications

Samples

SampleTone.py uses InToneFunc.py plu-in.

Generate 4 channels wav file

python3 SampleTone.py -c 4 -w sine

SampleToneBasic

Generate wav file, each channel has different wave form

python3 SampleTone.py -W sine square triangle sawtooth dc -f 30 -t 0.3 -v 70

Produce 5 channels wave file which includes these wave form... sine wave, square wave, triangle wave, sawtooth wave and dc.
Sample rate: default (48kHz).
Resilution: 16 bits
Length: 0.3 second.
Amplitude: 70 of 100
Wave frequency: 30Hz
SampleToneWave

Generate wav file, each channel has different phase

python3 SampleTone.py -w sine -P -270 -180 -90 0 90 180 270 -f 30 -t 0.3 -v 70

Phase: -270, -180, -90, 0, 90, 180, 270 SampleTonePhase

SampleSquareFourier.py uses InSquareFourier.py plu-in.

Produce squrewave from fourier series

python3 SampleSquareFourier.py -f 30 -t 0.3 -v 70 -W SF1 SF2 SF3 SF4 SF5 SF30

squrewave by fourier series with N = 1, 2, 3, 30
SampleSquareFourier

Metadata

Release files for WaveGenPy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for WaveGenPy 0.1.0
File Size Uploaded Provenance Actions
WaveGenPy-0.1.0.tar.gz 8.6 kB Without provenance Details for WaveGenPy-0.1.0.tar.gz

Release files / WaveGenPy-0.1.0.tar.gz

Download URL WaveGenPy-0.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
74be9ebf68dbd75248b9ee980bd4dd01a6c314201c549d5d47ea91214dc70296
BLAKE2b-256 checksum
How to use checksums
b6eca89bd175425d98eb6bcb690f9e4952404e05ebb58530699d8d217b00c313
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Security for WaveGenPy 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page