Making Music and DJing

October 2 2011

So lately I've been getting into music. I've always been into music, but I guess now I'm starting to explore the more creative side of myself. Don't get me wrong, I love programming. I just want to try new things. Before I did it with web design, now it's with music.

I guess I've always been interested in making music, since in middle school I bought a bass guitar, and proceeded to teach myself some songs by ear (and I still do), but I never really got to play with anyone else since I was really specific about what kind of music I liked. I find that this sort of thing is a recurring problem in my life (I have a strong desire to do something, but nobody to do it with), but in order to play bass, you really need to be in a group, so my ambition to be a superstar bass player kind of blew up.

Electronic music, on the other hand, is different. One person can write a whole song and make a bunch of instruments from scratch using a laptop. Thanks to software, what normally would have required a whole room of expensive equipment can now be done after buying some software. Expensive software, mind you, but it's not unaffordable if you were serious about pursuing music production (not to mention there are questionable means of obtaining said software for free).

The learning curve for electronic music is pretty steep. I'm a fast learner, and I had a pretty good musical background, and even then I'm still struggling to learn everything. I guess at the very least I've been having more "aha" moments than I did when I was starting, so that has to be a good sign.

I haven't really made any songs yet, but one thing that I have been enjoying is DJing. With most of my hobbies, I wind up doing some really cool things, and although it's a great feeling to do something cool, it doesn't come anywhere close to the feeling you get when performing in front of an audience. That, and I guess the work I do usually doesn't allow me to directly interact with those who use it. So I guess it's a refreshing change from the things I normally do. I haven't really had any huge gigs yet, but I've always had a boost in self confidence right after playing in public. I can only imagine how I'll feel when I get a larger gig, if that ever happens.

So, here's a set that I mixed live one afternoon (after several takes of course). It may be missing eventually because soundcloud has limited space for each user, but I'm hoping the majority of the people reading this will be able to listen to it.

DJ Hapticflow - Electro House Set by hflw

Posted by Will Riley

1 comments

Read More»

How to Get Rid of Video Tearing (and Other Forms of It) under Linux

June 23 2011

Yesterday I was having problems with video tearing, so I figured I'd write a small guide about getting rid of tearing. I only have an Nvidia card, so if you're using an ATi driver, try and find a similar setting.

Since I don't like writing posts that don't teach people things, I'll give a short explanation of the theory behind the guide. As many of you probably know, X11/X Server is what draws the user interface on Linux (or at the very least, for now). All video playback goes through the XVideo extension for X11. Essentially, it hands off video scaling/drawing to the GPU, since the GPU is more specialised for that sort of thing, and can do it faster than the CPU.

The video starts out by being decoded from whatever codec it's in on the CPU until we get just pixel data for each frame. This is then handed off to XVideo, which then scales the video to the window it's being displayed in, and draws it on the screen. Nvidia's drivers (and likely ATi's as well) interact with XVideo, otherwise it wouldn't be able to "talk" to the GPU (and by talk, I mean send instructions to be executed).

So, what causes tearing? The short answer would be that the monitor and XVideo aren't synchronised using vsync. The long answer is that the screen is refreshing at a given rate (usually 60-75 Hz or times per second), and XVideo is dumping frames from the video stream without regard to this. So, if XVideo sends a new frame to the screen while the video card is sending a frame out to the monitor, we'll see half of the previous frame, and half of the next frame. In short, we get tearing.

How do you fix this? Vsync. Vsync will sync up XVideo and the refresh rate so that it won't push a frame out while the screen is refreshing. Vsync can also be enabled in OpenGL rendering; same principle, just with polygons and textures instead of a video stream. Many people make the mistake of disabling vsync because they get lower fps, when in actuality it's not really adding much overhead when compared to something like dynamic lighting. But that's a topic for another post.

If you were reading the previous paragraphs, what you need to do should be obvious (or at least I hope). If not, here's some directions:

1. Open up the Nvidia settings panel. Click on X Server XVideo Settings. Make sure vsync is checked. For multi-monitor setups, make sure it's syncing to the monitor you're going to be playing back video on, otherwise you'll still have tearing. Go back to the initial page showing the monitor configurations and save everything to your X configuration.

Special note: for one reason or the other, TwinView seems to cause tearing. I'm guessing this is a problem if your screens are different resolutions, but I haven't been able to test it. Try using separate X screens and see if things are still not working. I don't know enough about the Nvidia driver to say why, this is simply what I've found.

2. Make sure your video player is outputting using XVideo. If it's using some other method, we can't be sure it's vsynced. DON'T use OpenGL output unless you know what you're doing, XVideo should be fine in most cases. Here are the settings I have in VLC.

3. If your window manager (eg Compiz) redirects windows, make sure you have vsync enabled in it, and it's using the correct refresh rate. I don't know all that much about Compiz, so I may be wrong here. I find that Compiz has a tendency to not detect refresh rates correctly, but it could just be me. If you're finding compiz is tearing, this may help. Also make sure it's not redirecting fullscreen windows, since it'll add unneeded overhead. Basically redirecting windows involves having the pixel data go through Compiz so it can add effects and such, and if you're watching a fullscreen video, it's unnecessary. If you want to go crazy, you can force all OpenGL apps to be vsynced in the nividia driver settings (this should include compiz). Below are my settings, adjust them to fit your needs (check the refresh rate on your monitor).

Edit: A friend of mine told me this in IRC, so it seems I was a bit off...

edong23: [Refresh Rate is] not the same as the screen refreshing, its the frames per second
edong23: limiting them can impact your quality of all open gl apps
edong23: and video that is overlayed above it
hflw: so what you're saying is that you should have vsync on and max out the FPS?
edong23: yar
edong23: its the number of times it "can" refresh
edong23: this information came to me from the compiz guys
edong23: also, if you use compiz and nvidia, you should use loose binding
edong23: the auto detect refresh rate usually ends up defaulting very low
edong23: so setting it to 60 helps
edong23: alot
edong23: but, setting it higher is better

That should be it. Check your video playback, and if it's still giving you problems, take a look at your settings, make sure they're right. The Arch Wiki page has some helpful information on the Nvidia and ATi pages if you get stuck.

Posted by Will

1 comments

Read More»

Site Redesigned (Again)

June 16 2011

As I mentioned previously, I was kind of disappointed with the previous design. I put this together over the past two weeks or so. This time I was shooting for a very minimalistic, "open" feeling design. The most difficult parts were getting the colors right, and getting the typography right, but I definitely learned a lot from doing the new design. It's also using HTML5, which is a perk.

Hopefully this is the last redesign I'll have to go through for a while. I still have mixed feelings about the new slogan, need to think about it. Knowing me, I'll be tweaking this for the next two weeks until I deem it to be perfect.

I originally had plans for a "social feed" sort of thing on the homepage, but I just wanted to get this up ASAP, since I wasn't happy with the old design. When I have more time, I can always add it in. I also wanted to redesign the blog archive a bit, since I really liked how Usability Post handles things, but I'll get to it eventually. Need to finish Blackpyre and Lucid 2.0 first.

Posted by Will

1 comments

Read More»

Considering Redoing Everything

May 1 2011

Well, as I stated in my post about learning, I need to expect my first iteration to be a failure. I'm considering redoing the design for my personal site. I think the code is fine, but I'm not terribly satisfied with the design. Here are my main gripes:

  1. The design may look good, but it's too busy.
  2. I don't like how content is framed. I rather go with a design that feels more open.
  3. My site feels a bit too professional. It does a great job at selling myself, but I feel like it's not a good representation of myself, since I do far more than just programming.

That said, I'm not sure when I'll be able to redesign with finals coming up, and then personal projects/paid work after that (not to mention I have plenty of slacking off to do).

I have a few ideas for the new design, I'm not sure if I want to go with a dark or light color scheme though. I like how designs with white backgrounds can contrast a clean look with a grungy-sort of look, or just make vivid/bright colors look nice. At the same time, I like the earthy/different feel of a darker theme.

One of these days I'm also going to come up with a new logo and new business cards, but that entails me getting everything else done, so that may take a while. I'm kind of glad that I didn't get business cards made before realizing I wasn't happy with the design though.

That said, I'm definitely looking forward to summer break. I have plenty of things I want to get done that I've put on hold due to schoolwork (once I start something, I can't really stop, so starting something now would interfere with finals). Being able to work on things without feeling the guilt associated with procrastination is a wonderful thing.

Posted by Will

0 comments

Read More»

New Projects Added

April 25 2011

I added some new projects to the Projects section. They're older projects of mine, so they're at the very bottom of the list. The ones I added were the Nexuiz Map Contest Site, the Multitouch Padlock, and the RVC Schools Helpdesk projects.

I wrote a class-based gameplay mod for Nexuiz a long time ago, but I'm not sure if it runs, and if it does, what version of Darkplaces it runs in. I would love to put it up, but I don't know how I'd grab screenshots of it. The old Nexuiz forums were taken down, so I can't get any screenshots that I might have taken of the mod. Maybe I can use the last commit date to figure out the version? The code is on my GitHub account, so if anyone is willing to be a bit adventurous, that would be awesome.

In other news, midterms/finals continue to consume most of my time, and stuff that I need to do isn't being worked on. I have three weeks left of classes, so relief is around the corner. My birthday is also coming up pretty soon, now that I think about it.

Oh, one more thing, I've been thinking about moving from Apache to Nginx, but I'm not sure how well I can get Django working with it. That, and I think I'm using .htaccess files somewhere, but can't remember where. I don't really have the time to fiddle with it just yet, but I probably will down the road.

Posted by Will

0 comments

Read More»

Thoughts On Goals and Learning

April 20 2011

A lot of people I've talked to lately have some sort of goal in mind, but see the task to be too difficult. It's understandable, but a lot of people don't give themselves enough credit. Learning is a lot easier when there's a goal in sight; all you need to do is throw yourself at it blindly, and learn along the way.

The key, however, is that the goal needs to motivate you to to the point of learning. A lot of people lack the motivation, either because the goal seems unattainable, they don't feel confident that they can do it, or some other reason. Honestly though, if you don't start somewhere, you'll never learn. The best way to learn is to fail, so simply accept that your first attempt will be a complete failure, and keep going. Eventually you will refine whatever it is you're working on to the point where it's perfect, or close to it, and you will learn a lot in the process.

When I started Lucid, I knew pretty much nothing about software engineering. I knew syntax, but I didn't know how to write good code. The first working version of Lucid was horrific in retrospect. You can look back in our git repository yourself, and you'll see how terrible it was. But, as time progressed, I picked up on what other programmers were doing (a lot of which was from looking at Dojo's source code), and learned how to properly structure the project in an object-oriented fashion. I would never have been able to learn as much as I did if it weren't for the fact that I was persistent with my goal, and I followed through, despite how bad my first version was.

I should give a more recent example, too. When I was re-writing my site, I didn't really do any web design work. I wanted to design my own site though, because what good is a portfolio designed by someone irrelevant to the work in question? I felt that it wouldn't have been as personal. At that point, I already accumulated a good sense of what I should be doing from reading Aza Raskin's blog, along with articles from UsabilityPost. Although I knew the theory behind what I was doing, I had no idea where to start. I wound up getting really frustrated, but then after I started looking at how other sites were laid out and stylized, what I wanted to do suddenly became clear. More or less, I borrowed the features from the designs I liked, and remixed it using the knowledge I gained from the two blogs. This is within the same vein as "borrowing" the programming conventions and structure from Dojo's developers, and incorporating it in Lucid.

If that wasn't enough, I'll share one more bit that I actually found in a textbook about writing. If you take the average high school student, they will pound out an essay in one sitting, and say it's done. Hell, some college students do that as well. But what separates the good writers from the great writers is the fact that they revise their work. They read their papers over and over, continuing revision until the work is due. Some even end up rewriting the paper from scratch. Although this process involves less learning from example than my previous two examples, it still supports the fact that you should consider your first attempt to be a failure, and refine it from there. And of course, these revisions will consume a lot of your time.

Knowing that the first try would be a failure would probably make anyone a bit hesitant to start, however, one needs to be persistent, and become motivated by their goals (as well as their failures), rather than view them as an impossibility or a hurdle. If anything, they should use their motivation as a means to get over that hurdle.

I wrote this mainly to solidify the theory in my head, so the next time it comes up I can explain it clearly, but hopefully someone reading this finds it helpful. Writing is something I have a tendency to shy away from, mainly because I'll start writing, say to myself "this is a stupid idea to write about," and delete it without a second thought. In that regard, maybe I should take my own advise, and just start writing more.

Posted by Will

0 comments

Read More»

March Update

March 15 2011

I wish I had more time. I really do. Here's what I've got on my plate at the moment:

I probably keep myself busier than I need to, but I digress. The website for the club should be easy, it's just I need to do the design. I'm probably going to go with Plone, since it's written in python, and looks fairly easy to use (I won't be the person posting content on the site for the most part).

The game engine I started over the summer and never finished, then picked it up again during my first semester, then dropped it again. There isn't much left to do now that I think about it (there's also a memory leak in it I believe), so I could probably get it done in a few weeks if I tried.

Lucid 2.0 has been in incubation for a while now, I just need to sit down and plan it out. One component I have solid, but I need to plan out the rest. Let's just say it'll be like nothing any web application has ever implemented before.

The main reason why I need work right now is so I can pay for college-related expenses, but more relevant at the moment would be that HvZ is coming up, and I wanted to buy some gear for it without feeling guilty about it later (I rarely purchase anything to begin with, so my lack of a steady income doesn't help). Right now I'm looking at getting a Nerf Recon, a shoulder holster to modify for it, and PVC parts for building a long-range rifle. My friends take HvZ pretty seriously. There's also some little things that I wanted, like a gamepad for my computer, or a webcam for my desktop. I also have my eyes on a pair of AKG K702s, since I need a good pair of headphones for when my neighbors and/or roommate complain about my speakers (which sound good, but the bass is a bit muddy). Mind you, these would never leave my room if I were to get them. Ever.

I'm just hoping I can get my act together and finish the engine and the site in like a month-ish. I just need to get stuff off my plate at this point. I don't mind working on these projects, it's just at times I spread myself too thin, and people pull me in too many different directions. Or maybe it's that I pull myself in too many different directions. Meh. I suppose it's better than idling my time away though.

Posted by Will

0 comments

Read More»

New Website

March 2 2011

If you've been talking to me over the past few days, I've probably mentioned the fact that I was going to redesign my site. Well, it finally happened. I'll end up writing more about it when I find the time.

Posted by Will

0 comments

Read More»