<< >>
justin = { main feed , music , code , askjf , pubkey };recent comments
[ present ... 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ... past ]
March 29, 2007
freeform jam with chr

March 27, 2007
freeform jam with brenchr
chr - 1 -- [7:59]
chr - 2 -- [10:58]

March 25, 2007
freeform jam with newtbider

March 24, 2007
brennewt - 1 -- [42:17]
brennewt - 2 -- [28:26]

March 14, 2007
freeform jam with brenchr

March 11, 2007
kevbiderman - 1 -- [22:49]
kevbiderman - 2 -- [59:50]

March 3, 2007
chrnewt - 1 -- [32:06]
chrnewt - 2 -- [6:14]
chrnewt - 3 -- [12:52]

March 1, 2007
brenchr_newamp - 1 -- [68:58]
brenchr_newamp - 2 -- [67:23]

February 21, 2007
freeform jam with brenchr

February 18, 2007

February 16, 2007

February 12, 2007

Two tasty things:

this little mention of REAPER was nice to read.

And, also, I just got a dual quad core xeon machine.. 8 2.33ghz cores. Wow. Insanely powerful. Quieter than I expected, too. Mmmm. Thank you, Dell (can I have my next one for free for that plug?).

REAPER hauls complete ass on this box. Amazingly fast, and it can use nearly all of the processing power available. I did some testing on my Athlon64x2, and it could do like 12 tracks of FX (reagate+reacomp+reafir+reaverb), and this thing can do over 50. Having flawless audio playback with 8 cores humming away at 95% of each used is a beautiful beautiful thing. Here's a screenshot.

Now when you can get one of these for $1500, then it will be insane. I'm guessing late 2008.


February 7, 2007
freeform jam with brenchr

January 31, 2007
brenchr - 1 -- [64:21]
brenchr - 2 -- [22:42]
brenchr - 3 -- [32:58]

January 29, 2007
freeform jam with chrdrum2

January 28, 2007
biderchrkev - 1 -- [75:10]
biderchrkev - 2 -- [52:29]

January 25, 2007
brennewt - 1 -- [36:59]
brennewt - 2 -- [27:09]
brennewt - 3 -- [3:27]
brennewt - 4 -- [9:39]

January 23, 2007
happy new year!

OK it's a little late...

Had an annoying day not too long ago where our firewall crapped out.. so I put IPCop on an old P3 server.. IPCop is a very small linux based firewall. It works pretty well, though there are a few annoying things-- the big thing is that there's a lot of things you'd want to do, that just aren't exposed via the web interface.. so you end up having to dig through the man pages for iptables, and so forth.. if they just let you do a lot of that, then it would be outstanding.. we'll see how it fares..

REAPER got some big performance upgrades in the last month. In all of the work I had done in the past, there was a lot of code that was focused on being correct, rather than fast. There were lists that were stored in random or worse order, that were searched linearly.. oops. Keeping the list sorted such that the most used items are at the beginning, took care of a lot. Also we had some instances where we'd check to see if an item was in the list, when it would usually not be, so we'd scan the whole list... anyway, dumbness, but some simple cleanups, and *bam*, usable at 32 sample latency, lower CPU use.. woot.. Also realized that FFT(a+b) = FFT(a)+FFT(b), which enabled some huge optimizations to ReaVerb (making the impulse length less relevant, just means more complex number multiplications)..

REAPER also got a new plug-in called ReaTune, which acts as a tuner, and a pitch corrector. It's not really done yet, but it's already pretty usable, and has automatic and manual modes, and the ability to send MIDI events on pitch detection, which is badass.

I'll omit my obligitory "I wish other companies would be better about support for software that's other than the total mainstream" rant... I guess that's the whole point of REAPER, anyway.. to help change that.. we'll give it time..

Here are a few songs from new years. The second two were live, the first one not:


January 22, 2007
freeform jam with brennewt

January 14, 2007
freeform jam with craigbrenjoshdanchr

January 11, 2007
freeform jam with brenchr

January 8, 2007
freeform jam with bidersteve

January 6, 2007
brenchr - 1 -- [4:12]
brenchr - 2 -- [111:27]

January 5, 2007
chr - 1 -- [25:43]
chr - 2 -- [24:14]

December 31, 2006
kevwienercraig - 1 -- [37:45]
kevwienercraig - 2 -- [9:51]
kevwienercraig - 3 -- [34:39]
kevwienercraig - 4 -- [13:46]

December 29, 2006

December 28, 2006
freeform jam with biderman

December 27, 2006
freeform jam with brenfritz

December 26, 2006

December 20, 2006
freeform jam with fritz

December 17, 2006
freeform jam with craig

December 16, 2006
freeform jam with kevin

December 15, 2006
porting frustration

(9/10 on the boring scale)

So I just spent the last day or two (I honestly can't remember) getting Jesusonic to run on OS X/x86. I already had it running on OS X/PPC, so I figured it would be easy. Wrooong...

Jesusonic works by compiling code on the fly into native assembly. It actually does this by glueing together stubs of functions (the most critical which are written in assembly for each platform) into code that it can execute. Overall the code it generates is not terribly optimized, but it's definitely not slow either.

So this is what I found in porting JS.

1) the compiler bitched about my assembly code trashing EBX. Turns out, EBX is used for position independent code (PIC) addressing. So I figured I should probably not be messing with EBX, and that the OS needed it. With a bit of additional work on the compile side I got it to not use EBX, but in the end it turned out that EBX only really needs to be preserved within functions that use it, and for my uses I really could use it. Oh well. Time wasted, but hey kinda useful. Stuff still wasnt working right.

2) Many of the assembly stubs for particular functions needed to call C code, whether it be a C library function like pow(), or some of our own code (FFTs, file reading, accessing memory, etc). Since GCC was generating my functions as PIC, the extended assembly syntax failed to assemble (ending up with assembly like "movl ((symbolname-$LABELBLAHBLAH(%ebx))), %edi", etc. So turns out MY compile step needs to actually go generate absolute addresses at runtime, instead of at compile time. Fair enough, that took an hour or so, and a bunch of testing/fixing to make sure that nothing broke.

3) And this was the big bitch, and it took me a long time to figure out. Turns out, and this is well documented, you have to keep the stack aligned to 16 bytes. I would call pow(), and it would end up trying to do an sse load/store at an unaligned address, and things would proceed to blow up. So I had to go update all of my stubs and functions to keep the stack nicely aligned, which is probably not a bad idea anyway. Once I finally got them all correct, I tried it out, and... IT still didn't work. So I ended up spending a lot of time with GDB (Xcode's debugger won't let me see registers, argh), and figured out that, indeed, the stack was aligned when I called my generated, code, but no, the stack wasn't aligned when it got to pow().

After changing some build settings, I found that with -O0, it did in fact work. So then I did some gcc -S -O0 file.c and gcc -S -O2 file.c and compared the generated code for the assembly stubs, and it seems that with -O2, gcc itself would let the stack get unaligned , as long as my stub wasn't obviously calling another function.

I looked for a long time to see if I could disable this in gcc, and I gave up, so on OS X/x86 Jesusonic will have this code for each stub:

pushl %ebp
movl %esp, %ebp
andl $-16, %esp

(run code)


that way, whenever I call out, I can ensure that the stack is aligned, no matter what kind of crap GCC is generating for the function.

The better way of dealing with this would probably be to write these functions in assembly directly, or improve the code that cuts up the stubs to have it filter out the stack frame setup that GCC produces anyway, but hell I'm too lazy and this works and it's reasonably fast enough as it is. And most importantly, I get to get back to the fast, satisfying building of UI and porting of easy things.


December 9, 2006
mac porting...

In August I began cleaning up REAPER's source code, and began separating the platform-specific code (mostly UI) from the mostly-portable code. Ten days ago, after 3 months of doing that while also adding new features and releasing new Windows versions every few days, I began spending a great deal of time actually writing a bunch of Cocoa code so that we could have it run on OS X.

It has gone very well, expect some preview version around Christmas.

I love it when this stuff goes faster than I had expected. I'm going to detail some of my experiences here.

There's a lot to like about programming on OS X, but there's also plenty of idiocy.

CAUTION-Boring programming discussion follows. These are mostly things that I have sort of, but not completely correctly, working.

For example, if you wish to draw text, there are countless ways to do it, and at least for what I wanted to do (emulate DrawText for our GDI emulation layer), I still haven't found a way that works as I want. The first way I tried was using CGContextShowText, which worked, except the only way I could find to measure the text before, or after drawing it didn't seem to work (using CGContextSetTextDrawingMode with kCGTextClip to modify the clip path, then get the bounding rectangle of that). So without any way to measure the rendered text, I had to find another way. I could use NSAttributedString to draw, but the first problem is that I wanted to supprot drawing to an arbitrary CGContext, which may or may not be the "active" context. Then, suggested to me, was to use Carbon's HIThemeDrawTextBox etc, which isn't really documented at all (other than in the header file and some examples). HIThemeDrawTextBox works, except the font I selected using CGContextSelectFont isn't used. It appears I could use some other API to set the font, but I havent spent that much time on that. Why can't there just a be a simple, working way?! At least win32's DrawText just works (though I hear the internals are a nightmare).

OK I won't go too much more into those sort of things. The good things are some things are just easier. Anytime you want to modify the behavior of something, it's WAY easier, since you can do a simple objective C subclass, rather than having to do the tricky hacks we do in Windows. Porting the customizable keyboard code to OS X took an hour or so. Getting it to work originally on Windows took many times that.

Rendering with Quartz just looks nice, too. The plain Windows GDI calls just look harsh and cruddy in comparison.

Here's an interesting challenge: on Windows, REAPER renders its play cursor (the line that moves constantly with playback) by using XOR drawing. It renders it by flipping all of the bits in the line, then when it needs to erase the cursor (in order to draw it in the new position), it can just XOR again. Win32 makes this available by using DrawFocusRect(). Anyway, on OS X this isn't possible, to my knowledge, because the system handles so much of the drawing process. I didn't want to be responsible for updating any of our track view at 30fps+, so I had to come up with another solution. After some experimentation, I found that you could create a new NSWindow, make it a child of the main window, and move it around as the play cursor. And it works, the system handles redrawing the track view, from its cached rendered version, so it's FAST, probably hardware accelerated, and you can do neat things with the alpha channel of the cursor. The verdict: while you can't do oldschool things like XOR drawing, you can do things sexier.

So to aid porting, I've created a new part of WDL (our general reusable code library, pronounced "whittle"), called SWELL (Small Windows Emulation Layer Library or something). So far it emulates (at an API level), portions of the Windows GDI, menu API, MessageBox, ini file (GetPrivateProfileString etc), and a bit more. Eventually we'll probably BSD license SWELL, too.

One interesting thing in SWELL is a set of macros and small functions that let us paste in menu definitions from a .rc into a C++ source file and have it generate a HMENU for it. Fun use of the C preprocessor, if you ask me.

Anyway, this is all challenging, and as a result, mostly fun.

December 9, 2006
programming style and process

I previously said I was planning on writing an article on coding style etc, and while I haven't gotten around to finishing it, I'll go ahead and discuss some of it.

1) If you program, and you're working on something that you expect to be working on for more than a couple hours, use version control. The benefits are countless. Safety, yes, but also, it gives you the ability to easily see everything you've done (if you're religious about checking your code in often), and even more importantly (to me), it lets you diff and review your changes before checking in. I do this all of the time, to make sure everything I did was everything I wanted, and that I didnt fuck anything up.

2) Don't be afraid to let things get messy. A very common (and valid) sentiment in programming is to avoid "premature optimization", where the programmer spends too much time too early on some part which may or may not even need it, introducing complexity for the sake of possible speed improvements etc. I don't hear people say this much, but I think you should take the same stance on organization. If you're programming software, and you need to add some new function for some task, don't be afraid to just toss it in near where you need it, and see what happens. Don't go creating tons of new files every time you need them. Moving code around for organization later is easy, and if you don't do it too soon, you'll a) stay focused, and b) save time in the event that the code you added wasn't used. Which brings us to the next point:

3) Don't be afraid to toss out code that you've written. Sometimes you have some problem and code a solution for it, and at the end of it, you just don't like it. If you don't like it, and think you could do it better the second time, do it the second time.

4) Going back to point #2, don't obsess from the beginning about reusability. Write code that you need, and once you're using it and see how you actually need to reuse it, then go make it reusable.

5) Finally, evolve your code. Getting something to the point of limping is the hardest part, so you should try to get to it as fast as possible. Once you're there, progress is much faster. It's like waiting for a minute to pass. If you look at a clock with a seconds hand, it goes quick, but if you just stare into space, it takes forever. Get to the point where you can see progress, then enjoy it (and test your work often).

More later, perhaps...

December 9, 2006
oh, and

I added a super simple thing to prevent spam on these comments, and it has worked perfectly. We'll see how long that lasts...


December 5, 2006
brenchr - 1 -- [105:47]
brenchr - 2 -- [20:47]

November 25, 2006
freeform jam with brenjoshshawnjoncraignewt

November 20, 2006
freeform jam with brenchr

November 18, 2006

I wish I could say that this whole time was spent on vacation, but unfortunately it wasn't. We did have a fantastic time in England for our friends Jonathan (ha) and Catherine's (ha ha) wedding, but when we got back, after a few days rest, I got hit by a nasty something, so I've been out of commission this past week. I seem to be coming back to normal, finally...

It's been nearly a week (if I get through tomorrow it will be a full week) since I've had coffee. What should I do? I like coffee so much, but I often feel so at its mercy. It also pains me that one of the top coffee establishments in the city moved into our block. I can't live here and not get their delicious nectar! Can I?

A year ago today I started at full speed on REAPER. I had done about 5 hours worth of stuff a couple months before, but decided at this point last year that it was time. Whee. It keeps getting better and better. We'll have to do something special sometime, maybe around Christmas since that was the first public release.

Umm what else? I should update this more. Oh yes my coding guide, well, I may just do a little chapter at a time, cause I wrote a bunch of it and it's all pretty incoherent and wordy, so I better spread it out a lot. Maybe I'll do the first paragraph in a post soon.


November 12, 2006

November 11, 2006
freeform jam with brennewtshort

November 8, 2006
brenchrnewt - 1 -- [15:00]
brenchrnewt - 2 -- [44:46]
brenchrnewt - 3 -- [7:23]

November 7, 2006
freeform jam with kevin

October 30, 2006
the real vacation

...begins. Hand feeling a lot better, yay.

When I get back, I'll likely finish and post an article on coding style and methodology that someone convinced me to start...


October 29, 2006
chr - 1 -- [28:40]
chr - 2 -- [7:54]

October 21, 2006
freeform jam with bidermanmoogfun

October 19, 2006
RSI or something

time to take a few weeks off. it's been a productive 11 months...


October 19, 2006
kevin - 1 -- [21:04]
kevin - 2 -- [10:15]

October 16, 2006
freeform jam with shawnjon

October 14, 2006
birthdaypartypoo - 1 -- [12:58]
birthdaypartypoo - 2 -- [28:05]
birthdaypartypoo - 3 -- [54:30]
birthdaypartypoo - 4 -- [32:21]

October 13, 2006
friday the thirteenth

October 11, 2006
brenchr - 1 -- [124:17]
brenchr - 2 -- [4:46]

October 10, 2006

October 5, 2006
freeform jam with brenchr

October 2, 2006

October 1, 2006
craig - 1 -- [2:30]
craig - 2 -- [39:41]
craig - 3 -- [27:39]

September 29, 2006
brenchrdan - 1 -- [38:17]
brenchrdan - 2 -- [31:13]

September 27, 2006


Whee too many margaritas... Where to begin...

September 27, 2006

Damn, 20 versions since my last post.

Propellerheads finally responded and have since been responsive (though it took them 6 whole months to get there, ick), so ReWire will be in REAPER 1.21, yay! Overall I'm still very excited, and every day this feeling continues and/or grows. Christophe is working on something that will be VERY exciting for a lot of people, and I'm still planning on (though lately slacking on) the mac port.

Something I have to say is that I waited WAY too long to make REAPER support user-skinnable icons. Doing this got a few people making some AWESOME artwork, such as this, and required very little effort on my part (ok well a day of work or so). Note to self: next time just make it easy to switch icons out (on the fly) from the beginning.

September 27, 2006

Here are a couple of songs that David Wiener and I made (using REAPER, mostly), that I dig:

A Little Pop Will Save Us All (for a good time, listen closely to the lyrics)

Love Somebody

Anyway, until next time!


September 21, 2006
freeform jam with kevin

September 20, 2006
brenchr - 1 -- [51:57]
brenchr - 2 -- [79:16]
brenchr - 3 -- [33:47]

September 18, 2006
freeform jam with brenchr

September 17, 2006
brenbidernewtx2 - 1 -- [124:17]
brenbidernewtx2 - 2 -- [7:58]

September 14, 2006
kevin - 1 -- [4:37]
kevin - 2 -- [62:30]

September 13, 2006
freeform jam with newtnewtchr

September 10, 2006

September 9, 2006
tromboning alone

September 4, 2006
freeform jam with brenchrjosh

August 30, 2006
freeform jam with brennewt

August 23, 2006
I made a neat web page...

...showing how I've spent the better part of a year.

Yay for evolutionary software development.


August 23, 2006
freeform jam with chrnewtmayor

August 21, 2006

August 16, 2006
brenchr - 1 -- [22:05]
brenchr - 2 -- [76:51]

August 13, 2006
freeform jam with craigbiderstetc

August 9, 2006
THAT time of the month, again

So apparently I can only manage to update this once a month or so. Phew. REAPER 1.0 beta 0 is out. Yay. Some of the things that I did recently with it made my head hurt, but now it seems to have turned out pretty well. yay.

I'll save dumping the things I've been irritated with here for later, I gotta run now for a day or two.


August 7, 2006
freeform jam with brenchr

August 6, 2006
bider - 1 -- [60:56]
bider - 2 -- [9:41]

August 2, 2006
freeform jam with brenchr

August 1, 2006
freeform jam with brenkev

July 24, 2006

July 19, 2006
brenchrnewt - 1 -- [53:10]
brenchrnewt - 2 -- [43:32]

July 15, 2006
freeform jam with bidercraigstewart

July 14, 2006
freeform jam with brenchr

July 12, 2006

So we had an apparent power outage where this box is the other night, and since then shit's been wonky.. either someone is DoSing us, or something about the first reboot in 4 months seems to have made this box lose network connectivity. ugh. Either way, it's completely balls.

So tired of coming in to restart it...



July 10, 2006
freeform jam with bidernewtchrcole

July 7, 2006

July 3, 2006
chrnewt - 1 -- [28:27]
chrnewt - 2 -- [63:51]

July 1, 2006
freeform jam with brennewt

June 26, 2006
brenchr - 1 -- [3:20]
brenchr - 2 -- [85:24]

June 22, 2006
brenchr - 1 -- [74:51]
brenchr - 2 -- [31:34]

June 13, 2006

June 12, 2006
freeform jam with brenchrconcertforparents

June 11, 2006

I guess I let a month go by without updating. I've just been having a good time, what with all of the typing.. I'm still excited about REAPER, so shit's good.

I've been writing FX plug-ins for REAPER lately, too.. ReaGate is nearly done, ReaComp is almost working, ReaFir (FFT EQ) is nearly done, and ReaVerb is underway. ReaVerb will be a convolution based reverb, and will offer support for loading of impulses from files, as well as generating impulses from parameters, and combining and modifying any of those impulses.. I'm thinking of it like an AVS for convolution..

We (Christophe and I) decided that our goal for 1.0 release is sometime in August, which shouldn't be too hard to hit-- lots of work, but relatively straightforward. There are a few things that need to be done that I'm not quite sure how they will get done, but I'm confident enough that we'll figure it out...


June 9, 2006
freeform jam with brenchrjonnewtbidermikewen

June 8, 2006
freeform jam with brenchr

June 1, 2006

May 27, 2006
freeform jam with brenewtchr

May 22, 2006
freeform jam with brenchr
freeform jam with brenchrfrancisjosh

May 15, 2006
freeform jam with brenchr

May 14, 2006
biderman - 1 -- [37:29]
biderman - 2 -- [24:39]

May 13, 2006
brennewtkevcole - 1 -- [11:00]
brennewtkevcole - 2 -- [73:43]
freeform jam with newtonkevin

May 12, 2006
bitching and moaning

Can I just reiterate (really quick before I go to bed) how terrible the DXi and VSTi SDKs are? They make it impossible for people to write solid hosts, and make for tons of lousy plugins that don't handle any host that isn't PERFECT. All they need is better documentation and developer discussion (so developers of hosts can know what plug-ins use to do things, and developers of plug-ins can know what hosts are doing). For example, after one email from the developer of jamstix, I got it working in REAPER. If only the FL Studio devs would mail me (who am I kidding, but I'd love to be proven wrong)...

Since we're still waiting to hear back from Propellerheads on the Rewire SDK, we may just have to do something of our own to add rewire-like functionality. Perhaps we can call it ReaRoute, and perhaps it will work with tons of other software, without them having to do a thing. Mmmmm. Lots of code to write.

It just pisses me off to no end how all of these audio software companies don't care about their users. They care about them, but keeping them just happy enough to get some of their money. Fuck that.


May 4, 2006
freeform jam with chr

May 2, 2006

April 29, 2006
freeform jam with brenbidercraig

April 27, 2006
the two of us are very happy...

...that the rain stopped.

I think I need a few more days of not coding. Must... regenerate.. brain...


April 26, 2006
freeform jam with brenewtbider

April 24, 2006
brenchr - 1 -- [64:10]
brenchr - 2 -- [60:07]
brenchr - 3 -- [25:23]

April 23, 2006
freeform jam with biderkevin

April 17, 2006
freeform jam with brenchr

April 12, 2006
and here we are.

...where to begin. Tom got married last weekend. Was one hell of a fun weekend. I was a bit worried it would be too uncomfortable, out among the orange trees, but the weather turned out great, Brennan and Isabelle brought an RV, and we all had a good time (and punched oranges).

Got to fly the little RC heli out there too, which was fun.. so when I got back I finally installed the upgraded symmetrical rotors, new motor and heatsinks, and LiPO battery and voltage alarm. Flew it inside today, though didnt do anything fancy since I'm not that good yet.

April 12, 2006

I heard back from Mackie, with a response that stupified and angered me. They only license documentation for the MCU under NDA to select companies (as in, not us). They don't seem to care about their customers, just their own (less than obvious to me) interests. I can only hope I don't get the same nonsense from Propellerheads, because I think people using REAPER will want Rewire more than full MCU support anyway (REAPER already supports the MCU somewhat, but without doing a lot more research it can't do all the fancy things that the MCU is capable of). Sigh. The pain of trying to enter a market that is very established and saturated. But I'm only mildly deterred. If Propellerheads *does* dick me around, I will do one of two things-- either go to Stockholm and try to convince them with beer (though don't get any ideas, guys), or just do what I've been meaning to for a while, and port JACK to Windows.

April 12, 2006
MacBook Poo

Speaking of Windows, after BootCamp was released, Steve convinced me to get (at a discount at least) a MacBook Pro. So I did. For running OS X it's pretty good, but as a Windows XP laptop it really kinda sucks. There's a few driver issues that need fixing (no backlit keyboard in windows, sound always goes out speakers, using the built in camera causes BSoD, etc), but the big hardware issue is that the Mac keyboard is lacking keys. Specifically: insert and backspace(delete). I did find some good 3rd party utility that does help a lot allows all sorts of remapping, and enabled the mac's FN key. And finally, the thing gets HOT. I guess that's to be expected with 2x 2ghz cores, but still. I got spoiled by my little Sony's 1ghz P-M that runs nice and cool (and granted, slow).

Oh yes, and southpark this week was SO awesome.


[ present ... 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ... past ]
search : rss : recent comments : Copyright © 2021 Justin Frankel