Probably very basic, but I'm having trouble getting my brain around the model

49 views
Skip to first unread message

Leo Notenboom

unread,
Jan 22, 2017, 10:13:13 PM1/22/17
to Tasker
Newbie with Tasker.

Here's my goal:

Shake my phone
  - IF Easy Voice Recorder is NOT running or recording
    - Play a sound
    - Start Easy Voice record, and start recording
  - ELSE (it is in the process of recording)
    - Stop the recording
    - Play a different sound

Hopefully you get the idea. I have something that starts EVR when I shake my phone. (Pixel XL if it matters.) But I'm having a heck of a time figuring out how to do the conditional. I don't yet have a good mental model of how this is all supposed to work.

Definitely spent time with the docs, but it's very possible I've overlooked something simple and key.

Any pointers very gratefully accepted....

Thanks,

Leo

shykitten55

unread,
Jan 23, 2017, 9:43:45 PM1/23/17
to Tasker
Hey Leo.

I'm not a rocket scientist, but I'll try to help.

(Oh, which "Easy voice recorder"?  Publisher?  It would help.)

1 - you are going to have to stop "EVR" being started from the other program.  Not 100% needed, but it keeps things "clean".

2 - There is a condition that if it is loaded already, it starts recording.   I think this is where it is all falling apart.
For this to work, the program needs to tell Tasker:  "I am loaded" or "I am recording".  If it doesn't they it just won't work.

Now, I said "Clean" at the start.   That is:  Tasker is the one who controls what is going on.  Having a third party app doing things, complicates matters.


However:  It can be used to your advantage too.....

For now, I shall have to leave it there.   Not enough info to know which one you are using.

You do understand that there needs to be a "port" which allows Tasker to talk to it?
Unless there is a CLI way of getting around that, but I think that would be just as complicated anyway.

shykitten55

unread,
Jan 23, 2017, 10:13:33 PM1/23/17
to Tasker
Update:

If you are using the "digipom" one, then this may be of interest:

http://android.stackexchange.com/questions/71334/how-to-make-a-schedule-voice-recorder-using-tasker-easy-voice-recorder

So taking that reply apart, you should be able to get something going.

Oh, you have THREE steps.  Reading the page, I think you could make it TWO.

1 - (not recording / irrespective if loaded or not)
Play "noise A",
Load program and start recording.

2- (Recording)
Play "noise B",
Stop recording.

As you want to make SHAKE the trigger for both, have a flag in tasker (or more correctly a variable) and it keeps track of what is going on.
When it is SHAKEN, the variable is incremented and then XOR with 2.  (That way it is only 0 or 1.)
If it is zero, do ......
If it is one, do .....

Good luck.





On Monday, January 23, 2017 at 2:13:13 PM UTC+11, Leo Notenboom wrote:

Leo Notenboom

unread,
Jan 24, 2017, 8:05:11 PM1/24/17
to Tasker
On Monday, January 23, 2017 at 7:13:33 PM UTC-8, shykitten55 wrote:

If you are using the "digipom" one, then this may be of interest:

Thank you. Helpful guidance. To be clear this is Easy Voice Recorder Pro from digipom, yes. (I'm open to using other utilities for this purpose, but it seems the most flexible.)
 
As you want to make SHAKE the trigger for both, have a flag in tasker (or more correctly a variable) and it keeps track of what is going on.
When it is SHAKEN, the variable is incremented and then XOR with 2.  (That way it is only 0 or 1.)
If it is zero, do ......
If it is one, do .....

OK, more for me to figure out. (Haven't tackled variables yet. :-) ).

Thanks!

Leo 

Cat

unread,
Jan 24, 2017, 8:43:59 PM1/24/17
to tas...@googlegroups.com

I shall see if I can find time to send you an example.

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/bRtoy-tJB_8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

shykitten55

unread,
Jan 24, 2017, 9:22:20 PM1/24/17
to Tasker
Ok,

Here goes my try.


I am not able to find "shake" so I shall have to leave that to you.

PROFILE - name Shaken
Do task Start


TASK - name Start
Variable Set / %SHAKEN (maths equals) %SHAKEN + 1
IF %SHAKEN (maths equals) 2 %SHAKEN = 0

IF %SHAKEN (maths equals) 1
Do task Record
IF %SHAKEN (maths equals) 0
Do task StopRecording



TASK - name Record
Play sound (what ever)
Tell recorder program to start recording


TASK - name StopRecording
Play sound (another sound)
Tell recorder to stop recording.




Thats about as easy as I can explain it.
I hope it is understandable to you.

Cat

unread,
Jan 24, 2017, 9:29:07 PM1/24/17
to tas...@googlegroups.com

Oh,

Syntax problem.

The parts where I have an "if" directly under another line, that IF is put in the "if" part of the line above.

Look how when you enter things, there are options at the botton to have an IF , and other stuff.

Sorry.

Cat

unread,
Jan 24, 2017, 10:15:15 PM1/24/17
to tas...@googlegroups.com
Ok, I really screwed that up.

From the start:

Each line is a line in Tasker.
If there is a BOLD line after it, it is included as part of the line before.

PROFILE - name (ShakerStart)
(what ever it is you do to detect the shake)
Do Task Shaker



TASK - name Shaker
Set Var %SHAKER (match equals) %SHAKER + 1
%SHAKER (match equals) 0
  (IF %SHAKER (maths equals) 2)
Do Task RecordStart
  (IF %SHAKER (maths equals 0))
Do Task RecordStop
  (IF %SHAKER (maths equals 1))




TASK - name RecordStart
Play sound (sound 1)
Load recording program
Start recording



TASK - name RecordStop
Play sound (sound 2)
Tell recording program to stop recording




For now Let's work on that.

There are "better" ways of doing it.

As you are a noob - as am I - Let's take it one step at a time.





Cat

unread,
Jan 24, 2017, 11:10:30 PM1/24/17
to tas...@googlegroups.com

For even better clarity this is a screen grab showing how the IF line is done.

Hope it helps.
Screenshot_2017-01-25-14-53-06.png

Leo Notenboom

unread,
Jan 27, 2017, 12:12:46 PM1/27/17
to Tasker
Thank you very much for the assist. :-)

What I've discovered is that my basic app model is flawed. I have it set to just come to forground and play a sound when shaken, and I have two choices with the various sensitivity settings:

- too sensitive, it comes up randomly
- not sensitive enough, I have to shake it like a madman

The first is the only viable approach for me, which means I still have to manually kick off the recording. At least Easy Voice Record Pro's interface is large enough that I can make it out without my glasses. :-)

So, thanks again for the assist.

Take care,

Leo
Reply all
Reply to author
Forward
0 new messages