• Announcements

    • andrewilley

      Poweramp v3 Project Update   03/22/2017

      As you may be aware, the Poweramp developer has been working hard on an updated material design user interface for Poweramp v3 which required a full ground-up rebuild of the code. It's not quite ready for open testing yet, and although he would like to be able to get it out by the end of the March it may just drop over into April. See forum thread for more details and to discuss.    
Keboose

Tasker Intents and EQ Presets

5 posts in this topic

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!

Share this post


Link to post
Share on other sites

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));

 

Share this post


Link to post
Share on other sites

Hello, did you finally found any solution to change the EQ preset by tasker ? I'm interested... 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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...

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now