Repository navigation
Macro duration modifiers
Most macro conditions can optionally be expanded upon with a duration modifier.
To add a duration modifier to an existing condition click the small clock icon next to the condition type.
There are four types of duration modifiers:
-
"For at least X amount of time" will result in the condition to only return true if it was true for at least X amount of time. For example, assuming you just switched to scene "A", the following condition will return false for the first three seconds. Three seconds after the scene switch and as long as the current scene is "A" the condition will return true.
-
"For exactly X amount of time" will result in the condition to only return true at the moment the underlying condition - ignoring the time constraint - was true for the specified amount of time. For example, assuming you just switched to scene "A", the following condition will return false for the first three seconds. Three seconds after switching to scene "A" the condition will return true. Afterwards it will once again return false.
-
"For at most X amount of time" will result in the condition to only return true for at most X amount of time, after which it will return false. If the underlying condition - ignoring the duration modifier - will return false the duration modifier will be reset. For example, assuming you just switched to scene "A", the following condition will return true for the first three seconds the scene is active. After three seconds have passed and the scene is still active the condition will then return false. If you should switch to a different scene and switch back to "A" the condition will once again return true for the first three seconds of "A" being the active scene.
-
"Within the last X amount of time" will result in the condition to return true for X amount of time, even after the underlying condition is false. For example, assuming you just switched to scene "A", the following condition will return true when scene "A" is active, but also return true if you just switched away from scene "A" within the last X seconds.
Macro conditions are only evaluated once per evaluation interval, not continuously. Whether a duration modifier "notices" something that happened briefly between two evaluation ticks depends on how the underlying condition tracks its internal state - this differs between condition types.
For example, with an evaluation interval of one second, consider the "Hotkey" condition combined with a "for at least 1 second" duration modifier: if the hotkey is pressed, then released and pressed again before the next evaluation, and this repeats without a gap longer than the evaluation interval, the condition will still report the key as having been continuously pressed. This happens because the Hotkey condition currently only tracks whether the key is pressed at the moment of evaluation, so a brief release in between two evaluations goes unnoticed.
Other condition types may track state differently and could behave differently in similar situations. If precise sub-interval timing matters for your use case, consider lowering the evaluation interval to reduce the size of this blind spot.
- Installation
- Show webcam only when speaking
- Twitch Category Changer
- Hotkeys to control counter in text source (e.g. death or win counter)
- Show text source with latest Twitch follower
- Detect elements on screen and hide them automatically
- Motion detection
- Start other programs when starting OBS
- Crossfading audio during scene changes
- Looping a set of media sources
- Switch scenes randomly
- Re-shuffle VLC source
- Automatically switch scene if a game capture's target window no longer exists
- Audio based scene switching in podcast setting
- Switching scenes based on portrait or landscape mode resolution of a window capture source
- Set up a hotkey to start and stop recording with a fade from and to black
- Automatically cycle through a list of scenes
- Toggle visibility of scene items on a timer
- Advance through a list of scenes by hotkey
- Performing actions only when transitioning from A to B
- Media playlist with commercial interruptions
- Split recording of stream into chunks
- Switching scenes for Aitum Vertical plugin
- Using MIDI devices
- Controlling audio source volume using MIDI devices
- Change capture window of Window Capture source
- Show URLs in clipboard in browser source
- Use hotkey to refresh browser source
- League of Legends process based scene swtich
- Push-to-show source
- General tab overview
- Starting and stopping the plugin
- Macros explained
- Macro tab overview
- Creating a macro
- Pausing macros
- Macro duration modifiers
- Macro docks
- Exporting and importing individual macros
- Audio condition
- Cursor condition
- Date condition
- Hotkey condition
- Media condition
- Process condition
- Scene item transform condition
- Slide Show condition
- Video condition
- Audio action
- Http action
- Hotkey action
- Random action
- Scene item visibility
- Sequence action
- Action Queue example
- Variables
- Macro properties
- Websockets
- Scripting
- Troubleshooting
- Saving and loading settings