With this, Mac OS X users get all their OS updates automatically from one place. Too bad Microsoft & the various BSD & Linux vendors are not able to do this too.
PS: HP does this too for the HP-UX Java releases (except for the automatic updates): http://www.hp.com/go/java
PPS: Java IS part of the OS because without Java you cannot run Minecraft.:-)
Maybe is because Engineers have a more technical & logical mind and once they set their sights on a goal are more likely to finish it ?
I don't think any Politicians/Lawyers would be able to do the same. They will just stage a theatrical act out of which they can escape untouched or just switch sides.
Oh yes, of course, Microsoft should TOTALLY build their own factories and then build their own hardware. All the Linux, BSD & Mac users agree that Microsoft should definitely invest all of their cash in some big money holes until they go bankrupt.:-)
Back in my day i had a Romanian Sinclair Spectrum clone (Cip 03) and a bad russian cassette recorder who could not load any games from my friend's tapes.
So i had to learn to make games myself (in BASIC). I had higher grades in math, as all the graphs on my homework were perfect (plotted with the computer and copied from the tv screen:) )
Other old men here care to share their stories ?:)
Visitors, we are sorry, however, this site is experiencing difficulties at this time. Please return later.
Webmaster, please contact us by email at support@lunarpages.com or via Lunarpages Helpdesk at http://support.lunarpages.com./ Thank you for choosing Lunarpages (http://www.lunarpages.com).
Creating Shazam in Java A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works... And more importantly, how hard is it to program something similar in Java?
About Shazam
Shazam is an application which you can use to analyse/match music. When you install it on your phone, and hold the microphone to some music for about 20 to 30 seconds, it will tell you which song it is.
When I first used it it gave me a magical feeling. "How did it do that!?". And even today, after using it a lot, it still has a bit of magical feel to it. Wouldn't it be great if we can program something of our own that gives that same feeling? That was my goal for the past weekend.
Listen up..!
First things first, get the music sample to analyse we first need to listen to the microphone in our Java application...! This is something I hadn't done yet in Java, so I had no idea how hard this was going to be.
But it turned out it was very easy:
1 final AudioFormat format = getFormat();//Fill AudioFormat with the wanted settings 2 DataLine.Info info = new DataLine.Info(TargetDataLine.class, format); 3 final TargetDataLine line = (TargetDataLine) AudioSystem.getLine(info); 4 line.open(format); 5 line.start(); Now we can read the data from the TargetDataLine just like a normal InputStream:
01// In another thread I start: 02 03 OutputStream out = new ByteArrayOutputStream(); 04 running = true; 05 06 try { 07 while (running) { 08 int count = line.read(buffer, 0, buffer.length); 09 if (count > 0) { 10 out.write(buffer, 0, count); 11 } 12 } 13 out.close(); 14 } catch (IOException e) { 15 System.err.println("I/O problems: " + e); 16 System.exit(-1); 17 } Using this method it is easy to open the microphone and record all the sounds! The AudioFormat I’m currently using is:
1 private AudioFormat getFormat() { 2 float sampleRate = 44100; 3 int sampleSizeInBits = 8; 4 int channels = 1;//mono 5 boolean signed = true; 6 boolean bigEndian = true; 7 return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian); 8 } So, now we have the recorded data in a ByteArrayOutputStream, great! Step 1 complete.
Microphone data
The next challenge is analyzing the data, when I outputted the data I received in my byte array I got a long list of numbers, like this:
To see if the data could be visualized I took the output and placed it in Open Office to generate a line graph:
Ah yes! This kind of looks like 'sound'. It looks like what you see when using for example Windows Sound Recorder.
This data is actually known as time domain. But these numbers are currently basically useless to us... if you read the above article on how Shazam works you’ll read that they use a spectrum analysis instead of direct time doma
If you don't use the optical drive (as it's not a BluRay), you could seat the mini with the ports facing you (and put a small mirror in front of the iR sensor).
> Oh, and let's no forget the mandatory service plan since Apple gives you a flat one month warranty, that's it.
In what God-forsaken country do you live ? In all of the EU all the Apple products have a two-year national warranty (including a one year international warranty coverage) by default. Also: no other company would have replaced a component they don't manufacture (the hdd) after the warranty expired.
Microsoft: Here's our new tech. We have a single working prototype in the lab and maybe in 2-3 years (if ever) you will be able to buy a watered down version with less features than this one.
Apple: Here's our new tech. You can get-it from the Apple Store starting now.
Microsoft's tech might be cooler but guess who will have more sales... By the time Microsoft would get this to market, there will be dozens of low-quality chinese knock-offs at 1/2-1/4 of the price but compatible with each-other and Microsoft's screens will use some kind of new and incompatible protocol.
I don't understand why Microsoft even bothers showing off all those very-cool-but-you-can't-have-them products.
He can use a Commodore 64. Or a Speccy. :)
With this, Mac OS X users get all their OS updates automatically from one place. Too bad Microsoft & the various BSD & Linux vendors are not able to do this too.
PS: HP does this too for the HP-UX Java releases (except for the automatic updates): http://www.hp.com/go/java
PPS: Java IS part of the OS because without Java you cannot run Minecraft. :-)
"visible only under ultraviolet light"
Then it can't be used in the night clubs as those "black lights" will make-it VERY visible.
There's that word again; "heavy". Why are things so heavy in the future? Is there a problem with the earth's gravitational pull?
(Dr. Emmett Brown, Back to the Future part 1)
Try Links2, now with Javascript and graphics support (no X11 needed, it even has framebuffer support)
25€ to be spent in WHICH music store ? iTunes, Amazon, Napster ?
You can move to South Africa :)
http://news.bbc.co.uk/2/hi/africa/232777.stm
The people in the UK have other methods:
- http://www.thenewspaper.com/news/18/1863.asp
- http://www.speedcam.co.uk/gatso2c.htm
How can "teens without cell phones" send and receive texts ?
Unfortunatelly the Mac vs. PC ads are no more. Apple discontinued them :)
Are you sure you're not blocked after 420 wgets ? :)
Maybe is because Engineers have a more technical & logical mind and once they set their sights on a goal are more likely to finish it ?
I don't think any Politicians/Lawyers would be able to do the same. They will just stage a theatrical act out of which they can escape untouched or just switch sides.
I think Microsoft will sue Apple because of the name.
As they sued Mike Rowe Software for it's name being too similar to theirs.
Oh yes, of course, Microsoft should TOTALLY build their own factories and then build their own hardware. All the Linux, BSD & Mac users agree that Microsoft should definitely invest all of their cash in some big money holes until they go bankrupt. :-)
Mod Parent Up.
It's a quote from "Weird Al" Yankovic - It's All About The Pentiums.
Weird Al lyrics and Monty Pythong quotes must always be modded up.
http://www2.c-a-m.com/content/products/product_detail.cfm?pid=51665
"What If Linus Torvalds Gets Hit By A Bus?" - An Empirical Study
by Leonard Richardson
Published on segfault.org 02/23/2000
http://www.crummy.com/writing/segfault.org/Bus.html
It even coined the "Bus factor" phrase:
http://en.wikipedia.org/wiki/Bus_factor
Back in my day i had a Romanian Sinclair Spectrum clone (Cip 03) and a bad russian cassette recorder who could not load any games from my friend's tapes.
So i had to learn to make games myself (in BASIC). I had higher grades in math, as all the graphs on my homework were perfect (plotted with the computer and copied from the tv screen :) )
Other old men here care to share their stories ? :)
Visitors, we are sorry, however, this site is experiencing difficulties at this time. Please return later.
Webmaster, please contact us by email at support@lunarpages.com or via Lunarpages Helpdesk at http://support.lunarpages.com./ Thank you for choosing Lunarpages (http://www.lunarpages.com).
2010 © Lunarpages Web Hosting
Creating Shazam in Java
//Fill AudioFormat with the wanted settings
// In another thread I start:
//mono
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works... And more importantly, how hard is it to program something similar in Java?
About Shazam
Shazam is an application which you can use to analyse/match music. When you install it on your phone, and hold the microphone to some music for about 20 to 30 seconds, it will tell you which song it is.
When I first used it it gave me a magical feeling. "How did it do that!?". And even today, after using it a lot, it still has a bit of magical feel to it.
Wouldn't it be great if we can program something of our own that gives that same feeling? That was my goal for the past weekend.
Listen up..!
First things first, get the music sample to analyse we first need to listen to the microphone in our Java application...! This is something I hadn't done yet in Java, so I had no idea how hard this was going to be.
But it turned out it was very easy:
1 final AudioFormat format = getFormat();
2 DataLine.Info info = new DataLine.Info(TargetDataLine.class, format);
3 final TargetDataLine line = (TargetDataLine) AudioSystem.getLine(info);
4 line.open(format);
5 line.start();
Now we can read the data from the TargetDataLine just like a normal InputStream:
01
02
03 OutputStream out = new ByteArrayOutputStream();
04 running = true;
05
06 try {
07 while (running) {
08 int count = line.read(buffer, 0, buffer.length);
09 if (count > 0) {
10 out.write(buffer, 0, count);
11 }
12 }
13 out.close();
14 } catch (IOException e) {
15 System.err.println("I/O problems: " + e);
16 System.exit(-1);
17 }
Using this method it is easy to open the microphone and record all the sounds! The AudioFormat I’m currently using is:
1 private AudioFormat getFormat() {
2 float sampleRate = 44100;
3 int sampleSizeInBits = 8;
4 int channels = 1;
5 boolean signed = true;
6 boolean bigEndian = true;
7 return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian);
8 }
So, now we have the recorded data in a ByteArrayOutputStream, great! Step 1 complete.
Microphone data
The next challenge is analyzing the data, when I outputted the data I received in my byte array I got a long list of numbers, like this:
01 0
02 0
03 1
04 2
05 4
06 7
07 6
08 3
09 -1
10 -2
11 -4
12 -2
13 -5
14 -7
15 -8
16 (etc)
Erhm… yes? This is sound?
To see if the data could be visualized I took the output and placed it in Open Office to generate a line graph:
Ah yes! This kind of looks like 'sound'. It looks like what you see when using for example Windows Sound Recorder.
This data is actually known as time domain. But these numbers are currently basically useless to us... if you read the above article on how Shazam works you’ll read that they use a spectrum analysis instead of direct time doma
Poor iPhone :-(
If you don't use the optical drive (as it's not a BluRay), you could seat the mini with the ports facing you (and put a small mirror in front of the iR sensor).
> Oh, and let's no forget the mandatory service plan since Apple gives you a flat one month warranty, that's it.
In what God-forsaken country do you live ? In all of the EU all the Apple products have a two-year national warranty (including a one year international warranty coverage) by default.
Also: no other company would have replaced a component they don't manufacture (the hdd) after the warranty expired.
You're a troll.
Ok, not a hardware company.
Microsoft:Here's our new tech, the next version of Windows which will have a brand-new filesystem called WinFS ...
Microsoft: Here's our new tech. We have a single working prototype in the lab and maybe in 2-3 years (if ever) you will be able to buy a watered down version with less features than this one.
Apple: Here's our new tech. You can get-it from the Apple Store starting now.
Microsoft's tech might be cooler but guess who will have more sales ... By the time Microsoft would get this to market, there will be dozens of low-quality chinese knock-offs at 1/2-1/4 of the price but compatible with each-other and Microsoft's screens will use some kind of new and incompatible protocol.
I don't understand why Microsoft even bothers showing off all those very-cool-but-you-can't-have-them products.