Viet Phan X

[⚠️ JOURNEY] Building MP3 AI Manager for Music Hoarders (Day 27)

Author AvatarViet Phan
0
Feb 9, 2025
2 min read

Day 27

Hours worked/Total: 13/84

Avaloniawaveform

Day Recap

Fully transitioned to new audio library, rewrote the audio player with sampling, and attempted to recreate a waveform display. Faced major challenges adapting example code to the MVVM architecture, leading to whole day of suffering.

What I Did

  • Ditched old audio library completely:
    • Fully committed to new audio library, rewriting the audio player to use sampling for better performance.
  • Tried to implement a waveform visualization:
    • Copied example code from WPF samples to adapt it for Avalonia.
    • Faced frustration trying to refactor the code into an MVVM-friendly structure—bindings refused to pass data properly.
    • Eventually moved the variable with event handlers to the code-behind since it manipulates the canvas directly.
    • The waveform finally displayed, but now loading feels slow because it renders waveform pixel by pixel

Remarks

I hit a wall today.

Trying to force WPF example codes into Avalonia’s MVVM structure felt like fitting a square peg in a round hole.

Bindings not working, data not passing, UI not updating—it was a mess.

After hours of frustration, I just gave up on doing it the “proper” MVVM way and moved the logic to the code-behind. It’s not elegant, but at least it works… sort of.

The waveform now loads, but it’s slow, and honestly, I’m just too tired to care today.

Next Goals

Add audio scrubbing.

πŸ‘¨β€πŸ’» Software DevelopmentπŸš€ Journey

Got an Idea?

Let's Build It!

I can bring your ideas to life - FREE of charge

Book a free consultation and let’s identify opportunities to turn your vision into a successful business

15 min call

Get idea feedback

from 17+ consultations
?
Usually responds within 24h

If You Like what I do
You can buy me a coffee πŸ‘‡
Send β˜• via PayPalSend β˜• with Bitcoin

πŸ€™ Let's connect

Made by Viet Phan Β© 2018-2025Privacy Policy