## Drum roll / escalating anticipation

- Use case: Building suspense before a reveal (prize wheel, match result): ticks accelerate and intensify, then release.
- Feel: Ticks start slow and soft, compress in time and grow in strength, ending in a full-intensity finale hit.
- APIs: CHHapticPattern, generated transient sequence
- Minimum OS: iOS 13+

### Core Haptics

```swift
import CoreHaptics

/// Ticks accelerate over `duration` seconds, then a finale thump.
func playDrumRoll(engine: CHHapticEngine,
                  duration: TimeInterval = 2.0) throws {
    var events: [CHHapticEvent] = []
    var t: TimeInterval = 0
    var gap: TimeInterval = 0.20   // first interval
    let minGap: TimeInterval = 0.035

    while t < duration {
        let progress = Float(t / duration)          // 0 → 1
        events.append(CHHapticEvent(
            eventType: .hapticTransient,
            parameters: [
                CHHapticEventParameter(parameterID: .hapticIntensity,
                                       value: 0.3 + 0.7 * progress),
                CHHapticEventParameter(parameterID: .hapticSharpness,
                                       value: 0.4 + 0.5 * progress),
            ],
            relativeTime: t))
        t += gap
        gap = max(minGap, gap * 0.86)               // accelerate
    }

    // Finale: deep full-strength thump
    events.append(CHHapticEvent(
        eventType: .hapticContinuous,
        parameters: [
            CHHapticEventParameter(parameterID: .hapticIntensity, value: 1.0),
            CHHapticEventParameter(parameterID: .hapticSharpness, value: 0.2),
        ],
        relativeTime: duration + 0.1,
        duration: 0.15))

    let pattern = try CHHapticPattern(events: events, parameters: [])
    let player = try engine.makePlayer(with: pattern)
    try engine.start()
    try player.start(atTime: CHHapticTimeImmediate)
}
```
