Schuschein Client
by Matthew Lyon matt@flowerpowered.com
DESCRIPTION:
Schuschein is a protocol for synchronizing events across multiple processes and possibly multiple computers on a very rapid timeline. It is intended to be used in music sequencing.
The name comes from the "Glass Clock of Bad Schuschein" in Terry Pratchett's Thief of Time novel, after a clock that ticks at the speed of the universe, thereby destroying time.
FEATURES
- Stores blocks in a queue to be called at a specified tick time in the future
- Receives Time Packets from Schuschein Server (not yet released), pulls scheduled processes out and calls them.
SYNOPSIS
scheduler = Schuschein.new 5000
process = lambda {|tick, sch| puts "the time is now: #{tick}" }
[480, 960, 1440, 1920].each {|time| scheduler.queue.push time, process}
a.listen
sleep 30
# start the Schuschein server at position 0
# => the time is now: 480
# => the time is now: 960
# => the time is now: 1440
# => the time is now: 1920
REQUIREMENTS