Page 1 of 3

Macros can't go on some keys?

Posted: Sun Jun 11, 2006 2:37 pm
by scubasteve
Hey all, I used to be pretty familiar with jp1 about a year ago, but haven't really messed with it in awhile, so I have a noob question.

I seem to recall that you can't put Macros on some keys...is this correct?

I'm looking to get a jp1 remote and setup a macros on the volume keys for my grandfather. He just bought a TV that doesn't have the option of making the audio out variable. And since he likes to use the TV speakers AND the surround sound (don't ask me why...he's an old guy set in his ways, so doing this will be easier than trying to convince him to change), I want to setup a remote so that when he hits volume up/down it runs a macros that outputs the correlating command for both the TV and the receiver.

Just wanted to make sure you could put macros on the volume keys. Thanks

Posted: Sun Jun 11, 2006 2:49 pm
by floyd1977
Yes, with JP1, that's definitely possible.

Keep in mind that if you define macros that way, you will only be able to turn up the volume on both TV and receiver one step at a time. Holding down Vol+ or Vol- will also not have the desired effect since only the last key in the macro will be repeated.

As you've acknowledged, using TV speakers and external speakers at the same time is a bad idea in general, unless maybe your TV provides the ability to act as a center channel speaker and you don't have a real center channel.

Posted: Sun Jun 11, 2006 5:35 pm
by The Robman
Just out of curiosity, what are the two devices that need to be controlled simultaneously, and what codes/upgrades are you using to control them?

Posted: Sun Jun 11, 2006 9:30 pm
by scubasteve
the devices are a panasonic LCD TV and a (I don't know) receiver.

"Currently" not using anything really; he's having to use 2 remotes. He just got this new TV. His old TV had variable on the audio out, so he just changed the volume on the TV and it would therefore effectively adjust the volume on the receiver too. New TV doesn't have that option.

I haven't actually bought a jp1 remote for him yet...I wanted to check that macros could be put on the volume buttons.

However I just remembered a problem: He has his receiver inside a cabinet...it has a glass front, but none-the-less he has to open the door in order for the receiver to pickup a signal. Maybe (hopefully) the old remote was just really weak?

If not I might have to look into one of the RF remotes...

Posted: Mon Jun 12, 2006 3:36 am
by Capn Trips
The glass door is a minor problem. If the IR cannot sufficiently penetrate the door, then you can get a JP1 remote with and IR/RF extender, like the 9910, or 9962.

Your bigger problem will be building a macro that will work in what I would consider a "reasonable" way for TWO separate volume signals.

Normally, you want to be able to adjust volume on a continuous basis by holding down the Vol+/- button. That behaviour (for BOTH Vol signals) cannot be achieved with a macro. Only for one of them - the LAST one in the sequence.

The macro for Vol+ would necessarily have to be: [TV/Vol+, RCVR/Vol+] (or the reverse), which would result in a SINGLE burst of Vol+ sent to your TV and as many iterations of Vol+ being sent to the receiver as long as you hold the button down (a macro will repeat the last stpe when the button is held). Holding the button down will only repeat the LAST STEP of the macro, but not the previous step(s).

Now you CAN sdet up the macro so that even the LAST signal only gets sent once (add a dummy command at the end), but then for each press of Vol+ (or -), both the TV and RCVR volume will increment exactly ONE STEP, and the Vol+ (or -) will have to pressed REPEATEDLY (vice continuously) to get a larger change in overall volume setting.

Is your grandfather happy to do that?

I just don't see how you can make this work effectively with a single button press.

Posted: Mon Jun 12, 2006 6:21 am
by johnsfine
floyd1977 wrote: only the last key in the macro will be repeated.
Where in this thread does it say he would be using the software "extender" (not to be confused with the IR/RF extender)?

Normally NO key in a macro is repeated. The duration of the physical button press affects nothing. The "extender" changes many aspects of macro execution, including repeating the last key if the button is still pressed.

I've never used an LKP, but I think using both the extender and a nested LKP with a very short timeout, you could repeat (alternate) two vol signals as long as the button is pressed:

1) Vol is a macro
2) That macro sends both VOL signals, then does an LKP.
3) The LKP is configured to be as fast as possible, so that if the key is already released by the time you reach the LKP, it does nothing, but if the key is still pressed it waits as little as possible then nests back into the same macro as step 1.

Posted: Mon Jun 12, 2006 6:59 am
by floyd1977
Where in this thread does it say he would be using the software "extender" (not to be confused with the IR/RF extender)?
It doesn't. I didn't explicity mention the use of an extender, but the original poster was just asking what was possible with JP1. I assumed (as did Capn) he might want to implement something that would mimic the behavior of a normal volume control.
1) Vol is a macro
2) That macro sends both VOL signals, then does an LKP.
3) The LKP is configured to be as fast as possible, so that if the key is already released by the time you reach the LKP, it does nothing, but if the key is still pressed it waits as little as possible then nests back into the same macro as step 1.
Although that would still be quite slow, it's probably the best solution.

Posted: Mon Jun 12, 2006 7:29 am
by Capn Trips
johnsfine wrote:I've never used an LKP, but I think using both the extender and a nested LKP with a very short timeout, you could repeat (alternate) two vol signals as long as the button is pressed:

1) Vol is a macro
2) That macro sends both VOL signals, then does an LKP.
3) The LKP is configured to be as fast as possible, so that if the key is already released by the time you reach the LKP, it does nothing, but if the key is still pressed it waits as little as possible then nests back into the same macro as step 1.
Interesting concept.

I guess it depends on whether the LKP timer, once "set", remains in that "set" state for the duration of its execution, or if it "resets" every time the loop calls that LKP again. (Can an LKP designer step in here? I'm just a user.)

If the former, once you've invoked the "Long" leg of the LKP, it will descend into an infinite loop of Vol+/- (which could be darned annoying :eek: ).

If the latter, then I suppose after you release the button, in the next iteration, it'll default to the "Short" leg, as john suggests.

My sixth sense seems to think this won't work as desired, but it can do no harm to try.

I might do so myself just as an experiment (I have no need to use my TV's volume control, but for scientific research, it's worth a try.)

But john is also correct that all of this discussion is predicated on the presumption that scuba will use the extender. Otherwise, it's one increment per press of the macro Vol+/-.

Posted: Mon Jun 12, 2006 8:17 am
by johnsfine
floyd1977 wrote:Although that would still be quite slow, it's probably the best solution.
How slow do you expect it to be and why?

Alternating two signals may inherently cut the vol ramp speed in half (or it might not). That depends on the devices and signals.

The macro processing overhead in the extender is barely detectable, and a fastest LKP might be fast enough to not be a factor (I don't know). I wouldn't assume it would be slow before trying it.
Capn Trips wrote:I guess it depends on whether the LKP timer, once "set", remains in that "set" state for the duration of its execution,
That behavior would have been hard to accomplish for the author of the LKP protocol. I can't imagine why he would have gone to that extra effort.
Capn Trips wrote:or if it "resets" every time the loop calls that LKP again.
I was assuming it works that way.

Posted: Mon Jun 12, 2006 8:24 am
by The Robman
Depending on what signals the receiver uses, it might also be possible to write a custom protocol that alternates the two signals.

Posted: Mon Jun 12, 2006 8:54 am
by floyd1977
How slow do you expect it to be and why?
In addition to the delay caused by alternating the two signals, there is the delay introduced from the LKP, which I think would be more substantial. At least for the extender I'm using (URC-8910 ext. 1), the shortest value for LKP is .13 seconds.

Something else to consider is that the volume scale on the TV and the receiver may be different enough to cause problems. In other words, 10 key presses of vol+ on the TV may result in a greater volume increase than the same number of key presses for the receiver.

Just another reason to use your TV speakers or your external speakers, but not both :)

Posted: Mon Jun 12, 2006 9:06 am
by The Robman
floyd1977 wrote:Just another reason to use your TV speakers or your external speakers, but not both :)
If you've ever tried convincing older folks to change their ways, especially when it comes to "technology", I think you'd understand why coming up with a JP1 solution will be less time consuming, and ultimately more rewarding, than trying to convince his grandfather to change his mind.

Posted: Mon Jun 12, 2006 9:42 am
by floyd1977
Believe me, I know what you mean. My father-in-law is pretty set in his ways, and I've gone a few rounds with him over 6-channel stereo.

Posted: Mon Jun 12, 2006 1:58 pm
by Capn Trips
floyd1977 wrote: In addition to the delay caused by alternating the two signals, there is the delay introduced from the LKP, which I think would be more substantial. At least for the extender I'm using (URC-8910 ext. 1), the shortest value for LKP is .13 seconds.
quite frankly, since one doesn't usually change volume settings in ENORMOUS increments, I would wager that delay would not be a real nuisance - but perhpas it would be, I'm just speculating.
floyd1977 wrote:Something else to consider is that the volume scale on the TV and the receiver may be different enough to cause problems. In other words, 10 key presses of vol+ on the TV may result in a greater volume increase than the same number of key presses for the receiver.
I suspect that with experimentation (say using a straight macro of 1 instance of TV/Vol+ and RCVR/Vol+) and repeating it multiple times while listening, one could come up withan appropriate ratio, so that you'd set up the macro with, say 2 instances of TV/Vol+ and 1 instance of RCVR/Vol+, or 3:2 ratio, or something. If it's something like 13:12, however, you're probably best off leaving it 1:1, since 13 and 12 will probably be too many signals for a single iteration.

Still, the minimum repetition of one macro sequence should be small enough to provide the granularity the grandparental unit requires.

Trial and error my friend, trial and error.

Posted: Mon Jun 12, 2006 3:07 pm
by floyd1977
I just tried it out, and it is a nuisance to me, but it may not be to someone more patient. Holding down Vol+ resulted in a slightly faster than +1/sec rate (1 Hz, I guess?):

Macro Vol+ = DEV_TV;SHIFT-VOL+;DEV_AUD;SHIFT-VOL+;SHIFT-VOL+
Macro Vol- = DEV_TV;SHIFT-VOL-;DEV_AUD;SHIFT-VOL-;SHIFT-VOL-

RECV Vol+ (LKP) = Short: [Blank], Long: Vol+
RECV Vol- (LKP) = Short: [Blank], Long: Vol-

Changing the macros to increment/decrement volume 2 steps at a time made things more bearable. This goes along with Capn's suggestion of fine tuning to find the right ratio of receiver volume : TV volume.