# BOOMBOX-1 prototype 5 (the memory): the 16 patterns, the save, a power-off
wait 700
# first boot: the factory patterns in 1, 2 and 3, not saved yet; the others empty
expect pattern 1
expect unsaved 7
expect events >50
expect swing 54
# SEQ held + white key 4: pattern 4, empty (SEQ released after: no change of mode)
press SEQ
wait 60
shot sim_10_patterns.png
key w3 down
wait 60
key w3 up
wait 60
release SEQ
wait 100
expect pattern 4
expect mode 0
expect events 0
expect bars 1
# a tap of SEQ: STEP mode; kicks on 1, 5, 9, 13 of pattern 4, with a lock on 1
tap SEQ
expect mode 1
key w0 down
wait 40
key w0 up
wait 60
key w4 down
wait 40
key w4 up
wait 60
key w8 down
wait 40
key w8 up
wait 60
key w12 down
wait 40
key w12 up
wait 100
expect steps 4369
key w0 down
wait 40
turn K1 5 30
wait 60
key w0 up
wait 100
expect locks 1
expect unsaved 15
# swing of pattern 4: SHIFT + 3, twice (54 -> 56); pattern 1 keeps its own
press GLO
key w2 down
wait 40
key w2 up
wait 40
key w2 down
wait 40
key w2 up
wait 40
release GLO
wait 60
expect swing 56
# copy pattern 4 to 16 (SEQ held, then SHIFT + white key 16)
press SEQ
wait 40
press GLO
wait 40
key w15 down
wait 60
key w15 up
wait 60
# and to 1: refused, not empty
key w0 down
wait 60
key w0 up
wait 60
release GLO
wait 40
release SEQ
wait 100
expect mode 1
expect unsaved 32783
expect pattern 4
# the save fails (a flash error): nothing is lost, still to be saved
flash_fail 1
tap SAVE
wait 500
expect unsaved 32783
flash_fail 0
# then it works: 5 patterns and the settings
tap SAVE
wait 500
expect unsaved 0
expect dirty 0
expect store_writes 6
# saved again at once: the settings only
tap SAVE
wait 300
expect store_writes 7
# power-off, power-on: pattern 4 is back, with its lock and its swing
power
wait 700
expect pattern 4
expect unsaved 0
expect dirty 0
expect events 4
expect swing 56
expect steps 4369
expect locks 1
# pattern 16 is the copy, pattern 1 the factory beat as it was
press SEQ
wait 40
key w15 down
wait 60
key w15 up
wait 40
key w0 down
wait 60
expect pattern 1
key w0 up
wait 40
release SEQ
wait 60
expect events >50
expect swing 54
# playing: pattern 16 asked for, then it waits for the end of pattern 1 (4 bars of 90 BPM: 10.7 s)
tap PLAY
wait 1000
press SEQ
wait 40
key w15 down
wait 60
key w15 up
wait 60
expect pattern 1
expect next 16
shot sim_11_next.png
release SEQ
wait 8000
expect pattern 1
wait 3000
expect pattern 16
expect next 0
expect events 4
expect swing 56
shot sim_12_switched.png
# save while playing
tap REC
wait 100
key w2 down 90
wait 40
key w2 up
wait 100
tap SAVE
wait 500
expect unsaved 0
expect playing 1
tap PLAY
wait 2500
expect playing 0
# pattern 4 cleared (SHIFT + 15) and saved: still empty after a power-off, the factory beat does not come back over it
press SEQ
wait 40
key w3 down
wait 60
key w3 up
wait 40
release SEQ
wait 60
expect pattern 4
press GLO
wait 40
key w14 down
wait 60
key w14 up
wait 40
release GLO
wait 100
expect events 0
tap SAVE
wait 500
power
wait 700
expect pattern 4
expect events 0
