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: pastebin.com/01UbVZct still doesn't work. To get displayed text this seems to work: pastebin.com/GGE84sAL However, that's only one conversion less and requires separate UTF8 functions (something I try to circumvent by using only char*)
Asked by Martin (93.139.103.x) on April 23 2014, 5:43pm
Reply on April 23 2014, 8:21pm:
    Send me an email with this (and include the langpack you're using), thanks!
Comment...
Question: I see that REAPER MIDI editor now has some fancy shadows... what do you use to render them?
Asked by Rodrigo (187.112.75.x) on April 23 2014, 3:27pm
Reply on April 23 2014, 8:21pm:
    Hmm probably just LICE with an image, I think.
Comment...
Question: With Reaper localized there are some quirks when it comes to things Windows display: i.imgur.com/yMonxdi.png (notice how čć become cc) Sometimes we search for hwnds by name and this can become a pain.This is what I've come up with to deal with it: bit.ly/1poiTf7 But I don't like that things are getting reconverted 4 times! Being old Being old win32 guy, do you have any idea how to make this a bit more nicer?
Asked by Martin (93.136.59.x) on April 22 2014, 3:05pm
Reply on April 23 2014, 1:40pm (edited at April 23 2014, 1:44pm):
    You should convert the string you're searching for from UTF-8 to UTF16 (MultiByteToWideChar(CP_UTF8)), then search for the windows and call GetWindowTextW(), and compare the UTF16 strings.

    Edit: or, as Jeffos points out, making a FindWindowUTF8() which calls MultiByteToWideChar(CP_UTF8) and FindWindowW() would be the nicest way to go about this...
Comment...
Question: Couldn't you do your own memory management then rather than using the CRT malloc/free and coordinate memory allocation requests/frees among the subsystems?
Asked by Will (24.234.85.x) on April 21 2014, 9:08pm
Reply on April 22 2014, 12:47am:
    You can call the appropriate version of free(), or a function that calls it, yes... but in general best to just avoid that issue (and for objects, use virtual destructors).
Comment...
Question: Why are you concerned with download size now anyway? Our internet is fast! Static link that bitch and be happy.
Asked by Will (24.234.85.x) on April 21 2014, 5:29pm
Reply on April 21 2014, 9:04pm:
    Just try to keep the whole experience ideal at every step of the way -- not just for end-users, but for us developers too. Static linking the various plug-ins only really added about 300kB to the Windows build anyway, so no big deal. The gotcha would be if you had code which malloc()'d objects in one module and free()'d them in others, but we've been static linking on win64 for a while so it would be an issue there too.
Comment...
Question: Re libc: I tried a few times linking to DDK msvcrt.dll, things looked "good" if the .lib matched the OS version. So are you going to incorporate static linking "policy" to ffmpeg too? You can dig C99-to-C89 for more info, I think it would be better for performance too.
Asked by gio (94.66.68.x) on April 20 2014, 5:53pm
Reply on April 21 2014, 1:16pm:
    I think what it comes down to is that msvcrt.dll shouldn't really be relied on, as you might get different versions with different quirks.
Comment...
Question: Re libc: Just noticed at the latest changelog the avoidance of msvcrt.dll dependency and thought to ask what made you change your mind?
Asked by gio (79.131.47.x) on April 19 2014, 7:19pm
Reply on April 20 2014, 1:50am:
Comment...
Question: Faster load times lead to static linking the C library or something else? Bench: vc13 x86 build on K10 Deneb don't look that good in comparison with the release build, didn't do any extensive testing though. :)
Asked by gio (94.66.27.x) on April 18 2014, 9:15am
Reply on April 19 2014, 4:22pm:
    Hmm not sure what the question is here.
Comment...
Question: Do you find yourself git commit -am often or do you find value in staging changes?
Asked by Will (24.234.85.x) on April 15 2014, 8:24pm
Reply on April 16 2014, 12:51am:
    Depends, sometimes I commit everything on a temp branch then revise later, other times I add -p (when I want to add a fix but not a ton of debug messages, etc). I almost always diff at length before I push, though.
Comment...
Question: Do you use github much/at all? What are your thoughts?
Asked by Will (24.234.85.x) on April 15 2014, 6:13pm
Reply on April 16 2014, 12:52am:
    Occasionally, it's a pretty good service, I like it, but I also like hosting my own.
Comment...
Question: Regarding healthy vs. unhealthy: www.cnn.com/2010/HEALTH/11/08/twinkie.diet.professor/...
Asked by Will (68.104.121.x) on April 14 2014, 3:58am
Reply on April 16 2014, 12:52am:
    Yeah, I sort of think that a normal diet is one that hedges a lot, if something ends up being really bad, at least you get mostly good things elsewhere.
Comment...
Question: Have you ever met JeffOS in real life ?
Asked by Ubik (62.235.212.x) on April 13 2014, 3:55pm
Reply on April 13 2014, 4:56pm:
    Not yet, we've had some Skype though.
Comment...
Question: Why did the world settle on this shitty 1366x768 resolution?
Asked by Will (68.104.121.x) on April 12 2014, 10:37pm
Reply on April 13 2014, 4:55pm:
    I sure haven't! I love my Retina Macbook Pro (especially in Win7).
Comment...
Question: Can we reliably tell in-project MIDI take is opened in inline editor with PCM_source->Extended(PCM_SOURCE_EXT_INLINEEDITOR). Or will it lie when take is open in another ext. editor ? (I can't open MIDI take in ext. editor (bug?) so I can't test it...)
Asked by Martin (93.139.79.x) on April 12 2014, 7:43pm
Reply on April 13 2014, 4:55pm:
    Yes PCM_SOURCE_EXT_INLINEEDITOR(0) will return greater than 0 if and only if the inline editor is open. It will return -1 if inline editing is supported but not currently open.
Comment...
Question: If you recall, what was the most challenging part of creating shoutcast?
Asked by Will (68.104.121.x) on April 11 2014, 6:47am
Reply on April 11 2014, 11:37pm:
    Hmm just learning a lot of new stuff, and documentation wasn't as good back then.
Comment...
Question: Why did you decide to remove the playtime counter in Winamp? I'm pretty sure my jams time is phenomenal now but I of course have no way of confirming.
Asked by John (172.251.73.x) on April 11 2014, 5:44am
Reply on April 11 2014, 11:37pm:
    I don't remember sorry =) I'd imagine it didn't work reliably enough or something.
Comment...
Question: I don't even have to open GUI, just effOpen, effClose and it crashes. Just like it is somehow not loaded correctly. I've already removed unloading as well.
Asked by Franci (109.182.159.x) on April 9 2014, 2:59pm
Reply on April 10 2014, 2:51am:
    Try checking your audioMasterCallback to see if it is being called, and if so, handle that call appropriately.
Comment...
Question: Programming my own VST2 host OSX x64 - having big trouble with Nebula VST plugin, GUI stuck, crashing with effClose etc. Do you remember any special treatment fot this plugin in Reaper, which btw. works perfect. Other tested plugins work here. Thanks!
Asked by Franci (89.142.247.x) on April 8 2014, 7:08am
Reply on April 9 2014, 2:54pm:
    I don't think there was anything specific I've had to deal with it. Since you are on OSX x64, make sure you're closing the configuration window correctly (effEditClose, then close your parent NSView probably). Probably good to put all of that in an autorelease pool. Also you should never really unload the VST, because of autorelease pools and system retained objects...
Comment...
Question: is there an example of how to use virtwnd out there?
Asked by olilarkin (81.100.230.x) on April 7 2014, 7:14am
Reply on April 7 2014, 1:38pm (edited at April 7 2014, 1:40pm):
    Most of the examples I can point you to are pretty specific to the application in which they are used:
    • SnapEase uses it (uses a WDL_VWnd per image, plus a bunch of WDL_VWnd children for the image controls).
    • SWS extension use a and b (via JeffOS)
    (all from memory, function names may be slightly wrong): WDL_VWnd is a class for simple lightweight composited view hierarchies. To use, other than creating the class and using SetRealParent() for the root WDL_VWnd, you'd call WDL_VWnd::OnMouse*() on the relevant WM_ mouse messages, and WDL_VWnd::OnPaint in WM_PAINT, etc. There is also a WDL_VWnd_Painter to help with painting, though its use is not strictly necessary (I believe you can just draw to any LICE_IBitmap with the right tweaks to logic). Hope this helps... I suppose I could put together a simple example in the LICE test app, or something too.
Comment...
Question: Ah, it was just a rounding error so I thought you use something fancy (as it seems you do for drawing white piano keys to align then with note row every 4th/3rd key). I was doing this: value = (int)(mouse/laneH * 127) when I should have used this: value = (int)(128/laneHeight * mouse). OCD is a nasty thing, but it's for greater good (trying to let ReaScripters know where the mouse is :) Mandatory question: did you ever try replacing coffee with black tea? It's definitely much more healthier alternative!
Asked by Martin (78.0.233.x) on April 7 2014, 12:14am
Reply on April 7 2014, 12:58am (edited at April 7 2014, 1:03am):
    What's wrong with coffee? Also, I don't like to describe foodstuffs as "healthy" or "unhealthy" because I think it is misleading. I might be healthy or unhealthy, but that piece of pepperoni pizza is just a bunch of nutrients and other stuff, which may or may not be ideal for various parts of my digestive system, but to characterize it as "healthy" or "unhealthy", or compare ("healthier than", "less healthy than") is a mistake. Anyway :)
Comment...
[newer questions][unreplied] | [replied] | [recent comments] | [all]
[older questions]
Copyright 2024 Justin Frankel. | RSS