Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 757529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:22:26+00:00 2026-05-14T15:22:26+00:00

Writing a sound control applet with GUI that communicates with a device via USB.

  • 0

Writing a sound control applet with GUI that communicates with a device via USB. There are several type of controls being used, faders, knobs, on/off switches. Although there are functional similarites there are often different calcualtions, ranges and settings for each, though ultimately everything gets funneled into a big structure and shipped across.

Question is this: Is there a specific pattern I should be looking at to clean this up? At present almost every control has a specific event handler that updates the main control strucure, any change in GUI appearence, and then updates the device, but it seems messy and cumbersome and I’m thinking there’s probably am established pattern for this sort of thing, but I’m not that knowledgable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:22:26+00:00Added an answer on May 14, 2026 at 3:22 pm

    An architecture where every control has a “changed” event handler that updates the main structure makes sense in an application where a user can only manipulate one control at a time. If the events for each control have the same signature, then hopefully the code only has one handler method – if in the codebase each control has its own method with the same identical main-structure-updating code, then this is a good place for refactoring.

    If each control has different properties and different things that it needs to do to the master structure, then this multiple-event handler architecture is perfectly sensible.

    One thing that possibly doesn’t make sense is your indication that the GUI is refreshed/repainted/updated before the new control information is sent to the device. However, if the time required for both operations is miniscule, then this won’t make any difference.

    Warning – mostly off-topic rant: Finally, I’m assuming from your description that the GUI is the standard looks-like-the-faceplate-of-a-rack-mounted-audio-component kind of thing. Personally, I hate these things. They look good (sort of, and sometimes), but the controls are just a pain to use.

    For example, the typical knob control is manipulated by clicking on it and then dragging up and down (or right and left sometimes). This is functional (even though it’s not the way a “real” knob works), although I often find that the mouse cursor itself obscures the already-hard-to-see little black indicator line on the knob (and then I move the mouse so I can see it, which is a problem). I have used some knob controls that require a circular motion like a real knob, but these are only useful if they’re large.

    The typical toggle switch control is another minor PITA, requiring you to click a tiny thing and then move it a tiny distance. One thing is typically true about the standard controls in any OS: they’re ugly, but they’re ugly for a reason, and the reason is general usability.

    Finally, the whole advantage of a computer-screen UI over a real-world hardware UI is that the computer UI can take advantage of resizing and rearranging UI elements on the fly. This advantage is thrown out the window when you consciously make your UI look and act like a piece of metal or plastic (or wood grain).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing a little GUI program that does some work and exits afterwards.
I'm writing an application that listens for sound events (using messages passed in with
I'm writing an audio application that has multiple threads producing sound and one thread
I'm writing a Windows Forms application which is supposed to play three sound files
I'm looking to use procedurally-generated sound and music in a Flash program I'm writing.
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
When writing a switch statement, there appears to be two limitations on what you
I'm writing a sound editor for my graduation. I'm using BASS to extract samples
I need GUI control for audio file presentation. The language is not very important
I'm writing some C# bindings for the C library controlling the pulseaudio sound server,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.