Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
mozaic_tips_and_tricks [2020/01/12 21:16] – [Store two positive Values into a single Variable] Fixed typo _ki | mozaic_tips_and_tricks [2020/02/04 19:19] – Changed overview links to local links _ki | ||
---|---|---|---|
Line 4: | Line 4: | ||
- | * [[mozaic_tips_and_tricks#Two dimensional Arrays]] | + | * [[#Two dimensional Arrays]] |
- | * [[mozaic_tips_and_tricks#Multi dimensional Arrays]] | + | * [[#Multi dimensional Arrays]] |
- | * [[mozaic_tips_and_tricks#Store two positive Values into a single Variable]] | + | * [[#Store two positive Values into a single Variable]] |
- | * [[mozaic_tips_and_tricks#Store three unsigned Bytes into a single Variable]] | + | * [[#Store three unsigned Bytes into a single Variable]] |
- | * [[mozaic_tips_and_tricks#Some Best Practice Tips]] | + | * [[#Some Best Practice Tips]] |
- | * [[mozaic_tips_and_tricks#Multi-Line Pad Labels]] | + | * [[# |
- | * [[mozaic_tips_and_tricks#Use the SHIFT Button to toggle to HELP View]] | + | * [[#Use the SHIFT Button to toggle to HELP View]] |
- | * [[mozaic_tips_and_tricks#Use a Knob to toggle 16 Pads View to HELP View]] | + | * [[#Use a Knob to toggle 16 Pads View to HELP View]] |
===== Two dimensional Arrays ===== | ===== Two dimensional Arrays ===== | ||
Line 70: | Line 70: | ||
< | < | ||
- | | + | |
- | valA = 723 // allowed range 0 .. ~16000 | + | valA = 723 // allowed range 0 .. 999 |
- | varB = 124 // allowed range 0 .. 999 | + | varB = 124 // allowed range 0 .. ~16000 |
| | ||
- | combinedValue = valA * maxB + valB | + | combinedValue = valA + valB * maxA |
</ | </ | ||
To later extract the values from their packed format use | To later extract the values from their packed format use | ||
< | < | ||
- | valA = RoundDown | + | valA = combinedValue |
- | valB = combinedValue | + | valB = Div combinedValue, maxA |
</ | </ | ||
\\ | \\ |