I ran into an interesting dilemma last night. I am trying to create a subwoofer driver that uses IR communications. The sub has three properties similar to volume: level, low pass and phase.
I was able to create a new class and manually level, low pass and phase as percent properties.
The problem is this: it is possible for someone to manually change the level (and etc) at the sub. For example, someone could lower the level manually at the sub and Premise would still think the level is 100%. When this happens, if the level property is already at 100% and you hit the up button in the automation browser, the on property change script does not fire since the property has not changed. I use the level property change script to send an IR continuous command by toggling continuousCommand between the associated command object and Nothing. This works great, but again quits working at 0% and 100% and I want it to keep firing at these values when the automation browser button is pushed. The button triggering the property change script is the ramp method called by the automation browser as I've defined the appropriate selectors and controls. For the composite control, I'm using the Ramp Button type.
What is interesting is if I just inherent the audio class, volume does exactly what I want! It keeps going even when volume is 100% or 0%! This leads me to believe audio.Volume is doing some special event triggering beyond normal on change scripts. I'm seeking for any thoughts on what you think volume might be doing internally to send the IR commands. I know it toggles continuousCommand as you can see this change when you change volume. I know automation browser is only using the ramp method to initiate volume's property change. However, there must be hidden code I'm not seeing that manipulates the ContinuousCommand property for the IR output port and I really would like to know what that would be...
I was able to create a new class and manually level, low pass and phase as percent properties.
The problem is this: it is possible for someone to manually change the level (and etc) at the sub. For example, someone could lower the level manually at the sub and Premise would still think the level is 100%. When this happens, if the level property is already at 100% and you hit the up button in the automation browser, the on property change script does not fire since the property has not changed. I use the level property change script to send an IR continuous command by toggling continuousCommand between the associated command object and Nothing. This works great, but again quits working at 0% and 100% and I want it to keep firing at these values when the automation browser button is pushed. The button triggering the property change script is the ramp method called by the automation browser as I've defined the appropriate selectors and controls. For the composite control, I'm using the Ramp Button type.
What is interesting is if I just inherent the audio class, volume does exactly what I want! It keeps going even when volume is 100% or 0%! This leads me to believe audio.Volume is doing some special event triggering beyond normal on change scripts. I'm seeking for any thoughts on what you think volume might be doing internally to send the IR commands. I know it toggles continuousCommand as you can see this change when you change volume. I know automation browser is only using the ramp method to initiate volume's property change. However, there must be hidden code I'm not seeing that manipulates the ContinuousCommand property for the IR output port and I really would like to know what that would be...