#!/usr/bin/perl
#
# Programmer:    Craig Stuart Sapp <craig@ccrma.stanford.edu>
# Creation Date: Tue Mar 28 21:13:55 PST 2006
# Last Modified: Tue Mar 28 21:13:55 PST 2006
# Filename:      makeeventaps
# Syntax:        perl 5
#
# Description:	 Make a list of times for a constant tempo.
#
# Usage: 	./makeeventaps  60 10 1000
#		   Where 60 = 60 beats per minute
#		   Where 10 = 10 taps 
#		   Where 1000 = start with a delay of 1000 milliseconds
#		

use strict;

my $tempo = $ARGV[0];
my $count = $ARGV[1];
my $offset = $ARGV[2];
my $time;

$tempo = 60 if $tempo < 10;
$count = 10 if $count < 1;

my $i;
for ($i=0; $i<$count; $i++) {
   $time = $i * 60.0 / $tempo * 1000.0 + $offset;
   $time = int($time + 0.5);
   print "$time\n";
}


