swharden / Spectrogram

.NET library for creating spectrograms (visual representations of frequency spectrum over time)
https://nuget.org/packages/Spectrogram
MIT License
315 stars 57 forks source link

support mel scaling #14

Closed swharden closed 4 years ago

swharden commented 4 years ago

add a method to Spectrogram which returns a mel-scaled 2D array

swharden commented 4 years ago

wrote some working code, but still not sure where to put it

Mel Scaled Data

image

Linearly Scaled Data

image

swharden commented 4 years ago

You can now create a Mel spectrogram like this:

Bitmap bmp = spec.GetBitmapMel(melSizePoints: 250, intensity: 4, dB: true);
bmp.Save("halMel.png", ImageFormat.Png);
Cropped Linear Scale (0-1kHz) Full Linear Scale (0-22 kHz) Mel Scale (0-22 kHz)
image image image