Function Menu
Check out the New Wiki

BushidoHacks.com

You now have the power to defend the earth like never before!

20080416

The Start of Something Big!

Finally! A real program I can call really be proud of.

My audio program works!

There was some difficulty at first reguarding something about the device /dev/dsp but it turns out any program that uses KDE squats the device for KNotify or some other program. One more reason to use GNOME as Linux's GUI, I guess.

This first program I'm trying to get the computer to Play a little of Pink Floyd's "I Wish You Were Here". (About 8 notes, if I recall.) It is a simple guitar tab, and guitar is very similar to piano only the strings are spaced by about 6 notes in the G chord. (It's been a while since I've played any major musical instruments, so bear with me on the technical terms.)

Currently, the sound that I get is a little limited. I'm not exactly using a Moog.

This is the start of something big!

Labels: , ,



posted by Bushido Hacks 4/16/2008 04:51:00 PM (0) comments top

20080414

'Allo, ALUT! - Click!

I finally got around to creating my first program using sound.

While this may not be something to be excited about, it is a milestone in my opinion.

For years, I've been trying to figure out what I can use to create my own music using the computer. Then I found out a few weeks ago about MarioPaint Composer (MPC), based on the music program from the SNES game Mario Paint. The big let down of course: No version of Linux. Windows and Mac users should definely get into this easy to use program that will probably be appended to the Free Software List.

So what is there for the Linux users? Lots of softwares, mainly stuff that is still in development or requires external hardware. But this is for people with more experience in music. To them K.I.S.S. is a rock band rather than an acronym.

I'm finally on the verge of creating a program that I've been looking forward to making that does what all the other softwares other than MPC have failed to do: Create a very simple software sythesizer for the computer. No Keyboards or Drums to hook up. Nothing fancy or dumbed down. Just a program to turn the computer keyboard into a piano keyboard. If it works (and it should), then I'll think about adding all that fancy stuff.

The software that is going to help me do it will be OpenAL Utility Toolkit (ALUT), based on how the OpenGL Utility Toolkit (GLUT) was designed.

First off, there is a simple Hello, World program that they have. The one below has been modified for C++

/* helloalut.cpp */
#include
#include

int main (int argc, char **argv)
{
ALuint helloBuffer, helloSource;
alutInit (&argc, argv);
helloBuffer = alutCreateBufferHelloWorld ();
alGenSources (1, &helloSource);
alSourcei (helloSource, AL_BUFFER, helloBuffer);
alSourcePlay (helloSource);
alutSleep (1);
alutExit ();
return 0;
};


Next the saving part. I think it is time to show off how to create a simple makefile and use it. Note that TABs must be used not spaces when indenting commands. Because of this blogging software's limitations, any line thia is indendt with space should be denoted as a tab character.

# Makefile
helloalut: helloalut.o
g++ helloalut.o -lopenal -lalut -o helloalut

helloalut.o: helloalut.cpp
g++ -c helloalut.cpp -o helloalut.o


Thanks to this quick lesson in how to make Makefiles, I now know that it is unnecessary to enclose modules using -Wl--start-group and -Wl--end-group when linking modules. Ofcourse this may be limited to the Linux operating system, but it is a significant change that should be ammended to the GCC tutorial.

So what does this Makefile do? Well for starters, the default name for a Makefile is Makefile. The make program is the prgoram that used to install or remove prgrams directly from source on Linux and UNIX operating systems. Thus it is a good idea to keep the source files when you use make to install a program. Makefile can have a different name but it is probably a better idea just to use the default. Ergo, there can only be one Makefile per directory where there is a program to be installed.

The above Makefile would do this in the console:

g++ -c helloalut.cpp -o helloalut.o
g++ helloalut.o -lopenal -lalut -o helloalut


In the more fancy projects there is generally a couple lines added to removed the software that was installed which is generally make clean, but I'll have more details about that when I update the programming tutorial later. Stay tuned.

In order to use the Makefile, you should be in the directory where the Makefile is. So cd to the directory where the source is.

The fancy programs generally have a shell script called configure that is in the directory that is written to check if all the components for the software that is to be install can run. Before the Makefile is executed, run ./configure. You don't need a configure file to use make, but it is helpful if you are writing something fancy. Right now, the Makefile that is being discussed in this blog entry is sutable for just one computer.

So we've changed directories, made sure that everything is set to run, time to build the program! It is so very, very simple, If your Makefile is called Makefile, just type this command.
make

That's it. Nothing else to do execpt run that program.

But what about make install? You don't need to worry about that. That's if you are root and want to install the program in /usr/local/, and involves writing more advanced scripts such as the make clean command that undoes a make install. (Come to thing of it, I wonder how I can set up a make update when a new version of one of the fancy programs becomes available.)

Wow! I covered alot of ground today. I hope this helps everyone clear the air about how to use make as well as getting started with using ALUT.

Just remember to K.I.S.S.

Labels: , , , , ,



posted by Bushido Hacks 4/14/2008 01:46:00 PM (0) comments top

20080413

Linux to Blu-Ray: Get It Together!

Now that Blu-Ray has won the battle, it's time for the Blu-Ray Disc Association (BDA) to get with the program.

While I admit Blu-Ray is the latest hardware that is on the market in terms of optical disc drives, and that the price is fair for what they are charging for the drives and discs right now, driver support is needed for Linux.

BDA has two options for resolving this issue the hard way or the right way.

While it will still be another years before the average Joe can afford Blu-Ray, there is still time for the BDA to pull its head out of the sand and see that DRM is bad and that there are other operating systems that can demonstrate the full potential of Blu-Ray technology.

BDA is not a corporation but a union between several hardware manufacturer, movie and video game studios, and video retailers. So why act like a monopoly? If they are sharing with other companies, why not with consumers? The only thing that we want is software support. BDA can still make money from hardware, movie sales, and retail revenue. But they can't make money if consumers can't afford to purchase it in the form of Blue-Ray players or video game systems because their members jack up the price for products.

If this is the purpose of the BDA, then the key code has reason to be found and distributed.

Labels: , , , ,



posted by Bushido Hacks 4/13/2008 07:36:00 PM (0) comments top

20080411

Late April Watch - Click!

Sometime in late April, it always seems to happen. Something terrible that the media will spin their "Lets remember what happen last year" just in time for more "An Heroism".

Hopefully that will not not happen this year. Next year on the other hand will be something different being the 10 year anniversary of The Media's Kneejerk Reaction.

But since alot of bad things often occur around this time of year, I predict that this year it won't be some student with a chip on his shoulder.

Fifteen years ago, the flood of 1993 flooded out much of the St. Louis Area, including my grandparents' farm. But the City of St. Charles, Missouri could likely learn a hard lesson in the part of St. Charles County that is built on a floodplan called New Town.

St. Charles clames that they have build levees to prevent flooding like in 1993 or even 1995. But this is a lie. And with river gagues in Grafton, Illinois, Alton, Illinois, and St. Charles, Missouri set to crest next week above flood stage, is St. Charles willing to bet the house on it?

The Meramec River in South St. Louis County has swallowed Interstate 44 atleast once this year. Given the amount of preciptation that may be in store for us, this is a flood year for the St. Louis Area.

I don't know if it was the construction workers or nature, but the Discovery Bridge (the Highway 370 bridge in North St. Louis County) has moved atleast a foot downstream the Missouri River over those many years. (It may have been the construction workers who made a mistake, but reguardless, the Missouri river has a strong current.) If the rivers flow over their banks there will be nothing lefter but the concrete foundation. It is like a slow moving explosion. There once was a house next to the bridge and the '93 flood swept it away.

Let this be a warning to the people of New Town. You are in danger. Even if it does not flood, flood insurance should be a must have.

Turn around! Don't Drown!

Labels: , , ,



posted by Bushido Hacks 4/11/2008 11:33:00 PM (0) comments top

20080315

Get to know your Elected Officials - Click!

You don't need to go to Washington, DC or your state capital to get to know your elected officials. What you should know is who your elected representatives are.

I recently took a trip to my state capital of Jefferson City, Missouri, to support a group that helps people with head injuries as well as physical and mental disabilities.

The trip rekindled my interest in being involved with state and local politics, as it is at that level individuals have the best opporitunity to have a voice in government. It is also at this level where elected officials understand the issues that are important in your community, not just the issues that are important to a small group of men in a smoke filled room.

Every state seems to have a small little clique of upper brass state officials. It is usually composed of people who are in the greatest position of power or part of a family has had a history of wealth or strong relationships with corporate leaders. At the federal level, it is pretty obvious. At state level not as much. The further down the ladder, at regional district, county, and municipal levels, the greater chance there is for individuals to contact and make friends with their elected officials. The highest level of communication should be at municipal ward or municipal district level. But then you have cities with about 50,000 people where all they do is meet up every other Tuesday and say "I" to whatever proposal the mayor thinks is a good idea making the meetings feel scripted or predetermined.

So the best idea would probably be to get to know who your elected officals are.

Labels: , , ,



posted by Bushido Hacks 3/15/2008 12:22:00 PM (0) comments top

20080304

Gary Gygax rolls his last 20. - Click!

Today is a sad day for any geek, even if you never played Dungeons and Dragons.

Ernest Gary Gygax, co-creator of DND, has rolled his last 20.

The entire community is crestfallen but has expressed their sorrow and their memories of a persons some called friend while others who have never played the game would have called him a friend just the same.

themocaw on the Penny Arcade Forums wrote this outstanding epitaph that is worth sharing.

Suddenly, things didn't hurt so much. The pain was gone, and the darkness as well. The touch of his loved ones' hands faded away, as did the pain.

He was free.

He wasn't sure when it happened, just that it did. There was a burst of light, and a feeling of utter calmness, and then a moment of understanding.

He looked back only once, but already, what had been was fading away. A part of him longed to return, but a voice whispered to him that his time there was over. Something new lay ahead.

But first, there was something he wanted to do.

They were already waiting for him, smiling, just like he remembered. Sheets of paper with arcane symbols and numbers lay in front of them next to glasses of drink and small, polyhedral shapes that glowed in brilliant colors that no human eye could have seen. Faces long since missed. Friends and loved ones that he'd wished he could have seen one more time, and now he could.

There was one empty seat waiting for him at the head of the table.

He took his seat and cleared his throat. Reaching out a hand, he adjusted the shimmering cardboard screen and glanced over his notes.

"All right, guys. Roll for initiative," he said.

Labels:



posted by Bushido Hacks 3/04/2008 09:22:00 PM (0) comments top

20080228

RIPE: Pakistan Hijacked YouTube - Click!

The RIPE Network Coordination Centre describes this weeks shutdown of access to YouTube in Pakistan Telecom as "hijacking". RIPE recorded that the ban by Pakistan were felt worldwide on the Internet, affecting traffic globally.

I believe that our own government does the same thing, but not in such a grandiose scale as what Pakistan did, which is irontic since not too many people in Pakistan do have the Internet, and those who do have it don't like the majority of it.

The thing that governments do not get is that the Internet gets its message through no matter what obstructs it. Communication in general can't be obstructed 100%. There is always that fraction of a point that always gets throught, slips through the cracks. Hence why the government montoring EVERY phone call and tracking EVERY email message is FUTILE. (Tell that to President Bush or President Mushariff or President Putin.)

Because they are too busy tracking Dick and Jane, Osama still runs free. So don't buy into this crap where the government says they are montioring calls in our own country because their are "sleeper cells in America".

There is already a terrorist organization in the United States. It's called the Westboro Baptist Church. If that doesn't say "Tim McVeigh" with the protest at military funerals and the website domains that have been squatted to propogate their hate then the people who pull the woll over our eyes here are not paying attention.

Pakistant can't expect to shut out the Internet due to their religious beliefs because the world does not see things as they do. America can't treat people like prisoners while the real culperates (the corporate politicans (i.e. Bush)) keep stealing money from us because they claim theo don't have the money equipment to find some guy who is hiding in Pakistan.

Even hijacked passengers will fight back and subdue the people who are hijacking them.

Labels: , , ,



posted by Bushido Hacks 2/28/2008 11:15:00 PM (0) comments top

top | Some Rights ReservedRSS FeedSEND E-MAIL!bushidohacks.com © 2004-2008