guitarsounds

guitarsounds: A Python package to visualize harmonic sounds for musical instrument design - Published in JOSS (2023)

https://github.com/olivecha/guitarsounds

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Scientific Fields

Mathematics Computer Science - 84% confidence
Last synced: 6 months ago · JSON representation

Repository

python library to analyse guitar sounds

Basic Info
  • Host: GitHub
  • Owner: olivecha
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 80.7 MB
Statistics
  • Stars: 8
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created almost 5 years ago · Last pushed about 3 years ago
Metadata Files
Readme License

README.md

guitarsounds

pytest

A python package to analyse guitar sounds. Developed as a lutherie research analysis tool with the Bruand Lutherie School. The guitarsound python package documentation is available at documentation and a Jupyter Notebook tutorial for the API is available here.

Motivation

The main goal of this project is to provide a tool to efficiently analyse sound data from research projects in musical instrument design. While sound analysis packages already exist, they are more directed to feature extraction for machine learning purposes. Additionally, some features of interest, like time dependent decay, onset shape and fourier transform peaks distribution are not computable trivially or accurately with existing tools. The current release of the guitarsounds package contains usual and advanced digital signal processing tools applied to the analysis of transient harmonic sounds with easy figure generation through matplotlib. To allow the package functionalities to be used rapidly without learning the API, a graphic user interface is available based on jupyter lab widgets.

Installation

The following steps can be followed to use guitarsound interactively with Jupyter Notebook. A French version of the installation guide is available here.

  • Download the Anaconda package management system link.

Screen Shot 2022-05-22 at 9 18 26 PM

  • Install the Anaconda package management system (Tutorial).

  • Once Anaconda is installed, the guitarsound package needs to be installed. Without going into heavy details, the guitarsound package is not available from the Anaconda channels and needs to be installed using PIP, the Package Installer for Python. To install a package from PIP in Anaconda, you need to use the Anaconda Prompt :

win-anaconda-prompt2

To install guitarsound, type the following command into the Anaconda Prompt :

pip install guitarsounds

Once the installation of guitarsounds is finished, the package can be used in the Anaconda Jupyter Notebook environment. The Jupyter Notebook environment can be launched from Anaconda Navigator which is included in the Anaconda package management system.

nav-defaults

Then, navigate to the sub-directory where you want your work to be and create a Jupyter Notebook :

Screen Shot 2022-06-02 at 9 12 01 PM

The graphic user interface can be launched by typing the following code in a cell of the notebook :

python import guitarsounds interface = guitarsounds.Interface()

Pressing shift+enter runs the code in the cell and launches the graphic user interface of guitarsounds :

Capture d’écran, le 2021-08-29 à 19 01 28

To go further, you may learn the guitarsounds API, see the API Tutorial notebook and the API documentation

Example usage

While extracting quantitative features from sounds allows for a meaningful analysis, listening to them remains an important part of the analysis. Soundfiles can be loaded by creating a Sound class instance with the soundfile path as an argument

python from guitarsounds import Sound mysound = Sound('example_sounds/Wood_Guitar/Wood_E1.wav')

The amplitude-time data of the Sound instance is stored in a Signal class and can be listened in a Jupyter Notebook:

python mysound.signal.listen()

image

Relevant time signal properties can then be rapidly extracted and visualized in the interactive Jupyter Notebook environment. For example, the time damping curve and the associated damping factor is a useful measure when measuring the effects of changes in the guitar design on the decay rate of different notes :

python mysound.plot.time_damping()

image

Two different sounds can also be compared using the SoundPack class, such as a tangible effect of a design change can be measured. Here we compare the fourier transform peaks of two guitars built using different materials : python import guitarsounds file1 = 'example_sounds/Wood_Guitar/Wood_A5.wav' file2 = 'example_sounds/Carbon_Guitar/Carbon_A5.wav' mysounds = guitarsounds.SoundPack(file1, file2, names=['wood', 'carbon']) mysounds.compare_peaks()

image

The base API of the guitarsounds classes can also be leveraged to create custom signal analysis features. More info and advanced examples are available in the API Tutorial Notebook.

Community

Feel free to fork the guitarsound repository and submit pull requests implementing useful changes. If you implement a new feature, please submit associated unit tests in your pull request. Pull requests that pass all the tests and propose changes aligned with the goal of this package should be accepted.

This project is maintained by the Bruand Lutherie School, if you have problems with the package, or you need support in using it, please write an issue in this repository.

Owner

  • Login: olivecha
  • Kind: user

Mechanical engineering master's student. All things simulation.

JOSS Publication

guitarsounds: A Python package to visualize harmonic sounds for musical instrument design
Published
February 09, 2023
Volume 8, Issue 82, Page 4878
Authors
Olivier Chabot ORCID
École de lutherie Bruand, Montréal, QC, Canada
Louis Brillon
École de lutherie Bruand, Montréal, QC, Canada
Editor
Brian McFee ORCID
Tags
signal processing musical instrument harmonic sound

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 149
  • Total Committers: 1
  • Avg Commits per committer: 149.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
olivecha o****2@e****a 149
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 47
  • Total pull requests: 1
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 4
  • Total pull request authors: 1
  • Average comments per issue: 1.19
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • olivecha (27)
  • cwitkowitz (16)
  • ebezzam (3)
  • louisbrillon (1)
Pull Request Authors
  • danielskatz (1)
Top Labels
Issue Labels
enhancement (7) question (3) documentation (1) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 7 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 1
pypi.org: guitarsounds

A python package to analyze and visualize harmonic sounds

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 7 Last month
Rankings
Dependent packages count: 9.6%
Stargazers count: 21.6%
Dependent repos count: 21.9%
Average: 26.2%
Forks count: 29.9%
Downloads: 48.2%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/python-app.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/static.yml actions
  • actions/checkout v3 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v1 composite
  • actions/setup-python v3 composite
  • actions/upload-pages-artifact v1 composite
  • stefanzweifel/git-auto-commit-action v4 composite
requirements.txt pypi
  • IPython *
  • ipywidgets *
  • librosa *
  • matplotlib *
  • noisereduce *
  • numpy *
  • scipy *
  • soundfile *
  • tabulate *