Currently, there are 3 kinds of PCM presets source:
- "In-ROM" presets, compiled in under one of several
pcm_map_t arrays including pcm_map from pcm_tiny.h and gamma9001_map from pcm_gamm9001.h.
- "In-memory" (RAM) presets, loaded from file into memory at run-time with
pcm_load (or amy.send(load_sample='...'))
- "From-file" presets, which allow for longer samples to pulled directly from a filesystem during playback, to avoid the RAM footprint. This is presumably slower (so limits what else AMY can do?), and does not allow looping (seeking back in the file).
The code in pcm.c includes a lot of code branches and special-cases for each of these types, as well as for the segmented ROM preset numbers covering the pcm_map and gamma9001_map dichotomy.
I would like to simplify this code, so that as far as possible all PCM playback uses a single code path. ROM versus RAM should be just a matter of handles of a single type located in static memory or RAM, and playback-from-file will simulate the same thing with a small buffer that is periodically updated.
Currently, there are 3 kinds of PCM presets source:
pcm_map_tarrays includingpcm_mapfrompcm_tiny.handgamma9001_mapfrompcm_gamm9001.h.pcm_load(oramy.send(load_sample='...'))The code in
pcm.cincludes a lot of code branches and special-cases for each of these types, as well as for the segmented ROM preset numbers covering thepcm_mapandgamma9001_mapdichotomy.I would like to simplify this code, so that as far as possible all PCM playback uses a single code path. ROM versus RAM should be just a matter of handles of a single type located in static memory or RAM, and playback-from-file will simulate the same thing with a small buffer that is periodically updated.