Coder Social home page Coder Social logo

mintone's Introduction

MinTone

Minimal tone generator

This little app, at least upon conception through alpha, is an extremely minimalistic tone generator for 'droid phones. It features three preset radio buttons, a manual numeric entry field, and a seekbar for different frequency selection options. While initially it was going to just play each tone for a preset duration, it seems that it would be much more useful if it had an option for continuous tone generation until toggled off. So, with that, and a few other thoughts as far as varying sample rate, and changing the available frequency presets, I've decided to add a small control panel, and the capability to save user settings.

It would be good, at some point, to try to implement this in a fashion capable of audio playback, while other audio resources are being utilized, as well. I believe that's about it for now...

mintone's People

Contributors

dgets avatar

Watchers

 avatar

mintone's Issues

Play button doesn't toggle

At the end of an arbitrary, but non-looping, tone generation, the 'play/pause' button is not toggling back to the non-playing state.

Hitting 'set freq' with empty text field crashes app

The 'set frequency' button becomes active immediately upon entering the numeric text entry field. Unfortunately, when pressed without first entering a frequency, this crashes the application. I'm thinking that the best way to handle this would probably be to set things up so that 'set frequency' is not accessible prior to entering any digits (as well as after backspacing over all digits).

Shatter the monolith

This app was created before proper knowledge on how to break apart a java application with different Context/View values. As a result, it is a huge, hideous monolith. In working on CPURecord, I'm getting very close to knowing how to do this correctly. Thus, soon, it will be time to break this monolith into maintainable sized chunks.

Implement user configuration file

Time to start adding preferences that will be user customized, including:

  • user's own preset frequencies
  • tone duration or continuous
  • color preferences, mayhaps? not really anything but eye candy, but it'd be a good chance to learn to user some more methods and color palettes, etc

Out of range entry crashes app

When the user enters a frequency manually that happens to be out of range, the app crashes, presumably upon throwing MyException.

Unset freq doesn't play other selection

If, before any tones are played, one enters the manual selection text box without entering a frequency & hits play, no tone is played. Also, as the AudioTrack & listeners have not been set up, the play button was not responding properly to toggling.

After a little bit more messing with this, it appears that the issue is intermittent. Fun debugging!

Numeric keypad doesn't disappear

After selecting the text entry field in order to manually specify a frequency to play, the numeric keypad does not disappear after clicking 'enter' in the keypad, nor when the 'set frequency' button is clicked. Extraordinarily inconvenient; this needs to disappear without having to click 'back' on the phone controls.

Manual tone selection not working

Manual frequency selection does not work; the tone stays at initially set value. That being modifiable only by the SeekBar, at this point.

Increase frequency precision

When utilizing manual frequency selection, there's not really any good reason that double value frequencies in Hz should be accepted. Obviously this wouldn't be feasible for the SeekBar, but the presets might be alright with it, too...

Implement out-of-range frequency exception & notification

When manual frequency selection is used, no validation is performed for frequency being within valid bounds. This will require finishing implementation of MyException and creation of an exception notification display for the user.

Changing freq while actively playing not handled

Any attempt at changing the frequency via presets, SeekBar, or manual entry, will not change the currently playing status. This should probably be handled by stopping playback of the current tone. Maybe a user configuration setting could determine whether or not a frequency change triggers the tone to switch to the new frequency and continue playing... That would be more flexible, I suppose.

Implement changeable preset frequencies

I was starting to do this en route to implementing #7, but the method that I was using really didn't pan out very well. The whole app was refusing to load without crashing immediately. At this point, this seems to warrant its own issue.

The RadioButton preset selections need to be set via programatic means. Without this, there is really no reason to implement #7 currently.

Manual frequency selection issues

At this point, the manual frequency selection controls need some additional tuning. For instance, when entering the EditText box, the 'set frequency' Button is not immediately enabled now. This is good, proper behavior, as far as I'm concerned. However, the button does not activate until the user has entered a numeric value, and pressed 'enter', on the touchscreen. This is not the behavior that we want. I'm not sure if it's possible to parse the edit text's value before it's been entered, but that would be best... IE: dynamic enabling, and disabling, of the button, depending on the value (20 <= val <= 20k). If this is not possible, the button at least needs to be active after starting to enter numeric values. Then the validation can be processed once the set frequency button is pressed.

There are other issues, #21, and #19, that will be closely related to the code in this issue, as well. I believe that #22 is closed, in working with this segment, though.

Untoggling 'loop' checkbox while playing error

When the Loop checkbox is set, and a tone is playing, unsetting the checkbox without first stopping playing the tone will cause the tone to stop playing. At this point the button text will switch to 'Play', indicating that the tone is completed, but the activated toggle bar stays lit.

Obviously this event is not planned for properly. Easiest way to fix it would be disabling the checkbox while the tone is actively playing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.