How to trigger event based on volume level

Discussion in 'Mac Programming' started by ericbreiter, Aug 23, 2012.

  1. ericbreiter macrumors member

    Jun 13, 2012
    I wish to write a simple application that triggers an event purely based on when the output volume level reaches a certain threshold.

    It does not matter if the application takes all outgoing sounds into account (browser, mp3 players, video players, etc.) or the sound of a specific application if that is even possible.

    Does anyone have any idea on how to go about this?
  2. Mark FX macrumors regular

    Mark FX

    Nov 18, 2011
    West Sussex, UK
    You could write a stay open Applescript application to do this.

    Let me know if your interested in some Applescript code, and I'll post something for you.

    Regards mark
  3. kryten2 macrumors 6502a

    Mar 17, 2012
    You can get/set volume with something like this :

    get volume settings
    set volume output volume 50

Share This Page