Ubuntu Studio

May 11th, 2007 Ubuntu Studio was released and I finally decided to get my hands on it. Downloading and installing just like all the other Ubuntu Alternate installs. After installation was complete I immediate started messing around with many audio packages included. First one I started with was JACK.

JACK is used to change sound routes through your computer. In my case I first had ZynAddSubFX Software Synthesizer open and was messing around with the many different sounds it comes with. I then opened another cool app called JACK Rack and Patchage. JACK Rack allows you to add thousands of diffrent effects into the main mix. Then through the Patchage i connected the out put of the Synthesizer into JACK Rack then took the output of JACK Rack and connected it with the audio out put of my sound card. Heres a screen shot of what was going on.

Audio Equipment

I can now also take the input from the sound card and patch it through to the JACK Rack and guitar effects.

The one thing I didn’t like was not having control on volume with Audacity. So I went out on the net and found a package called Ardour. Ardour is a multi track recorder. Through JACK I can connect diffrent audio devises to Ardour. This means that if I have 4 USB Mic’s and 2 Guitars I could plug them into my box and connect the devices to Ardour. Then Ardour can record all 4 Mic’s and 2 Guitars individual. This is very nice for editing later on. You can ajust levels for certen Mic’s or guitars. Very cool.

Audio Recording

Now of cores this all uses a fair amount of CPU. But if your using digital inputs (ie. FireWire recording devices, USB preamps, etc) it takes allot of the stress off your CPU. If you are looking into making a small or large audio editing studio I would strongly consider a Digital Mixer with FireWire out. I would also buy a high end motherboard and processor.

I have a bunch of broken USB PS2 head sets that I’m hopping to use for Guitar and Mic digitizers. I will make sure to document the hole experience.

The one thing I found about Ubuntu Studio is there is no good video editing apps. They all suck. I went out on the net and found A good one, but really it sucks to. I will get back to you if I find any good ones.

All-in-all I enjoy Ubuntu Studio. If your into audio editing or doing podcast I would strongly recommender Ubuntu Studio for you.

C++, C and a Parallel port

About a month ago I went out and purchased a book on C++. I went through it and learned the basics. Yesterday I began work on a program to control inputs and outputs on the LPT port. The interesting part about this is I plan to wire some relays to control back yarded lighting, a few pond pumps and mabey even pool pump and heater.

In this testing stage I just wired some resisters and LED’s onto pins 0 to 7 on the parallel connector. The LED’s I used were 1.5V so I used some resisters to bring down the 5V. If you need any more detail on this feel free to e-mail me.

It’s fairly simple to make the program to run the parallel port. You just have to do some math to figure what values you send out to make certen LED’s light up. The following code is what I used to make sure all 8 outputs are working. It justs randomly flashes the LED’s wired to the parallel plug.

#include <stdio.h>
#include <stdlib.h>
#include <sys/io.h>

#define PORT 0x378 /* use your port address here */

int main(int argc, char *argv[])
{
	int r;
	double l;

	if (iopl(3)) /* you could also use ioperm(PORT, 1, 1) */
	{
		fprintf(stderr, "couldn't get ports,\ntry running as root\n");
		exit(1);
	}

	srand(time(NULL));
	while(1) /*use Ctrl+C to exit */
	{
		l = (double)rand()/(double)RAND_MAX*256;
		r = (int)l;
		outb(r, PORT);
		usleep(500000);
	}

	return 0;
}

I saved the following as test_lpt.c. The compiled the file with the fowloing command.

gcc -O test.c -o test_lpt

Then I executed the new test_lpt that I just compiled and made into a program.

sudo ./test_lpt

Now I had to use sudo because the parallel port only works if your logged in as root in the terminal. The program is a continues loop so to escape out of the loop just press Ctrl + C to shut down the program.

The next program shows how to light up LED’s one and two. We will be sending out a value of 3 to do this.

#define PORT 0x378 /* use your port address here */

int main(int argc, char *argv[])
{
if (iopl(3)) /* you could also use ioperm(PORT, 1, 1) */
{
fprintf(stderr, "couldn't get ports,\ntry running as root\n");
exit(1);
}
outb(3, PORT);
usleep(500000);
return 0;
}

The one peace of code we will be looking at is outb(). The first value, 3, is what value we are sending out to the parallel port. Now this value will tern the LED on Pin 0 and Pin 1. I recommend learning about binary if you plan on building this your self. The second part, PORT, is just specifying what parallel port to use. This was defined at the beginning of the code.

#define PORT 0x378 /* use your port address here */

Once compiled this program should execute then bring you back to the command line. Your LED’s should have changed.

To conclude, I plan on eventually building a board that will hold 8 relay that will let me control multiple devices executed via cronjobs in Ubuntu Linux. I will update this as the project continues.

Valve Steam

Well I finaly got a program to work in Wine. Steam, Counter Strike, and Counter Strike: Condition Zero all run very well in Kubuntu on my laptop. If you are trying to do this, make sure your video card has compatable 3D in linux. If you want to do this your self, follow this how to. Also, do not install the games from the CD. I couldn’t get this to work. Instead I logged in and download the games. Hope this helps some of you that are having difficulty getting Steam working.