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. How to Create an array of QSound or Qmediaplayer?
Forum Updated to NodeBB v4.3 + New Features

How to Create an array of QSound or Qmediaplayer?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 1.3k Views 2 Watching
  • 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.
  • T Offline
    T Offline
    thundercat
    wrote on last edited by
    #1

    Hello everyone, this is my first post here on QT Forum. Im currently developing a program for a school assignment, and am having some troubles.

    i want to create a sort of rhythm machine where you have a set of 8 pushbuttons with drum sounds.

    And the user will be able to choose which sounds to play in 16 beat tempo.

    i was thinking about creating an array of Qsounds or Qmediaplayer to do it, but still dont know how to go about this.

    There arent many QT music related developed softwares on the internet to search for, at least i cannot find many.

    Can someone help me with this?

    thanks in advance

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Fuel
      wrote on last edited by
      #2

      Maybe a deeper look to this Class helps. http://doc.qt.io/qt-5/qmediaplayer.html

      You can save the Files in a Mediaplaylist with only one player.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        That's because the QtMultimedia modules is currently not suited for advanced audio mixing. Since you plan multiple tracks to be played independently you should rather look for a more suited audio processing library and use Qt to build the other parts on top of it. Note that you can still use QAudioOutput to listen to the result of your mix.

        Hope it helps

        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
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          hi
          You could take inspiration in some of the existing sounds programs.
          https://qtractor.sourceforge.io/
          (linux)

          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