Programming a plugin compatible with patches

Writing software that inputs and/or outputs audio and performs DSP algorithms such as filters, new codecs or audio effects.
Post Reply
LoPiTaL
Senior User
Posts: 23
Joined: Tue 2013-01-08 16:33

Programming a plugin compatible with patches

Post by LoPiTaL » Thu 2013-02-07 14:29

Hi everyone!
I want to make a plugin, and I want it to be compatible with the lattest patches for my chip (VS1053). I have seen in the plugins page that several are compatible with the patches. How is this possible? Which is the way to go?

Best regards,
LoPiTaL

User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2736
Joined: Tue 2010-06-22 13:43

Re: Programming a plugin compatible with patches

Post by Panu » Thu 2013-02-07 15:19

You need to be careful not to use memory which is used by the patches. Maybe Pasi has some info about the memory usage of the patches. That memory must be removed from the mem_user memory description. Which kind of plugin are you planning?

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

LoPiTaL
Senior User
Posts: 23
Joined: Tue 2013-01-08 16:33

Re: Programming a plugin compatible with patches

Post by LoPiTaL » Thu 2013-02-07 19:22

Hi! Thanks for the answer.

Just very basic plugins, more of them related to audio post-processing, like mixing, filtering, limiting, etc...
By now, I am OK with a basic mixer able to send to any output either any analog input or any decoded inputs.

So, if I don't use the memory used by the patch and I download my plugin code into the empty memory, how can I get my code executed since the patch does not know that it exists?

Any sample or information is appreciated.

Best regards,
LoPiTaL

LoPiTaL
Senior User
Posts: 23
Joined: Tue 2013-01-08 16:33

Re: Programming a plugin compatible with patches

Post by LoPiTaL » Thu 2013-06-06 13:55

Hi again!
I want to use the VS1053 patch with a custom plugin.

I have the plugin already working, using the free memory of the VS1053, that Henrik told in this other post:
viewtopic.php?f=7&t=925#p3660

But I want now to have the plugin along with the VS1053 patches. To apply the patches I need the memory usage of them, so I can configure my ".mem" file with the remaining memory.

Can you provide it?

Best regards,
LoPiTaL

User avatar
Henrik
VLSI Staff
Posts: 1153
Joined: Tue 2010-06-22 14:10

Re: Programming a plugin compatible with patches

Post by Henrik » Thu 2013-06-06 15:24

LoPiTaL wrote:Hi again!
But I want now to have the plugin along with the VS1053 patches. To apply the patches I need the memory usage of them, so I can configure my ".mem" file with the remaining memory.
VS1053b Patches 1.98 uses memories as follows:

With FLAC:
- I mem: 0x50 - 0xe50
- X mem: 0x1800 - 0x1857, 0x1a00 - 0x1c4e
- Y mem: 0x1800 - 0x185f

With FLAC, use the following memory map:

Code: Select all

MEMORY {
# Free memory map for VS1053b. Doesn't take into account any patches or plugins.
    page 0:
        ram_prog: origin = 0x0e51, length = 0x1af
    page 1:
        data_x:   origin = 0x1858, length = 0x028
        small_x:  origin = 0x1ed7, length = 0x029
        free_x:   origin = 0x3565, length = 0xa9b
    page 2:
        data_y:   origin = 0x1860, length = 0x020
        free_y:   origin = 0xfab3, length = 0x54d
}
Without FLAC:
- I mem: 0x50 - 0x1be, 0x300 - 0x5fd
- X mem: 0x1800 - 0x180a
- Y mem: none

Without FLAC, use the following memory map:

Code: Select all

MEMORY {
# Free memory map for VS1053b. Doesn't take into account any patches or plugins.
    page 0:
#       ram_prog1: origin = 0x01bc, length = 0x144 (THIS LINE IS INCORRECT, SO IT HAS BEEN COMMENTED OUT!!!)
        ram_prog1: origin = 0x01bf, length = 0x141
        ram_prog2: origin = 0x05fe, length = 0xa02
    page 1:
        data_x:   origin = 0x180b, length = 0x075
        small_x:  origin = 0x1ed7, length = 0x029
        free_x:   origin = 0x3565, length = 0xa9b
    page 2:
        data_y:   origin = 0x1800, length = 0x080
        free_y:   origin = 0xfab3, length = 0x54d
}
Note: I just merged the memory allocations with the memory map you quoted. I have not tested these maps, so please verify their correctness before using.

Hope this helps,
- Henrik
Good signatures never die. They just fade away.

LoPiTaL
Senior User
Posts: 23
Joined: Tue 2013-01-08 16:33

Re: Programming a plugin compatible with patches

Post by LoPiTaL » Fri 2013-06-07 13:30

Thank you!
I have tried the version without FLAC and it works fine.

Now I have fine tunning control along with my custom plugin :D

Best regards,
LoPiTaL

User avatar
Henrik
VLSI Staff
Posts: 1153
Joined: Tue 2010-06-22 14:10

Re: Programming a plugin compatible with patches

Post by Henrik » Mon 2013-06-10 16:49

LoPiTaL wrote:Thank you!
I have tried the version without FLAC and it works fine.

Now I have fine tunning control along with my custom plugin :D
Happy to hear you have succeeded!

Nevertheless, Pasi just found out an error in the no-FLAC memory map I provided. The following line:

Code: Select all

ram_prog1: origin = 0x01bc, length = 0x144
should be replaced with

Code: Select all

ram_prog1: origin = 0x01bf, length = 0x141
I corrected it to the original message so that nobody else uses the incorrect map.
Good signatures never die. They just fade away.

LoPiTaL
Senior User
Posts: 23
Joined: Tue 2013-01-08 16:33

Re: Programming a plugin compatible with patches

Post by LoPiTaL » Mon 2013-06-10 17:39

Ok, I have done the change and it is still working fine :D

Thank you very much!
Best regards,
LoPiTaL

Post Reply