Pattern Counter


A stitch counting/pattern tracking app.

My favorite thing about knitting and crochet is that they are some of the most simple, relaxing, and meditative hobbies—so much so that the biggest challenge is simply counting stitches and keeping track of your pattern! And while complaining about counting may seem silly, I think most stitchers would agree that having to keep track of stitches (and loosing count of them) can quickly become an incredibly frustrating part of an otherwise idyllic experience. Pattern Counter is a tool I made to help alleviate this problem.

Pattern Counter as a reference is a flexible and interactive web application that can interpret your patterns, so that it can hold your place and keep track of stitch/repeat counts as you use it. It’s great for those (like me) who like to stitch in short bursts who lose their in between sessions. It is ideal for managing complex patterns, but I find its also nice to use for simple patterns to mark which row/direction I am on.

Using the Pattern Counter

When you first open the page (assuming its the first time opening the app on your computer), the pattern form should by default filled with the following pattern:

Press the 'Next' button or spacebar to advance!

4. sc 3, hdc, dc 3, hdc, sc 3
5. (sc 3, dc 5) * 3 (24 sts) (parenthesis without commas or periods are ignored)

On the next instruction try using the 'Complete Repeat' button! 

6. ((sc 2, dec, sc 2, dec) * 5, sc) * 3

You can also type into the counter display to edit counts directly!

7. ((sc, dc, sc) * 594, sc 3, dc 2) * 2 (Click on the orange counter number and type in something else)

Switch to a G hook (Instructions don't have to start with a number)

You will need to use the 'Exit repeat' button in the next instruction

8. (sc 3, picot) until end of row, sc, hdc, dc

Cut and weave in ends (Now try your own pattern!)

Stepping through this example should give you enough intuition about the tool to start using other patterns. When using the different buttons, keep note of how they change the different repeat counts, and how it changes your position relative to where you currently are. Also, see how the tool acts as expected when you type in different numbers into the counters. Also note the format of the input pattern itself, such as how instruction numbers are written, how comments are written (without separators!), and how newline characters are significant.

For more specific details, see the following section.

Pattern Counter Details

Symbols

Symbol Usage

The pattern input by the user should be a sequence of instructions separated by one or more line breaks. Instructions are displayed one at a time, and are composed of the instruction number, comments, sequences of strings, and parenthesis/numbers/multipliers used to denote repeats.

For example:

26. CTC, INC 10, CTB, INC * 20 (60)↵    
27. CTC, (SC 9, INC) * 2, CTB, (SC 9, INC) * 4  (66)↵    

28. (CTC, SC 23, CTB, SC 43) * 2 (66)↵    
39. (CTC, SC 24, CTB, SC 42) * 2 (66)    

Instruction Numbers and Information/Comments are ignored by the application, but are kept in to be displayed as useful information for the user.
Instruction numbers are optional, and may appear only at the beginning of an instruction if used.

Strings (which act as a single step when working in a pattern are separated by separators, typically commas, or other symbols. They may consist of numbers but they cannot be only a number.

Functions

A few different buttons to traverse the pattern are available, since often we do not need to look at the pattern constantly in order to follow it (having to press the ‘next’ button after every single step would be tedious). The following buttons are available to step through the pattern in a flexible way: