[Csnd-dev] Building smaller Csounds
Date | 2022-12-20 17:06 |
From | John |
Subject | [Csnd-dev] Building smaller Csounds |
This is a follow-up to my paper in Athlone and various emails since. Does this sound like a way to satisfy some users? In Csound5 pre-release phase we had a Csound for which nearly all opcodes were plugins in libraries based on the source file structure. At the time too many smaller devices could not deal with loadable code so this approach was abandoned in favour of the current schemes in cs6. We could redo this, and then the size/scope of a Csound would be selectable. It might need some better way of selecting which components are to be loaded but that can wait. One could arrange the sources to it compiled either the current scheme or the total-plugin idea. Fundamentally it would be two building systems. Certainly would be less disturbing than Minimal7. I am not sure how long this would take to do but it feels straightforward. It could be the basis of all Csound7 or be a sub-case. Any thoughts or comments? ==John ffitch |
Date | 2022-12-20 18:08 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
I think a first step could be to make all opcodes in /Opcodes plugins, keeping /OOps internal and see where that gets us. Prof. Victor Lazzarini Maynooth University Ireland > On 20 Dec 2022, at 17:07, John |
Date | 2022-12-20 19:37 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
Personally I would not like to see these opcodes become plugins. The current csound64 library contains pretty much all you need to build outstanding audio software. As a single library it's fantastic. I don't understand why we would choose to remove some of that functionality and place it into different plugin libraries and add further pressure on frontend developers. What is to be gained from this? In my view it makes using csound as a library far less attractive. csound64.dll is currently 4Mbs on Windows. How much smaller does it need to be? On Tue, 20 Dec 2022 at 18:09, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote: I think a first step could be to make all opcodes in /Opcodes plugins, keeping /OOps internal and see where that gets us. |
Date | 2022-12-21 02:35 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
I am emphatically with Rory here. My use cases for plugin opcodes have never had nothing to do with making Csound smaller or more more modular, and everything to do with making it possible for people to write opcodes that they could compile and run without having to rebuild all of Csound. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Tue, Dec 20, 2022 at 2:38 PM Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2022-12-22 03:17 |
From | andy fillebrown |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
4Mbs is a lot on some embedded systems, and for the WASM build I would love to make the Csound download smaller. Hlodver has done really good work getting the size down, but it could be even smaller if there was a way to easily remove the unused bits. Every byte counts when it comes to web pages. Perhaps there is some middle ground? I'm not a front-end developer, so forgive my ignorance in asking, but what pressures would this feature add on you? On Tue, Dec 20, 2022 at 2:38 PM Rory Walsh |
Date | 2022-12-22 06:51 |
From | Rory Walsh |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
Hi Andy. For me it comes down to a few things, more moving parts is more maintenance. Windows has always been dll hell. Adding another couple of hundred to the mix is going to add further pressure to Stephen who has done a remarkable job of packing the windows builds over the last few years. Another concern for me is the recent trend I'm seeing in hosts blacklisting plugins that try to load additional libraries on startup. Right now some hosts won't run any plugins unless Csound is statically linked to the plugin lib itself. Other hosts sandbox everything, making it even more awkward to distribute lots of additional libs. I think the best middle ground here would be for extended CMake build options to allow users more control over what goes into a build, but I think the current inclusion of /Opcodes should be the default for desktop platforms. I'd be interested to see how much of a difference removing these internal opcodes would have on the overall size of Csound. On Thu, 22 Dec 2022 at 03:19, andy fillebrown <andy.fillebrown@gmail.com> wrote: 4Mbs is a lot on some embedded systems, and for the WASM build I would |
Date | 2022-12-22 14:00 |
From | andy fillebrown |
Subject | Re: [Csnd-dev] Building smaller Csounds |
Interesting. Thanks. I think given how interwoven a lot of the core opcodes are with each other, this will be a large undertaking either way. I like the idea behind minimal7 in general, but I do not like its current reliance on the preprocessor. Ideally, each .c module needs to be much more fine-grained in scope so CMake options can add and remove code by simply adding and removing files instead of adding and removing preprocessor definitions. This is not how Csound was originally designed, though, so it will be a lot of refactoring, which I do not think is advisable until more tests are in place. And for the record I am fine with Csound's current size, so it is not a high priority for me personally. I think better test coverage is a higher priority, and that will eventually allow us to refactor with fewer regressions, which in turn will allow features like minimal7 to move forward faster, with fewer issues reported. Minimal7 would be nice to have, but I do not think the Csound codebase is ready for it, yet. On Thursday, December 22, 2022, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2022-12-22 15:51 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
I simply don't agree with you about the WASM build. I don't think this matters. It might take a bit longer to load but it will run just fine. About the embedded systems, you have a point, but only if you have a pretty small embedded system. Still, you have a point. The pressures this feature would add for me are complexity causing additional and, in my opinion, unneeded and distracting maintenance. Perhaps the sizes of things would be smaller if the compiler optimized for size instead of speed? Or for a balance of size and speed? With -O3, the compiler does a LOT of inlining and some loop unrolling, and both definitely make the executable code bigger. I suggest using the -Os option, this does all optimizations that -O2 does, except for optimizations that increase code size. Last time I checked, -O2 was not far from -O3 in execution speed. so -Os might be a good tradeoff. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, Dec 21, 2022 at 10:19 PM andy fillebrown <andy.fillebrown@gmail.com> wrote: 4Mbs is a lot on some embedded systems, and for the WASM build I would |
Date | 2022-12-23 08:47 |
From | andy fillebrown |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
> I simply don't agree with you about the WASM build. I don't think this matters. It might take a bit longer to load but it will run just fine. Download size matters because it has a direct impact on SEO and bounce rate. I'm happy with its current size and agree that the added pressures and complexity are not a good enough tradeoff right now. Would I use a smaller Csound WASM if it was available, though? Absolutely! On Thu, Dec 22, 2022 at 10:52 AM Michael Gogins |
Date | 2022-12-23 10:58 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
I did not know about SEO. What do you need that for? Regards, Mike On Fri, Dec 23, 2022, 03:48 andy fillebrown <andy.fillebrown@gmail.com> wrote: > I simply don't agree with you about the WASM build. I don't think this matters. It might take a bit longer to load but it will run just fine. |
Date | 2022-12-24 03:58 |
From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd-dev] [EXTERNAL] [Csnd-dev] Building smaller Csounds |
I'd be interested in knowing what kinds of Csound use cases, besides embedded systems, require such minimal Csounds, and what hardware is involved. In Windows (command line) I routinely run realtime MIDI off a USB drive with <5MB of Csound. Only 4 files: csound, csound64, portaudio and portmidi DLL's from v6.16. These plus my .csd and any sample files. (Of course I can add additional DLL's if and when needed. These are all I currently need however.) I have updated my Windows Csound to Go article at arthunkins.com/articles.htm to reflect the above info. If price is an object, I'm perplexed that Chromebooks haven't generated more interest. They are compatible with Android, Windows and Linux, and run Csound for Android just fine. Many used Chromebooks with power cords can be had for less than $50 on eBay. Any up to 20-year-old unit (i.e., one that can access Play Store apps) can run Csound for Android. I recently purchased a lot of 5 Chromebooks for $80US with free shipping from Alaska. All run my realtime MIDI comps with little trouble. On Thu, Dec 22, 2022 at 1:49 AM Rory Walsh <rorywalsh@ear.ie> wrote:
|