SYNTHINGS is a digital synthesizer development platform that I've been building.

Pattern editor (part 5)

jason | 10 January, 2011 22:32

Today was the final day of main work on the pattern editor - tidying up bits and pieces, starting with the updating of the pattern when you change the number of lines.

This took about 3 minutes to do.

Pattern editor 5

Next, I wanted a colour editor for the pattern, so you can quickly get a gauge for the pattern on the tune editing screen. For simplicity, I displayed all the colours, and you can use the rotary encoder to move between the colours. It takes a few turns to get to the other side, but it's functional.

So, here is the colour editor when you first open it (it's the first time I've got all 256 colours on the screen at once - in a meaningful way [i.e. not random data]):

Pattern editor 5

And then selecting the red colour:

Pattern editor 5

And finally submitting the colour:

Pattern editor 5

The final thing I wanted to achieve was the scroll bar. It's also a fairly simplistic approach - the height of the scroll bar does not change; instead it shows you the rough position of where you are:

Pattern editor 5Pattern editor 5

If there's only one row, then it's in the middle:

Pattern editor 5

And it also works if you've got 256 rows (after a quick recompile to use longs instead of ints):

Pattern editor 5

There was one other thing I wanted to check - that it can edit multiple patterns, and you can switch between them. It did, and worked fine.

I still haven't reached the 100K code size yet:

Program Memory  [Origin = 0x200, Length = 0x2aa00]

section                    address   length (PC units)   length (bytes) (dec)
-------                    -------   -----------------   --------------------
.text                        0x200              0x136e          0x1d25  (7461)
.const                      0x156e              0x268e          0x39d5  (14805)
.text                       0x3bfc              0xb9a0         0x11670  (71280)
.dinit                      0xf59c               0x232           0x34b  (843)
.text                       0xf7ce               0xda2          0x1473  (5235)
.isr                       0x10570                 0x2             0x3  (3)

                     Total program memory used (bytes):        0x1852b  (99627) 38%

Data Memory  [Origin = 0x800, Length = 0x7800]

section                    address      alignment gaps    total length  (dec)
-------                    -------      --------------    -------------------
.nbss                        0x800                   0           0x9ea  (2538)
.ndata                      0x11ea                   0             0x2  (2)
_035f4ee04d299d91           0x11ec                   0           0x200  (512)
_035f70704d299d91           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            0x12  (18)
.nbss                       0x1a6c                   0            0x1c  (28)
.ndata                      0x1a88                   0             0x8  (8)
.nbss                       0x1a90                   0            0x1a  (26)
.ndata                      0x1aaa                   0             0x2  (2)
.nbss                       0x1aac                   0             0x4  (4)
.ndata                      0x1ab0                   0             0x4  (4)
.nbss                       0x1ab4                   0             0x2  (2)
.ndata                      0x1ab6                   0             0x2  (2)
.data                       0x1ab8                   0           0x106  (262)
.dconst                     0x1bbe                   0             0x8  (8)
.data                       0x1bc6                   0             0xa  (10)
.bss                        0x1bd0                   0             0x4  (4)
.data                       0x1bd4                   0             0x2  (2)
.heap                       0x1bd6                   0          0x2000  (8192)

                        Total data memory used (bytes):         0x33d6  (13270) 43%

Dynamic Memory Usage

region                     address                      maximum length  (dec)
------                     -------                      ---------------------
heap                        0x1bd6                              0x2000  (8192)
stack                       0x3bd6                              0x442a  (17450)

                        Maximum dynamic memory (bytes):         0x642a  (25642)

Tomorrow, I'll start work on the tune editor. That'll take a few days to do...

P.S. I also did a bit of research for SYNTHINGS 2 - mainly the screen. I'd like to have a 480x272 touch screen...

Powered by LifeType - Design by BalearWeb and Jason Tribbeck
Copyright © 2010 | | Jason Tribbeck
All trademarks are the property of their respective owners