synthings

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

Tune editor (part 4)

jason | 17 January, 2011 22:58

Okay, so this wasn't strictly the tune editor - however, it is finishing the work from yesterday making the scrolling selection tools use a common framework.

The file dialog was changed to use it - and I also read in the sample's description while scanning the directory. This does slow it down a bit though.

This is the largest directory - which needs 3 scrolls.

Tune editor part 4Tune editor part 4Tune editor part 4

I then created a generic scrollbar set of functions to show the current position.

This is the sample selection dialog:

Tune editor part 4Tune editor part 4

It works when there's less rows available than on the screen:

Tune editor part 4

And when you need to scroll:

Tune editor part 4

I may use this for the pattern editor, and maybe the tune editor (as a horizontal scroll bar - which the code partially caters for - it's written, but #defined out).

And because the file selection code now uses the common scroll selection, the code ended up smaller (even with the code for the scroll bar).

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

section                    address   length (PC units)   length (bytes) (dec)
-------                    -------   -----------------   --------------------
.text                        0x200              0x13a2          0x1d73  (7539)
.const                      0x15a2              0x26dc          0x3a4a  (14922)
.text                       0x3c7e              0xc492         0x126db  (75483)
.dinit                     0x10110               0x258           0x384  (900)
.text                      0x10368               0xf8c          0x1752  (5970)
.isr                       0x112f4                 0x2             0x3  (3)

                     Total program memory used (bytes):        0x19971  (104817) 40%


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            0xc2  (194)
.ndata                      0x1a48                   0            0x20  (32)
.nbss                       0x1a68                   0            0x28  (40)
.ndata                      0x1a90                   0            0x24  (36)
.nbss                       0x1ab4                   0            0x2a  (42)
.ndata                      0x1ade                   0             0x8  (8)
.nbss                       0x1ae6                   0            0x1a  (26)
.ndata                      0x1b00                   0             0x2  (2)
.nbss                       0x1b02                   0             0x4  (4)
.ndata                      0x1b06                   0             0x4  (4)
.nbss                       0x1b0a                   0             0x2  (2)
.ndata                      0x1b0c                   0             0x2  (2)
.data                       0x1b0e                   0           0x106  (262)
.dconst                     0x1c14                   0             0x8  (8)
.data                       0x1c1c                   0             0xa  (10)
.bss                        0x1c26                   0             0x4  (4)
.data                       0x1c2a                   0             0x2  (2)
.heap                       0x1c2c                   0          0x2000  (8192)

                        Total data memory used (bytes):         0x342c  (13356) 43%


Dynamic Memory Usage

region                     address                      maximum length  (dec)
------                     -------                      ---------------------
heap                        0x1c2c                              0x2000  (8192)
stack                       0x3c2c                              0x43d4  (17364)

                        Maximum dynamic memory (bytes):         0x63d4  (25556)

When I'd finished the initial work, I did look at the ROM usage - it was 104334 bytes, so I'd saved almost 1.2K.

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