Results 1 to 20 of 22

Thread: Help needed to develop an audio editor

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Help needed to develop an audio editor

    Quote Originally Posted by franco.amato View Post
    What I only need is an help to develop that widget, but seems impossible to get that help.
    Well, you come here, tell us that you want to do something very difficult and that you have no clue and want some help.

    The problem is that you did not ask specific questions. If there is some question that I can answer with "Yes" and "No" or when you give us some code and say: "Here it does not compile" or "there is a crash", we can help.

    But till now it sounds like we shall do the work you get paid for.

    If your company wants you to code some application in Qt and you have no clue how to do that, ask your company to get some paid training.

    We are realy like to help you but we will not spend hours and hours on you try to figure out what your problem is. We like to help, but keep in mind we do this in our free time because we like Qt programming. If you are unsatisfied with our service, buy some support from Nokia.
    It's nice to be important but it's more important to be nice.

  2. The following user says thank you to axeljaeger for this useful post:

    FS Lover (25th October 2009)

  3. #2
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help needed to develop an audio editor

    Quote Originally Posted by axeljaeger View Post
    Well, you come here, tell us that you want to do something very difficult and that you have no clue and want some help.

    The problem is that you did not ask specific questions. If there is some question that I can answer with "Yes" and "No" or when you give us some code and say: "Here it does not compile" or "there is a crash", we can help.

    But till now it sounds like we shall do the work you get paid for.

    If your company wants you to code some application in Qt and you have no clue how to do that, ask your company to get some paid training.

    We are realy like to help you but we will not spend hours and hours on you try to figure out what your problem is. We like to help, but keep in mind we do this in our free time because we like Qt programming. If you are unsatisfied with our service, buy some support from Nokia.
    What I need is some guide line on how to build the widget where I should show the wave form of the sound track I will load. Something as you can see in the image in this link:
    http://www.guidesandtutorials.com/audacity-tracks.html.

    I don't want you write it for me ( also because I want to learn Qt ). I need an help on build it and If I can't I'll pay someone to write it for me, but at the moment I want to try to write it.

    Thank you in advance.

    Best Regards
    Franco Amato

  4. #3
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Help needed to develop an audio editor

    Subclass QWidget, reimplement paintEvent and mousePress/mouseRelease.
    It's nice to be important but it's more important to be nice.

  5. #4
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Help needed to develop an audio editor

    why don't you take a closer look at how audacity (open source project) did this particular waveform display and try if you can map it to something in Qt.
    Qt has one of the best documentation of all its classes and very good examples. There surely must be one that relates to what you want to do.
    If you still can't figure it out, at least you will have some better questions to ask.

    good luck,
    -a

  6. #5
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help needed to develop an audio editor

    Quote Originally Posted by schnitzel View Post
    why don't you take a closer look at how audacity (open source project) did this particular waveform display and try if you can map it to something in Qt.
    Qt has one of the best documentation of all its classes and very good examples. There surely must be one that relates to what you want to do.
    If you still can't figure it out, at least you will have some better questions to ask.

    good luck,
    -a
    I tried to do that but's very complex and audacity has a lot of things I don't need.
    I only need to draw the pcm sample's amplitude ( waveform ) and add the possibility to the user to do selection with the mouse over them.
    Franco Amato

  7. #6
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help needed to develop an audio editor

    Quote Originally Posted by axeljaeger View Post
    Subclass QWidget, reimplement paintEvent and mousePress/mouseRelease.
    Could you help me to build that widget? I'll post the code,
    if you have free time.
    Franco Amato

  8. #7
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Help needed to develop an audio editor

    Quote Originally Posted by franco.amato View Post
    Could you help me to build that widget?
    If you show me your code, I will have a look at it.
    It's nice to be important but it's more important to be nice.

  9. #8
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help needed to develop an audio editor

    Quote Originally Posted by axeljaeger View Post
    If you show me your code, I will have a look at it.
    Hi,
    I started writing some code.
    The class interface:
    Qt Code:
    1. #ifndef __WAVEFORMDISPLAY_H__
    2. #define __WAVEFORMDISPLAY_H__
    3.  
    4. #include <QWidget>
    5.  
    6. class WaveFormDisplay : public QWidget
    7. {
    8. Q_OBJECT
    9.  
    10. public:
    11. WaveFormDisplay( QWidget* parent = 0 );
    12.  
    13. protected:
    14. void paintEvent( QPaintEvent* event );
    15. void mousePressEvent(QMouseEvent *event);
    16. void mouseMoveEvent(QMouseEvent *event);
    17. void mouseReleaseEvent(QMouseEvent *event);
    18.  
    19. private:
    20. };
    21.  
    22. #endif //__WAVEFORMDISPLAY_H__
    To copy to clipboard, switch view to plain text mode 

    And the methods:
    Qt Code:
    1. #include "waveformdisplay.h"
    2.  
    3. WaveFormDisplay::WaveFormDisplay( QWidget* parent /* = 0 */ )
    4. {
    5. setPalette( QPalette( QColor( 250, 250, 200 ) ) );
    6. setAutoFillBackground(true);
    7. setWindowTitle( tr("Waveform display") );
    8. resize(500, 200);
    9. }
    10. // Paint event
    11. void WaveFormDisplay::paintEvent( QPaintEvent* event )
    12. {
    13. QLine line( 0, height() / 2.0, width(), height() / 2.0 );
    14. QPen pen( Qt::blue, 1 ); // red solid line, 1 pixels wide
    15.  
    16. QPainter painter( this );
    17. painter.setPen( pen );
    18. painter.setRenderHint( QPainter::Antialiasing );
    19.  
    20. painter.drawLine(line);
    21. }
    22.  
    23. // Mouse press event
    24. void mousePressEvent( QMouseEvent *event )
    25. {
    26. event->accept();
    27. }
    28.  
    29. // Mouse move event
    30. void mouseMoveEvent( QMouseEvent *event )
    31. {
    32. event->accept();
    33. }
    34.  
    35. // Mouse release event
    36. void mouseReleaseEvent( QMouseEvent *event )
    37. {
    38. event->accept();
    39. }
    To copy to clipboard, switch view to plain text mode 

    Do you already have some suggestions? Code is just to start and I already got linker error about mouse event
    Franco Amato

  10. #9
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Help needed to develop an audio editor

    If you would have shown as the error message of the linker, it would be a lot easier to help.

    Anyway, in this simple case I guess you just forgot the WaveFormDisplay:: in the method signature of your implementation to the linker does not know that the three mouse-event-handler belong to your class.

    But also some comments to your code:
    1. Why do you "accept" the mouse-events already?
    2. Although it is good to write documentation, you "document the obvious": http://freeworld.thc.org/root/phun/unmaintain.html
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Which dll is needed to play the audio files
    By addu in forum Qt Programming
    Replies: 1
    Last Post: 26th June 2009, 23:20

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
  •  
Qt is a trademark of The Qt Company.