thanks a lot for your comments. As I am slowly progressing to produce somewhat decent code (emphasis is on ‘slowly’) I am very grateful for analysis and concrete hints. Disclaimer: As I said, this is very much beta and currently I am glad (and a bit proud) I made it working so far in the first place. Having said that, of course you are right, there are surely quite a few options for optimisation. Hopefully I will have some time at the weekend to start doing that…
Nevertheless let me refer to some of your points in a more concrete way:
- Consolidation of the listener loops: definitely. This is due to my lack of experience and coding practice; I don’t know how much performance is needed for the
real_time
s but I supect it could be quite a lot … - automatic creation of loops for playback and recording: Well, it took me quite some time to figure out a way so that this acutally worked (first version was in October '17);
- one of the problems was the synchronisation of the recording and the playback. I finally arrived at a solution where all of these loops constantly run.
- Actually to me it seems quite a challange to start and stop loops within the context of such an application (refering to the idea to only use one recording loop). Right now I don’t have an idea how to do that (problem is not to stop but to start; I will do some testing …). But you are right: even though all playback loops potentially run together, in the current implementation I only need one recording loop at a time. So this might be a point to start.
- Nevertheless: I am kind of reluctant to start optimising the playback/recording mechanism, because acutally these loops are like not-very-performance-demanding (granted though, that things add up and optimisation should take place wherever it is possible); they do run for four or eight or even more beats; it seems to me the sample slicing loops are much more demanding because the do only sleep for 0.25 or even less beats. (My first version had 8 tracks for sample slicing corresponding to the 8 rows of a 8 x 16 grid; but it did not include the live looper functionality).
So far, and thanks again for your much appreciated input!