Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Music visualization

Music visualization

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 975 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ar3em
    wrote on last edited by
    #1

    Hello!

    There is a player that plays mp3-files using QMediaPlayer. I want to implement visualization of the played track. The documentation found that access to the audio buffer during playback can be obtained using the QAudioProbe class. I do it this way:

    Probe = new QAudioProbe ();
    Probe-> setSource (player); // player - QMediaPlayer object
    Connect (probe, SIGNAL (audioBufferProbed (QAudioBuffer)), this, SLOT (processBuffer (QAudioBuffer)));

    Then in the slot processBuffer we have access to the buffer:
    Void MainWindow :: processBuffer (const QAudioBuffer & buffer)
    {
    }

    How does this buffer work? How to get parameters that can be visualized (amplitude, frequency)?

    1 Reply Last reply
    0
    • tekojoT Offline
      tekojoT Offline
      tekojo
      wrote on last edited by
      #2

      Hi @ar3em
      There is a nice example in Qt Multimedia about this:
      https://doc.qt.io/qt-5/qtmultimedia-multimedia-spectrum-example.html
      That should have all the necessary pieces in it.

      Also the basic documentation has a snippet on the topic http://doc.qt.io/qt-5/audiooverview.html

      1 Reply Last reply
      2
      • M Offline
        M Offline
        minababy21
        Banned
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved