Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. A metronome app in C#

A metronome app in C#

Scheduled Pinned Locked Moved C#
csharpquestion
4 Posts 3 Posters 0 Views 1 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.
  • N Offline
    N Offline
    NietzscheDisciple
    wrote on last edited by
    #1

    I'd like to write a metronome application in C#. What Timer class would you recommend for accurate time-keeping. I also plan on using DirectSound to play the WAV files representing the ticks. Does this impose a significant overhead? If you know of code for a metronome app in C#, I'd appreciate it. This would only be for personal reference. I will not copy the code and use it in my app.

    C S 2 Replies Last reply
    0
    • N NietzscheDisciple

      I'd like to write a metronome application in C#. What Timer class would you recommend for accurate time-keeping. I also plan on using DirectSound to play the WAV files representing the ticks. Does this impose a significant overhead? If you know of code for a metronome app in C#, I'd appreciate it. This would only be for personal reference. I will not copy the code and use it in my app.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      NietzscheDisciple wrote: What Timer class would you recommend for accurate time-keeping. Just the normal one will be fine. NietzscheDisciple wrote: I also plan on using DirectSound to play the WAV files representing the ticks. Does this impose a significant overhead? What on earth for ? Why rely on Direct Sound to play a simple sound file - it's overkill. And DirectSound is used in games that are doing a lot more than firing a timer, I doubt it will bring your app to it's knees if you use it :-) Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

      N 1 Reply Last reply
      0
      • C Christian Graus

        NietzscheDisciple wrote: What Timer class would you recommend for accurate time-keeping. Just the normal one will be fine. NietzscheDisciple wrote: I also plan on using DirectSound to play the WAV files representing the ticks. Does this impose a significant overhead? What on earth for ? Why rely on Direct Sound to play a simple sound file - it's overkill. And DirectSound is used in games that are doing a lot more than firing a timer, I doubt it will bring your app to it's knees if you use it :-) Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

        N Offline
        N Offline
        NietzscheDisciple
        wrote on last edited by
        #3

        Thanks for the reply, Christian. I've done some DirectSound programming and it's pretty neat. My apprehension was that the SecondaryBuffer wouldn't clear "cleanly enough" for this application. Esp. if the metronome was going at 180 bpm+.

        1 Reply Last reply
        0
        • N NietzscheDisciple

          I'd like to write a metronome application in C#. What Timer class would you recommend for accurate time-keeping. I also plan on using DirectSound to play the WAV files representing the ticks. Does this impose a significant overhead? If you know of code for a metronome app in C#, I'd appreciate it. This would only be for personal reference. I will not copy the code and use it in my app.

          S Offline
          S Offline
          Stefan Troschuetz
          wrote on last edited by
          #4

          This site[^] from MSDN gives a good overview on the different timers.


          www.troschuetz.de

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups