mcc,
@mcc@mastodon.social avatar

Anyway since waking up I have successfully written a Rust program that parses an mp3 and prints to the terminal the waveform (or rather signal power over time of the whole file) as ASCII art. It works great. There is only one problem: This is not something I need

mcc,
@mcc@mastodon.social avatar

Anyway if you're the person who has a use for a command line program that ASCII art prints the waveform of an mp3, here it is. I guess it could be useful for verifying an mp3 contains what you expect or roughly identifying an mp3's contents without opening another program..

https://github.com/mcclure/audiotools-rs/tree/audioview

Left as an exercise to the reader:

  • Additional format support
  • "Subpixel rendering" with Unicode box drawing characters.
azonenberg,
@azonenberg@ioc.exchange avatar

@mcc Next step, spectrogram (complete with ansi escape sequence coloring)?

mdsherry,
@mdsherry@mastodon.social avatar

@mcc I've sent a PR that adds "subpixel" rendering

mcc,
@mcc@mastodon.social avatar

@mdsherry Ahhh… you beat me to it! I actually made a go at it this afternoon but I screwed something up bad in the math (it's subpixel on the H axis but on the V axis it's integers but for some reason on half-pixel boundaries only, and the scaling is overall wrong)

I will look at the PR later, this actually was just a test while trying to do something entirely unrelated

hendric,
@hendric@astronomy.city avatar

@mcc 🤔 Could you turn a btop load graph into an MP3?

mcc,
@mcc@mastodon.social avatar

@hendric You'd kind of need for the load level to meaningfully change at least 10,000 times per second.

hendric,
@hendric@astronomy.city avatar

@mcc I was thinking more a low thrum that can increase in volume/decrease in volume.

mcc,
@mcc@mastodon.social avatar

@hendric That's not so hard. I guess you could also do some frequency stuff so that it classifies load by process and plays a low pitch sound for system processes and a high pitched sound for userland.

nilstrieb,
@nilstrieb@hachyderm.io avatar

@mcc a classic problem with the rust language

ThatOneGuyT_T,
@ThatOneGuyT_T@mastodon.social avatar

@mcc I diddn't even know I wanted this....

mcc,
@mcc@mastodon.social avatar
ThatOneGuyT_T,
@ThatOneGuyT_T@mastodon.social avatar

@mcc of course

bamboombibbitybop,
@bamboombibbitybop@mastodon.social avatar

@mcc Somebody could make some cool album art with this!

skxtch,
@skxtch@mastodon.social avatar

@mcc cool project

absulit,
@absulit@mastodon.social avatar

@mcc art is always needed

veviser,
@veviser@mastodon.social avatar

@mcc 😂😂😂 It's a cool thing, though!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • anitta
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines