SYNTHINGS is a digital synthesizer development platform that I've been building.
jason | 13 January, 2011 23:33
I actually managed to sort out the scrolling later that evening - it didn't take that long to realise what I'd done wrong. Yesterday I had a break - my new micro milling machine had arrived, and I wanted to have a play. This will be used to cut out the panels when I've got the hang of it.
So tonight I wanted to add in a zoom capability, so you could zoom in and out. With the current zoom, you couldn't see a 64-pattern section on the screen in one go.
This actually ended up being quite complicated getting the scrolling to work at all the zooms. For simplicity, I've got 3 zooms, and they're 1x (where 1 pattern line is 1 pixel wide), 2x (2 pixels wide), and 4x (yes, 4 pixels wide). The zoom last night was 4x.
This is at 4x (default), showing the start (line 17) and end (line 81):
And at 2x and 1x respectively:
I don't have a concept of "tune length" yet, so you can keep on scrolling right...
...until you wrap around the integer value for the bar:
The patterns will be displayed in their respective colours, but also will have the name of the pattern for ease of visibility. Here is the pattern name at the three zoom factors:
A final effect I wanted to add was a different background indicator for each bar. Since bars can be an arbitrary length, the user will be able to select the different shades to be every n lines. This is at every 32 lines:
It scrolls...
...and zooms:
The only problem is that it isn't very clear in these screenshots. The display has a different colour display range to my monitor (and probably your monitor), and it's actually quite clear. This is what it roughly looks like when I tweak the levels for the screenshot:
I decided to lighten up the background anyway - and also give it a different colour. The same went for the grid lines and also the background to the line position.
I removed some debugging code, and the new linker output is:
Program Memory [Origin = 0x200, Length = 0x2aa00] section address length (PC units) length (bytes) (dec) ------- ------- ----------------- -------------------- .text 0x200 0x136e 0x1d25 (7461) .const 0x156e 0x26f6 0x3a71 (14961) .text 0x3c64 0xc450 0x12678 (75384) .dinit 0x100b4 0x24a 0x36f (879) .text 0x102fe 0xdd8 0x14c4 (5316) .isr 0x110d6 0x2 0x3 (3) Total program memory used (bytes): 0x19644 (104004) 39% Data Memory [Origin = 0x800, Length = 0x7800] section address alignment gaps total length (dec) ------- ------- -------------- ------------------- .nbss 0x800 0 0x9ea (2538) .ndata 0x11ea 0 0x2 (2) _03774ee04d2cd01c 0x11ec 0 0x200 (512) _037770704d2cd01c 0x13ec 0 0x200 (512) .nbss 0x15ec 0 0x314 (788) .ndata 0x1900 0 0x86 (134) .nbss 0x1986 0 0x9e (158) .ndata 0x1a24 0 0x1e (30) .nbss 0x1a42 0 0x18 (24) .ndata 0x1a5a 0 0x22 (34) .nbss 0x1a7c 0 0x1c (28) .ndata 0x1a98 0 0x8 (8) .nbss 0x1aa0 0 0x1e (30) .ndata 0x1abe 0 0x2 (2) .nbss 0x1ac0 0 0x4 (4) .ndata 0x1ac4 0 0x4 (4) .nbss 0x1ac8 0 0x2 (2) .ndata 0x1aca 0 0x2 (2) .data 0x1acc 0 0x106 (262) .dconst 0x1bd2 0 0x8 (8) .data 0x1bda 0 0xa (10) .bss 0x1be4 0 0x4 (4) .data 0x1be8 0 0x2 (2) .heap 0x1bea 0 0x2000 (8192) Total data memory used (bytes): 0x33ea (13290) 43% Dynamic Memory Usage region address maximum length (dec) ------ ------- --------------------- heap 0x1bea 0x2000 (8192) stack 0x3bea 0x4416 (17430) Maximum dynamic memory (bytes): 0x6416 (25622)
Tomorrow, I'll start using real patterns.
« | April 2018 | » | ||||
---|---|---|---|---|---|---|
Su | Mo | Tu | We | Th | Fr | Sa |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |