# spectrogram~

Interactive [buffer~] based spectral magnitude analyzer and editor for Max.

With support for multiple window functions, perceptual frequency scales (Lin, Log, Mel, Bark, ERB), customizable color schemes, and mouse-driven zoom/pan/selection, [spectrogram~] provides flexible visual feedback and real-time control for spectral analysis, editing and resynthesis, sound design, and interactive audio applications.

The [spectrogram.colorbar] object displays magnitude-to-color mappings for an attached [spectrogram~] object.

The [spectrogram.bandpass] abstraction performs a frequency domain bandpass that can be controlled by the [spectrogram~] object.

The spectrogram.toolbar.js and spectrogram.modes.js JSUI scripts provide procedurally-drawn toolbar and mouse mode controls that can be used to send messages directly to the [spectrogram~] object.

Developed by Zachary Seldess

## Contact
* zseldess@gmail.com

## Website
* http://www.zacharyseldess.com/spectrogram

See License.txt file for terms of use.

## Installation
Place the "spectrogram" folder in your Max 8 or 9 Packages/ directory. Restart Max.

## System Requirements
* macOS 10.15 and later
* Windows 10 and later
* Tested on Max 8 and 9

## Third-Party Colormap Data
The **Roseus** colormap is from [dofuuz/roseus](https://github.com/dofuuz/roseus), licensed under the MIT License.

The **Viridis**, **Magma**, **Inferno**, and **Plasma** colormaps are from [BIDS/colormap](https://github.com/BIDS/colormap) by Stefan van der Walt and Nathaniel Smith, released into the public domain under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/).

The **Cividis** colormap is from Nunez, Anderton & Renslow (2018), "[Optimizing colormaps with consideration for color vision deficiency to enable accurate interpretation of scientific data](https://doi.org/10.1371/journal.pone.0199239)," released into the public domain under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/).

The **Turbo** colormap is by Anton Mikhailov, Copyright 2019 Google LLC, licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). Source: [GitHub Gist](https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f).
