Created
December 28, 2019 12:24
-
-
Save npisanti/aa93cb30704c9d295def7a7256a8f640 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN_OPERATOR(delay) | |
LOWERCASE_REQUIRES_BANG; | |
PORT(0, -1, IN | PARAM); | |
PORT(0, 1, IN); | |
Usz rate = index_of(PEEK(0, -1)); | |
Usz mod_num = index_of(PEEK(0, 1)); | |
if (rate == 0) | |
rate = 1; | |
if (mod_num == 0) | |
mod_num = 8; | |
if( Tick_number % (rate * mod_num) == 0 ){ | |
PORT(1, 0, OUT); | |
POKE(1, 0, '*'); | |
} | |
END_OPERATOR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment