1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lemur Forum Dead?

Discussion in 'Your DAW (Digital Audio Workstation)' started by DanielBrunelle, Mar 13, 2018.

  1. WindcryMusic

    WindcryMusic Senior Member

    748
    475
    Oct 19, 2015
    Thanks, I really hope this is the case. Lemur is becoming so important to my studio that I wouldn't hesitate to pay them the same $50 again for a version 2.0 even if it only included modest improvements. (Hint: string parsing, hehe.)
     
  2. procreative

    procreative Senior Member

    1,303
    563
    Mar 12, 2013
    United Kingdom
    Hey! I ve got your CTP project, wondered if its okay to update Lemur, will it break anything in CTP? Especially as I did a couple of tweaks to CTP.
     
  3. MIDI Kinetics

    MIDI Kinetics Member

    13
    12
    Oct 24, 2016
    There is no problem for anyone to upgrade Lemur. The new version did not break any existing projects.

    I doubt they would release a new version which would break existing projects because then every project in the Liine User Library would become useless.

    https://liine.net/en/community/user-library/

    MOH
     
    Last edited: Apr 16, 2018
  4. pmcrockett

    pmcrockett Senior Member

    328
    184
    Nov 3, 2014
    Saint Louis
    In addition to concatenating, you can perform comparisons (>, <, >=, <=, ==) against other strings which sorts them alphabetically (or more technically, in ASCII table order). I've not actually attempted this, but it should be possible to build a function that runs a bunch of recursive comparisons to determine the contents of the string and then loads the data into a vector so you can work with it.
     
    Last edited: Apr 16, 2018
  5. WindcryMusic

    WindcryMusic Senior Member

    748
    475
    Oct 19, 2015
    I know what you mean, but that would be a rather extreme solution that might hit the maximum allowed size for a function all by itself. 26 conditionals for each letter position (and that's assuming only alphabetic characters in the same case) would be a whole lot of code.

    I haven't tried writing any recursive code in Lemur scripts. I wonder if there is a maximum stack size? Anyway, the problem I foresee with a recursive solution is that there isn't a way to "peel off" each letter of the string. It might be possible to recursively concatenate the match pattern though, I suppose.

    Fortunately I found a different way to attack my current problem that eliminated the need to do the string parsing. Still, I hope Lemur might add this someday. Even just adding a stringtoarray() function to complement the existing arraytostring() function would go a long way in the right direction.
     
    Last edited: Apr 16, 2018
  6. pmcrockett

    pmcrockett Senior Member

    328
    184
    Nov 3, 2014
    Saint Louis
    The code is actually pretty simple and ends up not even needing recursion (which is just as well, because I'm not sure whether Lemur can call functions recursively). Paste the following code into a function named stringtoarray(s) and set its execution to manual. Like the comment header says, the only real limitation is that it can't deal with ' and " characters because these define strings in the code and I can't find any info on whether Lemur has escape sequences that let you include them in the strings themselves.
    Code:
    /*
    This function formats a string as individual characters in a vector. It does not deal with
    ASCII control codes, and I don't know if/how Lemur does escape codes, so it cannot parse
    single or double quote marks.
    --P.M. Crockett
    */
    decl strComp = {' ','!','#','$','%','(',')','*','+',',','-','.','/','0','1','2','3',
    '4','5','6','7','8','9',':',';','<','=','>','?','@','A','B','C','D','E','F','G','H',
    'I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','[','\',']',
    '^','_','`','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r',
    's','t','u','v','w','x','y','z','{','|','}','~'};
    decl compLen = sizeof(strComp);
    decl retArray;
    decl retIdx = 0;
    decl concat = '';
    decl failsafe = 0;
    decl failsafeLimit = 9999;
    decl i;
    
    do
    {
            for (i = 0; i < compLen; i++)
            {
                    if (i == compLen - 1 || (s >= concat + strComp[i] && s < concat + strComp[i + 1]))
                    {
                            retArray[retIdx] = strComp[i];
                            retIdx++;
                            concat = concat + strComp[i];
                            break;
                    }
            }
            failsafe++;
    }
    while (concat != s && failsafe < failsafeLimit);
    
    return retArray;
     
    WindcryMusic likes this.
  7. WindcryMusic

    WindcryMusic Senior Member

    748
    475
    Oct 19, 2015
    Very impressive! I'll definitely want to hang onto this in case the need re-arises at some point ... thanks!

    FYI, I just did a quick experiment out of curiosity, and while Lemur does technically seem to perform recursion, there seems to be something wrong with how it works, like it reuses the 1st call's parameter value on each iteration, or something like that (difficult to tell without any debugging facilities). So I'm still not sure it is actually a useful option.
     

Share This Page