Reply To: Lua – Counter and Clock input ?

Home Forums General Programming Lua – Counter and Clock input ? Reply To: Lua – Counter and Clock input ?

#72147
human fly
Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    ok: i found this in the github pages:

    class CtrlrMasterClock : public Thread
    {
    	public:
    		CtrlrMasterClock();
    		void run();
    		int getElapsedMilliseconds (const int64 ticksStart, const int64 ticksEnd = 0);
            void adjustDrift();
    		bool isRunning();
    		void start();
    		void stop();
    		void pause();
    		void reset();
    
    	private:
    		bool running;
    		int64 ticksCurrent;
    		int64 ticksPerSecond;
    		int64 ticksNextClock;
    		int64 ticksStart;
    		int64 ticksElapsed;
    		int64 ticksLast;
    };
    
    #endif

    so there’s a class called MasterClock, a class called Run,
    and Start,Stop,Pause,Reset, isRunning(true/false), and it’s in
    milliseconds elapsed. not sure what int64start/end are.

    somehow i need to call masterclock, call run+start/stop/pause,
    and set a bpm … – looks like all the bits’n’pieces are there.

    Ctrlr