Numbers and GIMP: online punchcard patterns to electronics 1

My blog is a living document.
At times I return to previously published posts and there have been software updates in the interim, and/or my familiarity with using multiple tools has grown.
I preserve the contents of the original post, they reflect where I began and the evolution of my approach to learning software navigation with specific design goals in mind.
At times some small additions are made to the body of the old post, at others,   dated post scrips point to later, perhaps easier or quicker methods to achieve the same goals.

There is a Russian website with a treasure trove of machine knitting patterns, some for 12 stitch models, and extensive collections for 24 stitch models including for fair isle, lace, and single motifs.
There are pull-down options to show the full repeats charted for Silver Reed (default), Brother, and Toyota brands. The numbering system on the right of the cards will be shifted to the appropriate starting line, but the images themselves do not seem to adjust the placement of the punched holes when that is necessary for correct knitting when switching to other knitting machine brands.
The collections begin with the longest repeats. One such repeat

I had never had an interest in owning DAK, though never say never, I did purchase the program when my knitting software was switched to a Windows PC. From the promotional material and forums, it would appear their Graphics Studio offers an interesting range of design possibilities in converting such files.
My experiences with the program have been chronicled in related posts.
Those of us who are Mac and Gimp users need not be left out, the conversions are achievable with the investment of a bit of time and patience.
The charts as presented often cannot be successfully converted to the indexed mode and scaled in Gimp to produce readable patterns.
One long solution is to combine the use of a spreadsheet table, in my case created in Mac Numbers, with Gimp design options.
Prior knowledge of the basics of both programs is required.
I assume similar steps could be used with Excel.
A follow-up post on this topic:  Numbers and GIMP: online punchcard patterns to electronics 2.
It is easier to test how-tos beginning with a source diagram which has larger, more readable dots representing the punched holes. This was found on Pinterest, dimensions for both stitches and rows are not always provided. The units in many such illustrations are not square, and the goal is to end up with a PNG where each square unit represents one stitch, one row.
The cell size I prefer in Numbers tables has come to be 20X20 pts.
This particular design is 24 stitches wide, and 60 rows high.
To make it workable in that cell size, the repeat is opened in Gimp, cropped to its margins, scaled to 240 X 600 pixels, and the new image is exported.  In Numbers, drag and drop the image onto a new sheet if working on a previously created Numbers document. Click on the image, and then on format/ arrange to resize it to the desired proportions,  A table is then created, 24 cells wide, 60 high, each measuring 20 pt by 20 pt, with total measurements of 480 by 1200 pts.   Resize the image if needed to match the table size, in this case, to 480X1200. The size may be adjusted by using the up and down marks to the right of the size option or typing in desired values in each window followed by the return key, with more accurate control than simply dragging on points at the corners of the imported original. Turning off constrain proportions allows for added tweaking of the size if needed.
On the left is the first table image, including extra rows to check for stitch and row numbering, and to its right, is the resized punchcard pattern.  Select the whole table 24 cells by 60, by clicking on the circular symbol at the upper left, and alter the cell borders to a bright, contrasting color. I chose red, 3-point  thickness.  Move the table over the punchcard image or its mirror if needed.
The arrange option may be used to place either in front or back of the other.  Dragging the table using that circle on the upper left corner will place it directly on top of the design.
Select individual cells or cell groups by using the command key and releasing it periodically, to fill the cells with color.   The repeat in progress Copy and paste the completed table. Make certain there is a different color cell in any white squares at the far corners of the image, in this case, upper right and upper left (yellow), remove cell borders 1. screengrab a larger area than the repeat
2. open the screengrabbed image in Gimp
3. choose Image, Crop to Content, to eliminate any extra surrounding cells
4. fill any contrasting  color, in this case, those yellow cells, with white
5. choose image/mode/convert to indexed B/W colors
6. proceed to scale the image. In some instances, this needs to happen in 2 steps, the first scaling to make certain both values are divisible by 20, and the second to scale to the desired repeat size of 24X60
7. before saving the PNG for download, magnify the file to at least 800X, and with the grid in view, perform the first visual check. Then, using filter-map-tile, repeat the design in height and width multiple times to check its horizontal and vertical alignments and to visualize how it might appear in the intended project. A quicker process using only Gimp version 2.10.34, 2023 One needs to have a basic understanding of punchcard illustration markings, and often the repeat required for the use of the design in electronics may only be a very small portion of the total offered in the publication. The extra rows represent perforations that are not part of the design and may be cropped off in Gimp. The image of the repeat on the left began the FB discussion, while the one to its right illustrates the same after making the marks more visible. Making the marks more visible is possible by changing number values and by moving the slider immediately below the input levels Proceed as for the first image, being mindful of an unnecessary row at the bottom. The saved image can be tweaked in size by turning off Constrain Proportions and adjusting values for width and height for proper placement under the table grid. It soon becomes evident that the card is composed of smaller repeat segments, which can be copied and pasted making for faster filling in the whole punchcard minimum row # requirement. Check the repeat alignment by tiling it. The smallest adjusted electronic repeat, 12X20 pixels.  The far longer repeats might best be managed broken up into sections. An easier, quicker solution is presented in later posts.
This is part of #6717, shown in the process of trimming unwanted info in Gimp and after adjusting color levels to create a sharper image. The converted, partial punchcard repeat 2023: ArahPaint‘s weave from grid tool makes working with the full repeat possible. The final repeat was cropped by 2 rows at the top to 24X206 to avoid a 4-row solid color line produced when the original was tiled vertically.
Returning to the use of Numbers and Gimp: what of the lace punchcard repeats? There seems to be no differentiation between the different types of lace on the Russian website: thread lace, simple lace where stitches are knit and transferred in a single pass (a Silver Reed/Studio special), and lace requiring the use of 2 separate carriages, one to knit, and the other to transfer are all grouped together. In addition, the pull-down menu and changing machine brand selection,

if used, will change the numbering on the side of the card, but not the design content  The conversion process intended for the final use on the Brother machine: the image on the far right shows a review of the proper placement of pairs of empty rows between lace segment sequences, highlighted in grey In the past I have found lace repeats, in particular, to be particularly cranky when scaled down in Gimp due to the paucity of black cells. After the above steps, I decided to try color invert, resize, and color invert again, which in this instance, produced what appears to be an accurate repeat. Of course, the final png is likely to need mirroring for use in some electronic models The process did not work for me in using Gimp alone to edit test repeats from the website directly. The white dots, in that case, disappear with scaling to the desired size.
Using resize X 2 with color invert and back with a Stitchworld #150 pattern image got me closer to an editable lace repeat using Gimp alone, worth considering in the future. 2023: a different approach:
Left: the image from the Stitchworld book measures 26X64 cells
it is slightly tilted, the angle has been rotated for better results, and cropped to the borders of the actual design repeat
Center: the cropped image measures 442X846 pixels, it is scaled with a broken chain link first to a multiple of the original, since the output will be on a square grid, not a rectangular one, in this case, to 260X640.
Use Colors, Threshold, followed by Image, Mode, convert to BW Indexed
Right: Image, scale again with intact chain link to the final 26X64 size, export the PNG   With experience, one learns to trust the process.
A proof of concept for the final PNG matching the original is not in any way necessary but is offered here for this particular file or simply for reference.
Work in RGB mode, select and click on the rectangle tool after any steps to make changes to fix the layers.
Select edit, and undo to revert to any previous step(s).
1. open the initial cropped and rotated image, note the pixel proportions
2. in a new work window, open the final PNG, and scale it to the same pixel dimensions as 1
3. select all black pixels, and bucket fill them with red
4. use layer, transparency, white background to alpha, making it transparent
5. copy 4
6. paste 4 on 1, note that pixel placement for the final repeat matches that for the black squares on the original chart

Lace meets FI on Brother machines

Very little has been written on this topic.
The easiest method to produce the eyelet and fair isle combination is to create ladders in spaces between vertical FI motifs. The end needle selection is canceled. The swatches show the transitions in the development of the final design

Susanna in her Machine Knitter’s Guide offers a version knit in combination with the ribber on page 218, and a small amount of information on single bed versions on pp, 220-221.
Before any DIY, I like to start with a published pattern. Toyota, in this volume,    offers 4 punchcards for use with this technique I chose to work with #170. The lace carriage in the Toyota models operates from the right side rather than the left as in Brother. The direction of the arrows marked on the card actually indicates movements for the carriage operating from that side. That fact is taken into consideration planning a possible Brother punchcard repeat. Lace direction arrows are matched based on the punchcard image being mirrored horizontally. The card in its original version is imaged on the left, mirrored on the far right, the proposed Brother punchcard in the center The proposed Brother punchcard repeat is now expanded for use on the electronic machine, ready for converting to .bmp in Gimp. Numbers in the middle of the chart on the left helped keep track of repeat segments. I also used red dots initially to mark segments as I had completed in the expanded the repeat, then erased them
  The Gimp magnified punchcard repeat  in turn in need of mirroring for the .bmp to be used in the 930the resulting fabric Observations and settings:
The knit carriage is set to FI patterning for the knit rows, the typical floats will be created. Commonly, when floats are wider than 5 pixels, anchoring the longer ones may become a preference or even a necessity. This would add time to an already complex fabric. Each FI design row is repeated twice.
The transfers in this design are made on the yarn in the color in the B feeder. I began my swatch using the light color yarn, failed to switch its position to the B with color 2 for the shape in A, accounting for the dark stripe at the swatch bottom
If KCI is used, end needle selection will be made prior to the lace carriage passes. Those preselected needles will have to be pushed back to B position by hand prior to using the LC or they will transfer on one side and drop on the other.
In this pattern, the LC operates for 8 passes, followed by 2 rows of FI throughout the piece. The first preselection row is made with the KC from the left as it moves toward its home on the right.

What of DIY? From working on the repeats for transfer lace combined with weaving, I understand patterns beginning with transfers to the right rather than the familiar to the left, are shortened considerably and carriage changes may be made as often as every 2 rows, saving many carriage passes. In order to understand the choices that need to be made, I began with a lace transfer pattern, thinking I could add contrasting color shapes in FI. I expected something like this however, the swatch had issues. The eyelets were not occurring in the same spot in both directions, the color transition at the repeat intersections was clumsy Regrouping: the easiest place to insert eyelets is in the dominant, background-color The 930 .pngA quick test: rows with no needle pre-selection will knit in only one color, end needle selection must be canceled before knitting to the other side Can the exchange of the color positions in the yarn feeder create colored shapes with eyelets on the white ground? not only does it not do so in a way I liked, but my machine was having none of it as well  Coming up with a better plan resulted in the following repeat. The transfers are made in the wanted direction on the purl side of the fabric, so their location becomes easy to check and identify during knitting. In this exercise, they will be placed in the center or the previously knit fair isle rows. Magenta cells marking the doubled stitch after transfers to the right, the cyan one the doubled stitch after transfers to the left. The two blank rows at the top of the design will knit in the background only. Building the repeat in Numbers: the eyelets within the shapes in the contrast color need to begin and end with a pair of FI rows. They are placed taking into consideration the black cell blocks immediately below them, not the ones directly above It’s good to start with a small repeat.
A: one may begin with a planned repeat, in this case, 20 rows in height
B: create a table at least twice the planned height or start with a long template that in turn will have half its rows hidden. Holding the command key select every other pair of rows beginning with 2 blank ones at the top of the table, and hide them. The location for the options to hide and unhide rows and columns:  C: Once the rows are hidden, the black cells are filled in
D: the repeat is tiled to check its alignment
E: the hidden rows are unhidden,  I like to add colored cells as shown to ensure proper placement of eyelets
F: place black cells for stitches to be transferred where desired
Previous posts describe the steps to isolate the repeat as a screengrab and importing it into GIMP. The grab is cropped to content, image mode to indexed, scale to the proper size, mirror for use on the electronic if needed, save, and use the final image to download to the knitting machine for testing.
The first pair of rows are knit in FI, so the preselection for design row 1 is from left to right.  The KCI setting will bring end needles out to D prior to lace rows, those needles need to be pushed back to B position prior to moving the LC from left to right. Continue with switching carriages every 2 rows. This repeat is 20 rows high. When knitting the last 2 rows, no needles will have been preselected, except for first and last. Push them back to B for those two rows, so only the color in the A feeder knits, and the preselected needles do not drop off the bed. The second color does not need to be removed from its location, but in executing a wide piece of knitting, the extra yarn pulled down from the tension mast as the knit carriage makes its passes may cause issues. If the yarn is removed and held aside, be sure to place it back after the 2 passes with the ground color so as to avoid forgetting to do so prior to resuming patterning using 2 colors per row. Taking it to continuous shapes and checking them in repeat: red cells represent transfers to the right, cyan ones the transfers to the left. The empty cells adjoining each of both colors represent the location of the doubled-up stitch after the transfer is made I like to check tiling for the repats along the whole process
Though the repeat is 24 stitches wide, it is not suitable for use on the punchcard machines in this format, its tiled test and .pngThe one area where the white got picked up with the contrast is not due to programming, but likely to operator error in “correcting” a dropped stitch Adding another contrast color stitch to shapes will make the number of stitches on either side of the eyelets consistent  Adding lace shapes in the ground can follow the same concept The repeat does was not planned as a continuing pattern, but here it is knit and repeated in height X 2 and with the addition of two blank rows at the top of each segment.
The possibilities are endless, with some patience, they can be manipulated to meet personal preferences and taste.

Lace meets tuck on Brother Machines

Some DIY variations in combining both stitch types:
Combining tuck stitches with lace 2 (automating them) 3/15
Combining tuck stitches with lace 1 3/15
Large diagonal eyelet lace, (a similar card and fabric, not tuck setting) 6/12
Large scale mesh, breaking rules 4/11 explains the use of punch card below
Tuck stitch combination fabrics 5/19
To execute this knit fabric, the lace carriage is set for normal lace, the knit carriage selects a pattern (KCI) and both tuck buttons are depressed. Each carriage works in sequences of 4 passes/rows throughout. The self-drawn card does not include familiar arrows on the left-hand side familiar to users of factory published lace cards Working out an electronic repeat: the punchcard repeat is on the bottom, the expanded electronic one on top, yellow cells highlight rows with tuck stitches In electronic machines, the first preselection row may be done with the knit carriage moving from left to right or the lace carriage moving from right to left, with either carriage moving toward its usual starting position. The knit carriage is set to KCI for end needle selection. Before the LC begins to move from the left the first and last needle will have been preselected, push them back to the B position. Continue to do the same if any end needles are selected just prior to a transfer row as you continue to knit. Each carriage makes 4 passes throughout the piece. The bottom row of eyelets shows the “standard” size eyelets that follow single transfers, illustrating the change in size with this technique.  With the proper tension, transferring is not a problem. I sampled on a random number of stitches. For cleaner edges, a border where no transfers occur for 2-3 stitches can be planned in programming the final piece.
Returning to Volume 4, here is a combination of lace and tuck repeat that appealed to me. I am repeating a process akin to that used in programming the woven lace samples. In this card, lace transfers are first to the left, then to the right, that sequence needs to be preserved. Colored pixels need to be used everywhere a punched hole is represented. The lace portion of the card will not tolerate color reversal. The published full repeat is for a brick configuration, I sampled the top half.  The actions of the 2 carriages on the electronic, the repeat prior to mirroring mirrored for use on the 930  The texture is more apparent on the purl side, the top and bottom edges could be coaxed into a wavy shape due to the gathering up of the knit by the tuck diamond shapes The chart for the brick configuration: An advanced technique fabric, combining lace, transfer lace, and tuck patterning

Lace meets weaving on Brother Machines 2

Early Brother punchcard volumes showed symbol charts alongside punchcard repeats. The translations at times were not the best. Here is some of the advice offered for woven lace patterns:  

This was one of the first such punchcard volumes published by Brother after the pushbutton earlier models were replaced by ones with card readers It has the added data on how each of the fabrics might look visualized in a chart prior to its expansion as a card in full repeat. This is the top half repeat of a card for pull up weaving combined with lace along with the directions for execiting the knit My experience with trying to knit CARD # 589, led me to notice immediately that all carriage passes, if the arrows are followed, are made from the same side. That avoids the repeated selections when carriages first start operating from the opposite sides. My interpretation of what the card is achieving: Taking carriages on and off the same side of the machine is nothing I would be inclined to do for any length on any machine. In theory, the identical repeat above could be used on an electronic KM in that way, but I did not get very far with that method before giving up.
The expanded the repeat for use on my 930, with programmed all-black pixel rows for any pairs of all knit rows, made for smooth, easy knitting The weaving yarn used in patterns such as these will be held in the hooks of the needles, combined with the knit stitch already there. In this instance that adds up to 5 loops that need to knit off smoothly on the next knit row, so yarn thickness choice meets with limitations.
The first preselection row is made from left to right with the knit carriage, it resumes patterning on the right, beginning the weaving pattern. End needle selection is on, KC I.
When the knit carriage is on the right and all but those single needles are selected on design rows 5 and 23, pick up the floats from the weaving yarn with a single eye tool and lift them onto the non selected needles, then bring the same needle out to E position before moving the carriage to the left to create the first all knit row.
Before transfer rows using the lace carriage, if any end needles have been selected in pattern push them back to B before traveling with it to the opposite side. The electronic repeat, followed by its .png

Later punchcard volumes ie 4 and 5 took into account the repetition issues when carriages select needles for patterns from opposite sides, and that may be the best place for card designs that may be knit following arrows as shown, in the traditional manner. This design has fewer woven rows, a larger lace motif Volume 4 offers only this advice: “the empty needles are selected at the second lace pattern, but this is not a trouble, and you may pass the L carriage to the side which is indicated on the punchcard”. I take that to mean that after a transfer if the same needle is selected again, don’t be concerned, keep moving the carriage in the direction of the arrows. Because the weaving is for only 2 rows, the use of laid in, thicker yarn is well tolerated. The punchcard repeat amended for use on electronic, shown prior to mirroring its .pngA resource offering many more design patterns:  for swatches in color see pattern # 321-360.
There is often a discrepancy in previewing contents of downloads between thumbnail page markings and those on the document scan. In this case,  diagrams begin on manual page 278-284, thumbnail # 284 – 290.
E-wrapping or other weaving techniques may be used on “weaving” row preselected needles, needles can also be hand-selected in knit areas in any other programmed lace repeat to add details on the chosen row(s) without engaging the card reader. Knit 2 plain rows, select weaving needles, wrap the yarn over or around them in the desired configuration, knit 2 plain rows again, and resume lace patterning. Varieties of wraps for use on every needle with yarn similar in weight to the ground, or every other needle with thicker yarn. Once the desired effect is achieved, a repeat could in turn be configured and punched or programmed to make the process easier to track.

Pile_carpet stitch knitting on Passap and Brother KMs 3

Studio and Toyota machines could produce this type of stitch easily. Many efforts have been made over the years to produce the same fabric on Passap and Brother.

I was asked via a blog comment in my previous post #1 on this topic about creating a single color all-over pile on the Passap machine and have added these instructions
Executed with the lights off:
Cast on and begin with all stitches transferred to the back bed.
The back lock is set to EX, the front to CX, pushers are not needed
Knit two rows using those settings, and use a stitch ditcher to drop loops formed on the front bed.
One color carpet stitch, if programming technique #256, ignore console instructions
1. cast on so that all stitches are on the back bed
2. knit a few rows in stocking stitch testing for the tightest tension at which your yarn will knit, and experiment with the front lock tension to produce as large a loop as possible that will also drop off properly.  Begin knitting your test with locks on the right side: 
3. bring the back bed pushers to the in 1X1 arrangement, and set the back lock to FX with the left arrow key, not BX. Do not use the AX setting, it will tuck in both directions. All needles will tuck moving from right to left, and knit on their return to the right
3. with the front lock set to LX, it will knit on all needles when moving to the left creating loops on the front bed, while the back lock does the same, slips all needles moving on the front bed when moving back to the right.
When the locks reach the left side there will be loops on every needle on both beds. As they move from left to right, the needles on the back bed will knit, securing the loops there and anchoring the ones on the front bed while the front bed is slipped
4. with locks again on the right side, use stitch ditcher or another tool to drop off loops on the front bed, returning needles to proper work position, follow with a pass using a single eye tool to push loops between the beds, checking that none are left in the needle hooks
*make 2 more passes with locks from and returning to the right, drop off loops**, and continue from * to **
The difference in the size of the long stitches between loop rows in the photo was eliminated by tightening the tension on the back lock,  it is evident that they are anchored more evenly in those segments as well. As with any fabric, the larger the intended piece, the more likely some further adjustments may have to be made. Alternative settings for one color pile: Tech 256, back lock FX and both arrow keys, pushers one up, one down, front bed to LX, drop stitches every 2 rows.
For 2 color work, Tech 184, same settings.
For a similar effect on Brother machines, begin with all stitches in work on the ribber, with the settings: opposite tuck buttons, the main bed knits to left, ribber knits to right anchoring loops formed on the previous row the loops, formed on every needle on both beds with the move to the left anchored in place on the ribber needles as the only the ribber knits as it returns to the right while the carriage is on the right, drop all stitches on the main bed,   making certain no loops are stuck on gate pegs on the main bed, repeat the process throughout the piece. Occasionally skipped needles and their missing loops may not be noticeable, any loops hung up on gate pegs will be visibly longer. Tension needs to be “just right”. My first efforts, shown sideways Knitting was smoother with a change in yarn. An extra needle on each side of the knit on the ribber is brought out to hold manually to ensure their stitches knit with every pass of the ribber carriage. I prefer the all-over pile with its loops formed on the top bed. There were nearly no incidences of loops catching on gate pegs on the main bed. One of the drawbacks is that the main bed needles need to be dropped and brought back to the B position manually, bald spots will result where any needles are not returned to the proper work position, so they will not pick up loops.

The traditional hack for other than Studio or Toyota kms involved this process:
to knit, bring up the first and last needle to the hold position on the ribber to ensure they knit when both carriages are on the right and the ribber will tuck on every needle as the carriages move to the left. The carriage settings: Loops are formed on the main bed as it knits from the right to the left, and slips on its return to the right. The ribber tucks on every needle moving to the left and knits on every needle returning to the right, anchoring the main bed loops. After the carriages reach the right side, loops on the main bed are dropped, and the process is repeated.
The results are dramatically different. If considering patterning on the main bed with the addition of a second color or creating isolated motifs whether on a single color or striped background, anchoring loops by tucking on every needle is no longer possible, making reverting to EON needle selection on ribber a necessity. Loops formed where no stitches are knit on the main bed would only sit in the hooks on the ribber and create a mess. Hence the “hack” where lili buttons and tuck stitch in both directions so that loops are knit off on the next pass, and with 4 rows knit before dropping stitches so that the maximum pressure is put on those loops to hold them in place. This requires the tightest possible tension on the ribber, and by default, the EON tuck will want to spread the fabric further apart. I have found this version a failure in producing a stable fabric with a satisfying pile formation. Returning to the pursuit of pile loops in pattern on Brother: my first effort with a simple, linear shape produced separation aside the loops akin to that seen in isolated FI motifs, both when using the ribber or the main bed to create the loops. Here a simple checkerboard was hand-selected, there was separation along the vertical edge like that seen in isolation motifs and this is likely my last try at the single pile in a pattern using every other needle tuck on the ribber with the release of stitches every 4 rows. I actually like the elongated stitches in the ground but found the stitches planned for loops simply did not release easily or at all,  using thinner, smooth yarn resulted in breakage, while adding elastic obliterated loops, and wooly nylon simply broke regularly. It would appear if pile knitting on Japanese machines is the goal, by all means, add a studio KM to your stash ;-).