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: Can you briefly explain how knowledge of trigonometry helped you with AVS effects, perhaps with 1 example?
Asked by Will (24.234.85.x) on June 6 2014, 9:44pm
Reply on June 6 2014, 10:15pm (edited at June 6 2014, 10:17pm):
    OK, one thing you can make is where you generate a new frame's image based on the previous frame's image, and you often would make a lookup table for each destination pixel, with the value of each entry in the table being the index (y*w + x) of the source pixel.

    In this instance, if you wish to say, rotate the image around its center, you could convert from x,y coordinates to polar (by using atan2() for the angle and pythagorean for radius), then modify, then convert back to x,y using sin() and cos(). I'll leave the specifics of the math as an exercise for you.
Comment...
Question: Could you please share minimal REAPER_Resample_Interface example? I'm trying to wrap it to be used by another C library (like this: pastebin.com/jvP6tamk) and getting strange memory errors. Is it possible that REAPER_Resample_Interface does it's own memory allocations to supplied buffers?
Asked by Martin (78.0.239.x) on June 6 2014, 4:02pm
Reply on June 6 2014, 5:42pm:
    Something like this (pardon the (*). syntax, too lazy to do all of the required HTML entities manually):
    
    const int nch = 2;
    const int out_block_size = 1024;
    
    REAPER_Resample_Interface *resample = Resampler_Create();
    
    ReaSample *out_buf = (ReaSample *)calloc(sizeof(ReaSample), out_block_size * nch);
    
    (*resample).SetRates(44100.0, 96000.0);
    
    while (you feel like it)
    {
    
        ReaSample *in_buf;
    
        int needed_input = (*resample).ResamplePrepare(out_block_size,nch, &in_buf);
        if (needed_input > 0)
        {
            // fill in in_buf with nch * needed_input * sizeof(ReaSample) bytes.
            // if less input is available (EOF), decrease needed_input (this will imply a flush, so only supply less if it is EOF)
        }
        int out_buf_used = (*resample).ReasampleOut(out_buf,needed_input, out_block_size, nch);
    
        // add out_buf_used * nch * sizeof(ReaSample) to output
    }
    
    
    If you want to have your resampler work by having a known input quantity and getting whatever output is available, you can use Extended(RESAMPLE_EXT_SETFEEDMODE,(void*)(INT_PTR)1,0,0), which will allow you specify the input samples available to ResamplePrepare (which will return that same value unless there is an error).
Comment...
Question: Favorite album right now?
Asked by Will (24.234.85.x) on June 5 2014, 10:11pm
Reply on June 5 2014, 10:50pm:
    Probably still finding myself listening to the self titled "Papier Tigre" album, but also Mogwai's "Hardcore will Never Die, But You Will", and the "Les Revenants" soundtrack. I also often end up humming the Earlimart song, "We're So Happy", or various simple Chopin arrangements (étude No. 4 and Nocturns from my beginner piano book).
Comment...
Question: Can you think of any use case to use SVN over GIT?
Asked by John (68.104.121.x) on June 5 2014, 3:51pm
Reply on June 5 2014, 10:45pm:
    I really can't -- I'd rather use git-svn than svn, even.
Comment...
Question: Ever worked with an engineer like Martin? :)
Asked by Will (24.234.85.x) on June 5 2014, 12:53am
Reply on June 5 2014, 4:12am:
    You mean Gilfoyle? I think they tend to be more like Roman.
Comment...
Question: Any thoughts on Apple's new language, "Swift?"
Asked by PunkyBrewster (108.84.201.x) on June 5 2014, 12:06am
Reply on June 5 2014, 4:13am:
    Meh, it isn't speaking to me much.
Comment...
Question: Having viewed Silicon Valley S01E08, can you think of any improvements to the dick-jerk algorithm? I found Martin's strategy to be brilliant!
Asked by Will (24.234.85.x) on June 2 2014, 4:02pm
Reply on June 2 2014, 4:10pm (edited at June 3 2014, 1:22am):
Comment...
Question: Re: "Catch Fire". I caught an early preview. Cool story, building the first PC's and all that.
Asked by PunkyBrewster (68.255.167.x) on May 31 2014, 8:00pm
Reply on June 1 2014, 1:04am:
    Gave up after "I don't work for IBM"
Comment...
Question: Does reaper ever use running status to compress the midi stream? And can it read such compressed midi?
Asked by Kite (71.59.241.x) on May 30 2014, 9:33pm
Reply on May 31 2014, 1:46pm:
    Running status is only used for transport over low bitrate MIDI connections, really. It supports receiving running status from OSX midi devices, and from .mid files (which support it as well) but in other cases it is not necessary and it is not used internally.
Comment...
Question: Thoughts on BMWs?
Asked by Will (68.104.121.x) on May 30 2014, 1:37am
Reply on May 31 2014, 1:47pm:
    They are cars.
Comment...
Question: Can we take a look at the plugin you started to build to make collaboration easier for Reaper? We would love to see what we can do with it.
Asked by Bob Gobbler (206.214.33.x) on May 29 2014, 11:13pm
Reply on May 31 2014, 1:47pm:
    Hmm I don't think I know what you mean, but I'll email you.
Comment...
Question: Do you plan to catch "Halt and Catch Fire"?
Asked by PunkyBrewster (76.226.55.x) on May 29 2014, 9:38pm
Reply on May 31 2014, 1:47pm:
    First I've heard of it, but sure, I'll check it out if it's streamable on Amazon...
Comment...
Question: Every considered doing work in 3d printing? We could use more programmers like you.
Asked by Jesse (173.54.213.x) on May 29 2014, 2:56pm
Reply on May 31 2014, 1:48pm:
    Not sure where I'd begin.
Comment...
Question: while GIT helps you resolve merge conflicts, what basic steps do you take in your collaboration to make sure multiple programmers aren't working on the same part in the first place
Asked by will (68.104.121.x) on May 28 2014, 5:44am
Reply on May 28 2014, 10:46pm:
    IRC mostly. Having said that, if two people do the same thing, you get to pick which implementation you like better (or combine the two). The nice thing about having code in git is that at a certain point you can just put it together at a high level, if you're smart about it.
Comment...
Question: Back in the day on IRC Jenn bragged about how you'd collected 17,000 mp3s. When did you make the transition to purchasing honestly? :)
Asked by Will (68.104.121.x) on May 22 2014, 7:17pm
Reply on May 23 2014, 1:30am:
    I don't think I ever had that many, maybe she did. Once you could start paying a nominal fee for MP3 downloads, it was a pretty easy sell. IMO early MP3 piracy was mostly about availability and less about price.
Comment...
Question: Do you buy CDs or buy digital albums nowadays? Are you into high-resolution downloads or do you think MP3s are good enough?
Asked by Stephan (135.19.199.x) on May 22 2014, 12:02am
Reply on May 22 2014, 4:01am (edited at May 22 2014, 4:02am):
    I mostly buy digital downloads -- having a bit of plastic to rip and put in my drawer feels pointless and wasteful. I find vinyl to be more worthwhile than CDs, having nice big artwork and a ritual of turning them over, which can be nice at times, but mostly I still find myself listening to mp3s.

    High-resolution is a bunch of nonsense for consumption. Lossless compression and higher bit depths and samplerates are great (and often necessary!) if you want to do drastic and/or non-linear processing, but if you're just going to try to listen to it through an ideally-neutral stereo system, then high-bitrate MP3 is perfectly fine.
Comment...
Question: Are you going to work on reaper until you die?
Asked by Will (68.104.121.x) on May 21 2014, 4:25pm
Reply on May 21 2014, 8:05pm:
    I really hope not.
Comment...
Question: With the inclusion of EEL, these cool user made scripts with graphical interfaces start popping up (like spk77's MIDI tools). Wouldn't it be cool if you could dock them in REAPER's interface, save them in screensets, etc. ;)
Asked by seventh (62.106.2.x) on May 21 2014, 2:31pm
Reply on May 21 2014, 8:05pm:
    Yeah, it would. Noted.
Comment...
Question: I'm really liking eel alot, and I'm replacing most all of my python scripts. Is it possible in eel to open or run a program? e.g Open default web browser. Thanks, Wyatt
Asked by Wyatt (76.3.251.x) on May 20 2014, 7:48pm
Reply on May 20 2014, 9:27pm:
    Not in ReaScript at the moment, but we could probably add that.
Comment...
Question: gitref.org - would you add any commands/features to this list for commonly used?
Asked by Will (68.104.121.x) on May 17 2014, 11:13pm
Reply on May 19 2014, 6:39pm:
    I like git log --patch.
Comment...
[newer questions][unreplied] | [replied] | [recent comments] | [all]
[older questions]
Copyright 2025 Justin Frankel. | RSS