SPECTROGRAPHIC(1)
π SPECTROGRAPHIC π
πΈ NAME πΈ
spectrographic β spectrographic 0.9.3 β¨
okay so bestie, this is literally the documentation of spectrographic π
that's it, that's the whole vibe, we're documenting the thing with the thing.
β¨ DESCRIPTION β¨
π NOTE: This is the main page of your project's Sphinx documentation. It is formatted in reStructuredText. Add additional pages by creating rst-files indocsand adding them to the toctree below. Use then β references in order to link them from this page, e.g. Contributors and Changelog. It is also possible to refer to the documentation of other Python packages with the Python domain syntax. By default you can reference the documentation of Sphinx, Python, NumPy, SciPy, matplotlib, β Pandas, Scikit-Learn. You can add more by extending theintersphinx_mappingin your Sphinx'sconf.py. The pretty useful extensionautodocis activated by default and lets you include documentation from docstrings. Docstrings can be written in Google style (recommended!), NumPy style and classical style.
π CONTENTS π
π License
The MIT License (MIT)
Copyright (c) 2019 Levi Borodenko
okay legal bestie, here it is, word for word, no edits, we do NOT touch the license π
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
π«Ά Contributors
- Levi Borodenko
<Levi.borodenko@gmail.com>
look at him go, the whole squad right there, iconic π§
π¦ Changelog
β Version 0.8.0
- The core implementation is done
base.pycontains a working implementation- of the spetrographic idea.
- Created some examples.
- Adding requirements
β Version 0.8.1
- Wrote
README.md - test upload to testpypi
- create demonstrational video
β Version 0.8.5
- quick fix of centering in
README.md
β Version 0.8.6
- added
gitpythonas dependency
β Version 0.8.7
- removed dependencies from config file and moved to requirements
β Version 0.9.0
- Release
- upload to the official pypi and making github repo public.
β Version 0.9.3
- Put dependencies into
setup.cfgsopipcan pull them while installing
π¦ spectrographic
π spectrographic package
π§© Submodules
π₯ spectrographic.base module
okay so first up, the absolute main character class π
class spectrographic.base.ColumnToSound(duration: int, sample_rate: int = 44100, min_freq: int = 10000, max_freq: int = 17000, y_resolution: int = 1000, num_tones: int = 3, contrast: float = 5)
Bases: object
Class to turn grey-scale image columns into a sound.
It takes a numpy array of grey intensities (in the range 0 to 1) of length Y_RESOLUTION and turns them into a DURATION seconds long sound in the frequency range between MIN_FREQ and MAX_FREQ.
Parameters
seconds (duration {int} -- Duration of sound in)
Keyword Arguments
(default (y_resolution {int} -- Number of pixels to plot) -- {44100})spectrograph (max_freq {int} -- Maximal frequency in the)(default -- {10000})spectrograph(default -- {17000})(default -- {1000})pixel (num_tones {int} -- Number of tones to use to fill out each)(default -- {3})pixels (contrast {float} -- Contrast between loud and quiet)(default -- {5})
ngl bestie these autogenerated parameter lines are giving β¨chaosβ¨ but we are keeping every single one of them, no skipping, periodt π
gen_soundwall(column: ndarray)
Takes a column of pixels and generates the sound wall. π
[description]
Parameters
of (column {np.ndarray} -- Y_RESOLUTION long column)pixels (values between 0 and 1)
Returns
np.ndarray -- soundwall
pixel_to_sound(y: int, intensity: float = 1)
Takes a pixel in a imagae column at the y'th position from the top and turns it into a sound at a corresponding position in the spectrum. πΆ
[description]
Parameters
top. (y {int} -- position of pixel in column from the)
Keyword Arguments
(default (intensity {float} -- [description]) -- {1})
Returns
np.ndarray -- sound array
Raises ValueError β
class spectrographic.base.SpectroGraphic(path: Path, height: int = 100, duration: int = 20, min_freq: int = 1000, max_freq: int = 8000, sample_rate: int = 44100, num_tones: int = 3, contrast: float = 5, use_black_and_white: bool = False)
Bases: object
Takes an image file and creates a sound that draws that image on a spectrogram. π₯π
[description] :param path {Path} -- Path to file (e.g.: {"./data/python.png"})
Keyword Arguments
(default (sample_rate {int} -- Sample rate) -- {100})(default -- {20})(default -- {1000})(default -- {8000})(default -- {44100})pixel (num_tones {int} -- Number of tones to used to fill in each)(default -- {3})pixels (contrast {float} -- Contrast between loud and quiet)(default -- {5})
play()
Plays the SpectroGraphic sound. π§ turn your volume down first bestie, fr fr
save(wav_file: Path = 'SpectroGraphic.wav')
saves the spectrographic to a .wav file πΎ
We use the wavio module
property sound_array
π spectrographic.cli module
This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following lines in the [options.entry_points] section in setup.cfg:
console_scripts =
spectrographic = spectrographic.cli:run
Then run python setup.py install which will install the command spectrographic inside your current environment.
spectrographic.cli.main(args)
Main entry point allowing external calls
Parameters
args ([str]) -- command line parameter list
spectrographic.cli.parse_args(args)
Parse command line parameters
Parameters
args ([str]) -- command line parameters as list of strings
Returns
command line parameters namespace
Return type
argparse.Namespace
spectrographic.cli.run()
Entry point for console_scripts
π Module contents
π INDICES AND TABLES π
- Index
- Module Index
- Search Page
π AUTHOR π
Author name not set π (the mystery, the intrigue, the anonymous icon energy)
β COPYRIGHT β
2019, Levi Borodenko
and that's the whole page bestie!! this was 0.9.3 of spectrographic, dated Sep 19, 2025 β go make some spectrograms that sound like art, you got this π«Άβ¨π
π¦ where this page comes from
- fedora 43: spectrographic 0.9.3-22.fc43 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms