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. Audio Editing

Audio Editing

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 6 Posters 2.0k 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.
  • S Offline
    S Offline
    scotryder
    wrote on 7 Feb 2018, 12:09 last edited by
    #1

    I’m new to QT Development and so far enjoying it very much. I have already tried building some basic. I want to build an app that will play an audio file, and i want to remove/edit some parts of that audio.

    For example, if its a 1 minute song, i could press a button to start cutting from 15 second and then press it to stop on 30 second and then press to start cutting on 50 second and stop on 5 seond, which means i get final edited audio file of 15+5 = 20 seconds.

    For now, i used a MediaPlayer QML component to play an embeded file which is working fine. So how should i proceed with getting access to binary audio data and then remove some parts of it.

    Please advise how can I approach it?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 Feb 2018, 15:09 last edited by
      #2

      Hi,

      Editing of files is currently outside of QtMultimedia's scope. You'd need to use another framework besides Qt for that.

      You might want to check on other open source audio application to see what framework they use for that kind of work.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 7 Feb 2018, 21:01 last edited by
        #3

        Hi
        this might be a candidate to study
        https://github.com/psemiletov/eko
        (image)
        https://www.linux-apps.com/content/show.php/EKO?content=136558

        1 Reply Last reply
        1
        • S Offline
          S Offline
          scotryder
          wrote on 10 Feb 2018, 17:35 last edited by
          #4

          Re: Audio Editing

          Please bear me for a moment, QTmultimedia framework can play the audio, which means it has access to raw audio data (bytearray). all i have to do is create a new array that includes the data from indexes which i want in final sound.

          Can this "theory" be implemened without relying on other third party library?

          Thanks

          A 1 Reply Last reply 10 Feb 2018, 18:06
          0
          • S scotryder
            10 Feb 2018, 17:35

            Re: Audio Editing

            Please bear me for a moment, QTmultimedia framework can play the audio, which means it has access to raw audio data (bytearray). all i have to do is create a new array that includes the data from indexes which i want in final sound.

            Can this "theory" be implemened without relying on other third party library?

            Thanks

            A Offline
            A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on 10 Feb 2018, 18:06 last edited by
            #5

            @scotryder said in Audio Editing:

            Can this "theory" be implemened without relying on other third party library?

            I think simple cutting should be easily done the way you described it.

            You may even be able to perform other audio transformations without third party libraries - as long as you know how to implement the needed algorithms ;)

            Qt has to stay free or it will die.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              scotryder
              wrote on 10 Feb 2018, 20:23 last edited by
              #6

              all i want to do is simply cut and merge, thats it.
              if u guys can guide me how to achieve that, i'd greatly appreciate.

              ? 1 Reply Last reply 12 Feb 2018, 12:08
              0
              • S scotryder
                10 Feb 2018, 20:23

                all i want to do is simply cut and merge, thats it.
                if u guys can guide me how to achieve that, i'd greatly appreciate.

                ? Offline
                ? Offline
                A Former User
                wrote on 12 Feb 2018, 12:08 last edited by A Former User 2 Dec 2018, 14:12
                #7

                @scotryder Scot, I know a little about Audio, and I know if you do what you suggest, you will end up with a broken waveform, which may lead to nasty artifacts in your Audio.0_1518439369038_58ccb3b8-e467-4ab5-b104-0d1d28e2b92a.png

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on 14 Feb 2018, 12:42 last edited by
                  #8

                  @scotryder simple editing of audio file may be simple only if you are dealing with headerless file that contains uncompressed audio data, in all other cases you'll have to first parse the file, then decode it to get access to the audio samples, and only after that you can do editing. Also, when you finished with editing you will probably want to encode resulting audio with the same codec (or different one if you prefer) before saving it back to the disk.

                  Also, the fact that 'QMediaPlayer' can play some audio file doesn't necessary means that it has access to audio samples, there can be quite a few libraries "between" high level library ('Qt Multimedia' in this case) and library that does actual audio decoding. It's even possible to have audio playback where none of the libraries involved have access to audio samples, not even the audio driver itself (in the case of hardware decoding).

                  Depending on what audio file formats/codecs your app should support you may end up with using multiple third party libraries and not just one.

                  1 Reply Last reply
                  2

                  4/8

                  10 Feb 2018, 17:35

                  • Login

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