{"id":26057564,"url":"https://github.com/folkengine/bregman","last_synced_at":"2026-06-04T17:31:20.439Z","repository":{"id":151470892,"uuid":"45791055","full_name":"folkengine/bregman","owner":"folkengine","description":"Automatically exported from code.google.com/p/bregman","archived":false,"fork":false,"pushed_at":"2015-11-08T18:49:49.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T00:52:44.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folkengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-08T17:37:21.000Z","updated_at":"2015-11-08T17:45:49.000Z","dependencies_parsed_at":"2023-04-12T10:01:34.289Z","dependency_job_id":null,"html_url":"https://github.com/folkengine/bregman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fbregman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fbregman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fbregman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fbregman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folkengine","download_url":"https://codeload.github.com/folkengine/bregman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242541306,"owners_count":20146326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-08T11:24:04.215Z","updated_at":"2025-12-04T19:03:58.914Z","avatar_url":"https://github.com/folkengine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bregman Audio-Visual Information Toolbox\n****************************************\n*Advanced Tools for the Digital Arts and Humanities*\n\n*This file is ported from [http://digitalmusics.dartmouth.edu/~mcasey/bregman/](http://digitalmusics.dartmouth.edu/~mcasey/bregman/). Source imported from [https://code.google.com/p/bregman/](https://code.google.com/p/bregman/)*\n\nIntroduction\n============\nWelcome to the Bregman toolbox from the Bregman Music and Audio\nResearch Studio at Dartmouth College. These pages document the\ntoolbox and provide a set of guided tutorials to its use.\n\nWho is Bregman for?\n===================\nBregman provides Python tools to support research and development including, but not limited to:\n* Music IR - explore methods for audio and music machine learning and information retrieval\n* Multimedia IR - explore methods for video information retrieval (requires OpenCV package)\n* Music Cognition/Neuroscience - classify/predict music evoked fMRI and EEG signals (requires PyMVPA package)\n* Computational Musicology - run queries on music collections\n* Teaching (e.g. Music Information Retrieval) - hands-on tools for undergraduate, Masters, and Ph.D. students\n* Application development - make new Python-based MIR applications such as music search and recommender systems\n\nLibraries and Dependencies\n==========================\n* Required: pylab (numpy + scipy + matplotlib).\n* Linux and OSX users with package management tools (e.g. easy_install, dpkg, apt-get, ports, yum), should install the unix packages from their distributions, e.g. (using apt-get): \n\n\t sudo apt-get install ipython python-numpy python-matplotlib python-scipy \n\n* Windows, and OSX without package manager, install the Enthought Python Distribution (EPD). Available for `FREE for academic use \u003chttp://enthought.com/products/edudownload.php\u003e`_.\n* Strongly recommended: instal `scikits.audiolab \u003chttp://pypi.python.org/pypi/scikits.audiolab/\u003e`_ for audio play and wavread/wavwrite functions. \n\nDownload Bregman\n================\nSave the ZIP file `Bregman Toolbox Version 0.12-09.15 \u003chttp://aum.dartmouth.edu/~mcasey/bregman/bregman_r12-09.15.zip\u003e`_ to your machine.\n\nInstallation\n============\nunzip the installer directory. You will need to install as administrator. In a UNIX terminal:\n\n    cd /path/to/installer/directory\n    sudo python setup.py install \n\nIf you do not have admin (sudo) privileges, you can install in your home path using the --prefix \"$HOME\" option to setup.py\n\nTutorial 0: Getting Started\n===========================\nFirst launch the *ipython* shell with *pylab* preloaded:\n\n    ipython --pylab # launch the ipython shell with pylab\n\nImport the entire bregman toolbox and specify an audio file to work with:\n\n    from bregman.suite import *\n    \n    #use built-in audio examples in audio_dir\n    audio_file = os.path.join(audio_dir,\"gmin.wav\")\n\n\nExtract short-time Fourier transform, specifying window parameters:\n\n    linspec = LinearFrequencySpectrum(audio_file, nfft=1024, wfft=512, nhop=256)\n    linspec.feature_plot(dbscale=True)\n    title('Wide-band Linear Spectrum')\n\nPlay the audio_file using the built-in play() command\":\n\n    x,sr,fmt = wavread(audio_file) # load the audio file\n    play(x, sr) # play it\n\n\nInvert the short-time Fourier transform back to audio using the feature inverse() method.\n\n    x_hat = linspec.inverse(usewin=0) # invert features to audio (use original phases, no windowing)\n    play(x_hat)\n\n\nExtract the log-frequency spectrum, specifying windowing parameters:\n\n    logspec = LogFrequencySpectrum(audio_file, nhop=2205) # extract log spectrum\n    logspec.feature_plot(dbscale=True) # plot features on dB scale\n    title('Narrow-band Log Spectrum')\n\nInvert the log spectrum using the feature inverse() method. The log-frequency spectrum does not contain complete information so we'll need to estimate the phases, via the *pvoc=True* flag, and use a reconstruction window, *usewin=True*. The signal should also be balanced to ensure no clipping on audio output.\n\n    x_hat = logspec.inverse(pvoc=True) # invert phaseless features to audio\n    play(balance_signal(x_hat),sr) # play inverted features\n\nInspect the default feature parameters and features module help:\n\n    # list the (default) parameters that control feature extraction.\"\n    Features.default_params() # inspect default parameters\n    \n    help(features) # see help on the features module \n\nList the tutorials and run one:\n\n    # show list of tutorials:\n    get_tutorials()\n    \n    # execute the first tutorial (1. features)\n    execfile(get_tutorials()[1])\n\nTutorials\n=========\nBregman comes with a set of tutorials that we recommend you become familiar with.\n* `Tutorial1 \u003cbregman_r12-09.15/bregman/examples/1_features.txt\u003e`_ - Audio feature extraction and visualization.\n* `Tutorial2 \u003cbregman_r12-09.15/bregman/examples/2_testsignal.txt\u003e`_ - Audio test signal synthesis.\n* `Tutorial3 \u003cbregman_r12-09.15/bregman/examples/3_similarity.txt\u003e`_ - Audio similarity analysis\n* `Tutorial4 \u003cbregman_r12-09.15/bregman/examples/4_soundspotter.txt\u003e`_ - Concatenative audio synthesis with a source and target.\n* `Tutorial5 \u003cbregman_r12-09.15/bregman/examples/5_plca.txt\u003e`_ - Audio source separation using non-negative matrix factorization.\n\nBregman Python Modules\n======================\n.. toctree::\n   :maxdepth: 2\n\n   suite - wrapper package to bundle all the bregman tools \u003csuite\u003e\n   testsignal - test signal generators \u003ctestsignal\u003e\n   features - feature extractors and visualizers \u003cfeatures\u003e\n   segment - media segmentation and segmented feature extraction \u003csegment\u003e\n   psychoacoustics - perceptual methids, critical bands, loudness scales \u003cpsychoacoustics\u003e\n   tuning - methods for generating different tunings, temperaments, and scales \u003ctuning\u003e\n   distance - distance metrics, dynamic time-warping, and multidimensional scaling \u003cdistance\u003e\n   classifier - unsupervised and supervised learning with feature data \u003cclassifier\u003e\n   pyadb - interface to audiodb feature-vector database and scalable content-based retrieval \u003cpyadb\u003e\n   audiodb - audiodb extensions helper class and feature regularization / pre-processing \u003caudiodb\u003e\n   audiocollection - manage collections of audio and features with audiodb \u003caudiocollection\u003e\n   metadata - tools for searching and manipulating metadata from the Web \u003cmetadata\u003e\n   testcollection - generate signals and evaluate features and search algorithms \u003ctestcollection\u003e\n   evaluate - general-purpose evaluation module using user-supplied ground-truth \u003cevaluate\u003e\n   sound - audio input/output utilities and sound-file read/write methods \u003csound\u003e\n   lsh - fast (sublinear time complexity) search using locality sensitive hashing \u003clsh\u003e\n\nIndices and tables\n==================\n* :ref:`genindex`\n* :ref:`modindex`\n* :ref:`search`\n\nFunding sources:\n================\n.. figure:: http://www.neh.gov/files/neh_at_logo.png\n.. figure:: http://www.dartmouth.edu/~neukom/_permacode/current/styles/images/header-home.jpg\n   :width: 300px\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolkengine%2Fbregman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolkengine%2Fbregman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolkengine%2Fbregman/lists"}