Waveform display

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron N.

    Waveform display

    I am currently rewriting an application originally developped in VC++ that
    plays a .wav file and displays a representation of the waveform as it is
    played (with a marker indicating current position in the audio file); making
    use of DirectX9.

    So far I am able to load and play, stop and resume play of a sample .wav
    file. I am making use of a previously developed user control that is capable
    of displaying the waveform (statically), scrolling form right to left,
    zooming in and out, etc.

    The control currently displays a portion of the waveform (with the marker
    and starting postion in the center of the control), and the scrolling
    triggers a Refresh() which calls my draw method using Drawline(pen,
    X1,Y1,X2,Y2). The control will also need to play and display at variable
    speeds, rewind and fast forward. I need to be able to synchronize the play
    position in the audio file and the relative marker position on the control.

    My question is this: Am I missing the boat completely? Is there an easier
    way to do this in C# or am I on the right track and just have a little more
    work ahead of me? I would appreciate links, tips, source code samples,
    anything at all.

    Thanks in advance,
    Aaron N.
  • Dan  Bass

    #2
    Re: Waveform display

    Been a while since I looked at wav and multimedia stuff... Have you googled
    on this? I did and found quite a lot of stuff...


    [beware of line breaks]



    "Aaron N." <jaguars2574@SP AMYOURSELFhotma il.com> wrote in message
    news:24B0DC61-F867-459F-BB20-446EB2821C50@mi crosoft.com...[color=blue]
    >I am currently rewriting an application originally developped in VC++ that
    > plays a .wav file and displays a representation of the waveform as it is
    > played (with a marker indicating current position in the audio file);
    > making
    > use of DirectX9.
    >
    > So far I am able to load and play, stop and resume play of a sample .wav
    > file. I am making use of a previously developed user control that is
    > capable
    > of displaying the waveform (statically), scrolling form right to left,
    > zooming in and out, etc.
    >
    > The control currently displays a portion of the waveform (with the marker
    > and starting postion in the center of the control), and the scrolling
    > triggers a Refresh() which calls my draw method using Drawline(pen,
    > X1,Y1,X2,Y2). The control will also need to play and display at variable
    > speeds, rewind and fast forward. I need to be able to synchronize the play
    > position in the audio file and the relative marker position on the
    > control.
    >
    > My question is this: Am I missing the boat completely? Is there an easier
    > way to do this in C# or am I on the right track and just have a little
    > more
    > work ahead of me? I would appreciate links, tips, source code samples,
    > anything at all.
    >
    > Thanks in advance,
    > Aaron N.[/color]


    Comment

    • Aaron N.

      #3
      Re: Waveform display

      Thanks for the reply,

      I can play the wav file, control the volume and the balance etc. That's all
      provided in the DirectX9 samples.

      What I need to do now is build a visual component that displays the waveform
      and can (as accurately as possible) indicate where I am in the file. I am
      standing on the shoulders of another developer here that wrote a
      "WaveContro l" user control that statically displays the waveform and can do
      things like scroll and zoom. I'm trying to build on it and synchronize it
      with the playing of the audio to indicate relative position.

      I guess what I'm trying to avoid is re-inventing the wheel... if it's been
      done before, I'd really like to save time on this portion of the project.

      Thanks for the input.
      Aaron N.


      "Dan Bass" wrote:
      [color=blue]
      > Been a while since I looked at wav and multimedia stuff... Have you googled
      > on this? I did and found quite a lot of stuff...
      >
      > http://www.google.co.uk/search?sourc...iles+play+c%23
      > [beware of line breaks]
      >
      >
      >
      > "Aaron N." <jaguars2574@SP AMYOURSELFhotma il.com> wrote in message
      > news:24B0DC61-F867-459F-BB20-446EB2821C50@mi crosoft.com...[color=green]
      > >I am currently rewriting an application originally developped in VC++ that
      > > plays a .wav file and displays a representation of the waveform as it is
      > > played (with a marker indicating current position in the audio file);
      > > making
      > > use of DirectX9.
      > >
      > > So far I am able to load and play, stop and resume play of a sample .wav
      > > file. I am making use of a previously developed user control that is
      > > capable
      > > of displaying the waveform (statically), scrolling form right to left,
      > > zooming in and out, etc.
      > >
      > > The control currently displays a portion of the waveform (with the marker
      > > and starting postion in the center of the control), and the scrolling
      > > triggers a Refresh() which calls my draw method using Drawline(pen,
      > > X1,Y1,X2,Y2). The control will also need to play and display at variable
      > > speeds, rewind and fast forward. I need to be able to synchronize the play
      > > position in the audio file and the relative marker position on the
      > > control.
      > >
      > > My question is this: Am I missing the boat completely? Is there an easier
      > > way to do this in C# or am I on the right track and just have a little
      > > more
      > > work ahead of me? I would appreciate links, tips, source code samples,
      > > anything at all.
      > >
      > > Thanks in advance,
      > > Aaron N.[/color]
      >
      >
      >[/color]

      Comment

      Working...