Keboose Posted November 4, 2016 Share Posted November 4, 2016 I'm trying to control the EQ using intents via Tasker. Ideally I would like to control the preamp directly, but another option is to switch between EQ presets that are identical except for the preamp level. I have been trying to do both with no success, as I am new to using tasker and java, and am unfamiliar with intents. This action in tasker changed the EQ preamp successfully, but the graphical bar in the UI was stuck at maximum, and there was no audio (regardless of what 'preamp' is set to): Action, com.maxmpz.audioplayer.API_COMMAND Extra, cmd:52 Extra, name:preamp Extra, preamp,1.0 Target, Service I also tried changing the EQ preset instead of the preamp directly, but it requires an EQ preset ID, which the API comments say is a long integer. I have no clue how to find this ID: Action, com.maxmpz.audioplayer.API_COMMAND Extra, cmd:50 Extra, id:1 Target, Service Am i formatting all of this correctly? I'm pretty much flying blind with this stuff. Any help would be appreciated. Thanks! Link to comment Share on other sites More sharing options...
flyingdutchman Posted November 4, 2016 Share Posted November 4, 2016 I am not familiar with Tasker but perhaps an insight in the api helps. the Poweramp api shows the following in relation to the equalizer. I have posted some snippets which may give you pointers. /** * Extras: * - id - long - preset ID */ public static final int SET_EQU_PRESET = 50; /** * Extras: * - value - string - equalizer values, see ACTION_EQU_CHANGED description. */ public static final int SET_EQU_STRING = 51; /** * Extras: * - name - string - equalizer band (bass/treble/preamp/31/62../8K/16K) name * - value - float - equalizer band value (bass/treble/, 31/62../8K/16K => -1.0...1.0, preamp => 0..2.0) */ public static final int SET_EQU_BAND = 52; /** * Extras: * - equ - boolean - if exists and true, equalizer is enabled * - tone - boolean - if exists and true, tone is enabled */ public static final int SET_EQU_ENABLED = 53; public static final String ACTION_EQU_CHANGED = "com.maxmpz.audioplayer.EQU_CHANGED"; private void registerAndLoadStatus() { // Note, it's not necessary to set mStatusIntent/mPlayingModeIntent/mEquIntent this way here, // but this approach can be used with null receiver to get current sticky intent without broadcast receiver. mEquIntent = registerReceiver(mEquReceiver, new IntentFilter(PowerampAPI.ACTION_EQU_CHANGED)); } startService(new Intent(PowerampAPI.ACTION_API_COMMAND).putExtra(PowerampAPI.COMMAND, PowerampAPI.Commands.SET_EQU_ENABLED).putExtra(PowerampAPI.EQU, isChecked)); Link to comment Share on other sites More sharing options...
GodFire62 Posted November 16, 2016 Share Posted November 16, 2016 Hello, did you finally found any solution to change the EQ preset by tasker ? I'm interested... Link to comment Share on other sites More sharing options...
Keboose Posted November 17, 2016 Author Share Posted November 17, 2016 Sorry, I haven't made the time to keep trying to get this to work properly. I honestly think it's an issue with formatting in Tasker. The way Tasker is set up, it's fairly easy to make an intent, but I have never used the Poweramp API before, so I'm not 100% sure what goes where when making one. I'm pretty sure someone could work off this to get it to work, but for now I'm stuck. I think the easiest to do might be the 'change EQ preset' rout, rather than modifying EQ bands directly, but I still have to find out what the preset ID's are. And no offence meant to the developer above who posted the relevant sections from the API, but what they posted doesn't help me find the preset ID's (I don't think.) Another problem is I don't know exactly how the items should be formatted in Tasker. The variables in the API are specified as data types and variable names, but I don't know how to specify that stuff in Tasker. Link to comment Share on other sites More sharing options...
Rodrigo Posted April 8, 2017 Share Posted April 8, 2017 I'm still struggling to get it to work. Could anyone solve this? I was able to know the preset ID that I want to use but I can't get it to work... Link to comment Share on other sites More sharing options...
bott0610 Posted August 25, 2017 Share Posted August 25, 2017 Any updates on this issue? How are you able to find preset IDs? Link to comment Share on other sites More sharing options...
loft Posted September 20, 2017 Share Posted September 20, 2017 I've just read all the materials I could find about the issue and nailed down to the preset ID. Is is never to be found. Not even com.maxmpz.audioplayer.EQU_CHANGED intent doesn't show it. Poweramp 3 alpha doesn't work either. So I resorted to the next best working thing which is: /** * Extras: * - value - string - equalizer values, see ACTION_EQU_CHANGED description. */ public static final int SET_EQU_STRING = 51; I am attaching a small archive with a set EQ task and a profile to get the EQ values out of Poweramp. It will make life easier for people looking into this matter. EQ.7z Link to comment Share on other sites More sharing options...
Dekmeena Posted May 9, 2018 Share Posted May 9, 2018 /** * Extras: * - id - long - preset ID */ public static final int SET_EQU_PRESET = 50; /** * Extras: * - value - string - equalizer values, see ACTION_EQU_CHANGED description. */ public static final int SET_EQU_STRING = 51; /** * Extras: * - name - string - equalizer band (bass/treble/preamp/31/62../8K/16K) name * - value - float - equalizer band value (bass/treble/, 31/62../8K/16K => -1.0...1.0, preamp => 0..2.0) */ public static final int SET_EQU_BAND = 52; /** * Extras: * - equ - boolean - if exists and true, equalizer is enabled * - tone - boolean - if exists and true, tone is enabled */ public static final int SET_EQU_ENABLED = 53; public static final String ACTION_EQU_CHANGED = "com.maxmpz.audioplayer.EQU_CHANGED"; private void registerAndLoadStatus() { // Note, it's not necessary to set mStatusIntent/mPlayingModeIntent/mEquIntent this way here, // but this approach can be used with null receiver to get current sticky intent without broadcast receiver. mEquIntent = registerReceiver(mEquReceiver, new IntentFilter(PowerampAPI.ACTION_EQU_CHANGED)); } startService(new Intent(PowerampAPI.ACTION_API_COMMAND).putExtra(PowerampAPI.COMMAND, PowerampAPI.Commands.SET_EQU_ENABLED).putExtra(PowerampAPI.EQU, isChecked)); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.