justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[newer questions][unreplied] | [replied] | [recent comments] | [all]
[older questions]

Question: tinyurl.com/a8fwgtd -> does Reaper show up/support all 64 chars that getParameterProperties() provides? If not, please?
Asked by EvilDragon (88.207.58.x) on February 10 2013, 9:24pm
Reply on February 10 2013, 11:07pm:
    pretty much betrays the note above.
Comment...
Question: Naming the baby. ReaRubber? ReaGumby?
Asked by Elmer Fudd (76.226.161.x) on February 10 2013, 12:30am
Reply on February 10 2013, 11:07pm:
    Stretchies!
Comment...
Question: what do you think of the new itunes UI?
Asked by Will (70.173.150.x) on February 9 2013, 6:22pm
Reply on February 10 2013, 11:07pm:
    I'm indifferent -- it's hard to care about things like that.
Comment...
Question: One example in STL that you really, really don't like?
Asked by Martin (93.136.22.x) on February 9 2013, 5:43pm
Reply on February 10 2013, 11:06pm:
    I'd have to go make one up, as it's been so long since I've done any STL stuff... OK here's one: I think exceptions are a really awful construct and should pretty much never be used.
Comment...
Question: Do you follow xkcd.com?
Asked by Tinny (88.207.127.x) on February 8 2013, 2:28pm
Reply on February 8 2013, 9:00pm:
    Not really, but I confess I'm not really in to comics.
Comment...
Question: Thanks for dropping the stalking charges haha. Have you seen "Searching For Sugar Man" also check this out bit.ly/TG0ypp
Asked by AnalSeducer (67.215.231.x) on February 8 2013, 5:14am
Reply on February 8 2013, 9:00pm:
    Haven't seen it.
Comment...
Question: Maybe this guy could be added to your list of respected programmers? bellard.org/
Asked by Will (24.234.85.x) on February 8 2013, 12:57am
Reply on February 8 2013, 9:00pm (edited at February 8 2013, 9:01pm):
    I don't really keep a list, but I saw that javascript PC emulator and thought it was completely awesome.
Comment...
Question: Still use winamp?Or use other players?
Asked by gepao (84.79.188.x) on February 8 2013, 12:11am
Reply on February 8 2013, 9:01pm:
    Yep, mostly. Or my iphone.
Comment...
Question: Will you let us style askjf to look better? :P
Asked by Will (24.234.85.x) on February 7 2013, 11:25pm
Reply on February 8 2013, 9:01pm:
    Is it really worth bothering? give me yur css.
Comment...
Question: What blogs do you read?
Asked by ees. (69.15.110.x) on February 7 2013, 7:36pm
Reply on February 7 2013, 7:54pm:
    Off the top of my head, The Old New Thing, Coding Horror, virtualdub.org (rarely, it isn't often updated). I also end up reading blogs via twitter (Paul Krugman, Steven Wittens, others too).
Comment...
Question: What language would you imagine that aliens code in?
Asked by NuttyProfessor (76.226.116.x) on February 7 2013, 2:21am
Reply on February 7 2013, 2:50am:
    assembly, no doubt, but I can't imagine the instruction set.
Comment...
Question: On your b-tree code, wouldn't the lh operand in the return recursively execute before the rh, throwing off the original reqs?
Asked by Will (24.234.85.x) on February 6 2013, 10:44pm
Reply on February 7 2013, 2:49am (edited at February 7 2013, 3:42am):
    Yes (it processes left before right), but no, it does what (as I understood, anyway) the requirements specified, since each top level call to the recursive function only prints a single level of the tree, so the left-to-rightness is what you want. Edit: here, this might be easier to understand (exact same function, just more clear code):
    f(h, levelToPrint, currentLevel) {
        if (currentLevel > levelToPrint) return 0;
        if (!h) {
            if (currentLevel == levelToPrint) print("(null)");
            return 0;
        }
        if (currentLevel == levelToPrint) {
            print(h);
            return 1;
        }
        return f(h.left,levelToPrint, currentLevel+1) + f(h.right,levelToPrint, currentLevel+1);
    }
    
    levelToPrint=0;
    while (f(tree,levelToPrint++,0)) print("\n");
    
Comment...
Question: I was so blind aghhhhh - Justin, thank you so much for opening my eyes with the delay class - you are genius :)
Asked by Franci (89.142.37.x) on February 6 2013, 8:30pm
Reply on February 7 2013, 2:49am:
    Glad I could help!
Comment...
Question: why is reaWASAPI tagged as "experimental"? do you personnaly use it?
Asked by frenchos (46.218.205.x) on February 6 2013, 5:08pm
Reply on February 7 2013, 2:49am:
    Sometimes, but it can be finicky to get it to work right depending on the hardware, exclusive/shared modes, etc.
Comment...
Question: The tracker seems to have ground to a halt. Elevated FRs seem forgotten as nothing happens with them?
Asked by Tinny (88.207.125.x) on February 6 2013, 9:52am
Reply on February 6 2013, 3:08pm:
    Yeah, the tracker isn't terribly enjoyable to use as a developer. :/
Comment...
Question: Does raping the tertiary operator produce faster machine code than writing legible code (the later version)?
Asked by Will (70.173.150.x) on February 6 2013, 8:35am
Reply on February 6 2013, 2:43pm:
    I don't think so, but part of me wanted the two-line f().
Comment...
Question: There was talk a while back about creating an open source plugin SDK, to get around the VST restrictions, and progress on that?
Asked by Mick (203.149.85.x) on February 6 2013, 2:47am
Reply on February 6 2013, 4:13am:
    Not enough of a point, VST is just lenient enough to make it not worth bothering I think.
Comment...
Question: What's a good algorithm to display a binary tree from the top down one level at a time left to right?
Asked by Will (24.234.85.x) on February 5 2013, 10:34pm
Reply on February 6 2013, 4:11am (edited at February 6 2013, 4:37am):
    The obvious way I'd imagine doing it would be O(N*log(N)), which seems reasonable enough I guess?
    f(h, level) {
        if (level == 0) print(h); // h might be null
        return h && level >= 0 ? level==0 ? 1 : f(h.left,level-1) + f(h.right,level-1) : 0;
    }
    
    l=0;
    while (f(tree,l++)) print("\n");
    
    Edit: updated to print null leaves for levels that are printed...
    Edit: further updated to overuse the tertiary operator. Regretting this, here is the less obfuscated version:
    f(h, level) {
        if (level < 0) return 0;
        if (!h) {
            if (level == 0) print("(null)");
            return 0;
        }
        if (level == 0) {
            print(h);
            return 1;
        }
        return f(h.left,level-1) + f(h.right,level-1);
    }
    
    l=0;
    while (f(tree,l++)) print("\n");
    
Comment...
Question: I want to make function which returns input data shifted by x samples (like plugin latency)
Asked by Franci (46.122.98.x) on February 5 2013, 6:57pm
Reply on February 6 2013, 4:02am (edited at February 6 2013, 4:03am):
    Ah, like a FIFO queue? How about:
    class delay {
        double *m_buf;
        int m_len,m_pos;
    public:
        delay(int len) { m_len=len; m_buf=(double*)calloc(sizeof(double),len); m_pos=0; }
        ~delay() { free(m_buf); }
        double process(double in) {
            double ret=m_buf[m_pos];
            m_buf[m_pos]=in;
            if (++m_pos>=m_len) m_pos=0;
            return ret;
        }
    };
    
Comment...
Question: I am trying to program a function which would create a latency on buffer - any ideas where to get an example code ?
Asked by franci (86.61.125.x) on February 3 2013, 5:52pm
Reply on February 4 2013, 11:31pm:
    You want to create a delay line?
Comment...
[newer questions][unreplied] | [replied] | [recent comments] | [all]
[older questions]
Copyright 2025 Justin Frankel. | RSS