# Gauntlet time/activity management

Matlab @ 31 December 2010

So I got a bit tired of the permudoro time/activity management system and I decided to create another system which I call the gauntlet time/activity management system. The inputs to this system are: some text array of the names of activities, some number of desired activity instructions, and a minimum and maximum interval between instructions; and the outputs are a number of timer objects which activate at initialization and correspond to display of the instruction.

The primary benefit of this time/activity management system is that, with a low enough minimum, this system always keeps you on your feet – possibly switching rapidly from one instruction to another. At the moment of this posting it really is quite an enjoyable (and cognitively demanding!) way of practicing multiple related skills/subjects.

One very helpful feature that I’ve recently added is text-to-speech functionality for instruction display. To enable this, you will have to download (to some folder on your path) Siyi Deng’s text to speech function and Microsoft Speech SDK 5.1

*For some reason which I haven’t figured out yet, I’m not able to encapsulate this as one simple function so it requires two command line input statements.

function p=gauntseq(number,listp)
%number=number of instructions
%listp=text array list
i=size(listp);
for j=1:number
    p.sequence(j,:)=listp(randi(i(1)),:);
end
%generates a random order of activities based on the text array list
function [p]=gauntlet(p,minimum,maximum)
 
%minimum=minimum time in minutes between switch
%maximum=maximum time in minutes between switch
 
number=size(p.sequence);
number=number(1);
time=ceil((minimum*60)+((maximum*60)-(minimum*60)).*rand(number,1));    
p.time=ceil(cumsum(time));
for j=1:number
    if j==1
        p.timer(j)=timer('TimerFcn',['tts(repmat([''Start '' p.sequence(' num2str(j+1) ',:) ' '],[1 3]))'],'StartFcn',['disp(p.sequence(' num2str(j) ',:))'],'StopFcn',['disp(p.sequence(' num2str(j+1) ',:))'],'StartDelay',p.time(j));
    elseif j==number
        p.timer(j)=timer('TimerFcn','tts(''Gauntlet Over!'')','StopFcn','disp(''Gauntlet Over!'')','StartDelay',p.time(j));
    else
        p.timer(j)=timer('TimerFcn',['tts(repmat([''Start '' p.sequence(' num2str(j+1) ',:) ' '],[1 3]))'],'StopFcn',['disp(p.sequence(' num2str(j+1) ',:))'],'StartDelay',p.time(j));
    end
start(p.timer(j))    
end
%creates and starts timers