Results 1 to 6 of 6

Thread: Frequency of Audio Track

  1. #1
    Join Date
    Jul 2010
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Frequency of Audio Track

    Hi,
    I want to develop an audio editor using Qt.
    For this, I need to plot a waveform of the music track which I think should be a plot of frequency of sound versus time(please correct me if I am wrong).

    Currently, I have been using Phonon::AudioOutput class object as an audio sink and connected it with my Phonon::MediaObject class object to play the audio file.

    Now, to draw the waveform I need to know the frequeny of audio track at every second (,or so) from this AudioOutput object so that I can draw a line (using QPainter) of length proportional to sound frequency at different times and hence, obtain my waveform.

    So, please help me on how to obtain frequency of audio tracks at different times.
    Thanks

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Frequency of Audio Track

    I can't help you with this, but what you want is the amplitude of the sound, not the frequency. To obtain the frequency, you would need to run the sound file through a Fourier Transform, and I doubt that's what you want to do.

  3. #3
    Join Date
    Jul 2010
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Frequency of Audio Track

    okay

    But, how can I then obtain the amplitude of my audio file using AudioOutput object (or any other class object)?

    Secondy,am i using the correct way of plotting waveforms of audio tracks - plotting amplitudes of sound against time by plotting lines by Qpainter object on a widget at different times.

    Thanks

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Frequency of Audio Track

    You can't get access to audio or video data through Phonon, it's only for playback. You can use the QtMultimedia module though.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2010
    Posts
    30
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Frequency of Audio Track

    Check out QwtPlot, it might make life easier

  6. #6
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Frequency of Audio Track

    There's also a spectrum analyser example in latest qt demo. Check that out.

Similar Threads

  1. Frequency of sound data
    By momesana in forum General Programming
    Replies: 1
    Last Post: 10th May 2010, 22:21
  2. Replies: 9
    Last Post: 28th April 2010, 11:37
  3. How to track scrolling
    By Slewman in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2010, 23:45
  4. Replies: 0
    Last Post: 21st January 2010, 14:35
  5. how to track mouse button inside treeItemClickAction?
    By sudhansu in forum Qt Programming
    Replies: 2
    Last Post: 24th November 2009, 11:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.