sagan of sanga

saga of mine

Monday, March 31, 2014

When you need to query & update in the same table

Would you use sub-query?

# 3D movies are linked to corresponding 2D movies with parent_id
# some movies don't have that link, we need to update them
# by looking for movies with almost the same title (such as "Avatar 3D" and "Avatar")
#
UPDATE `cine_movies` D, (
    #SELECT A.movie_id, A.title, B.title, B.movie_id parent_id
    SELECT A.movie_id, B.movie_id parent_id
    FROM (
        SELECT `title`, `movie_id` FROM `cine_movies` 
        WHERE  `title` LIKE '% 3D%' AND `parent_id` = '0'
    ) A
    INNER JOIN `cine_movies` B ON B.title = replace(A.title, ' 3D', '')
) C
SET   D.parent_id = C.parent_id

WHERE C.movie_id  = D.movie_id;

Friday, March 09, 2012

R128 vs ReplayGain

Since version 1.1.6, Foobar2000 used EBU R128 instead of ReplayGain. What does it mean to us?

ReplayGain and EBU R128 are both audio normalization standards. Debates on Hydrogenaudio Forums show that they're quite consistent for "normal" music, except that EBU R128 make sub-bass heavy music louder than ReplayGain.

It's not clear that this change (to EBU R128) brings much benefit to casual listener.

Tuesday, February 21, 2012

Noise sharpening


What is noise sharpening?

It's a Foobar2000 plugin (component) that keep people coming back to Foobar2000. It makes sound more crispy and clear, which is a great complement for normal recordings and normal equipment that most people own. After using it for a while, some say their music collection sounds dull without it. Some people with pretty good equipment also like it.

As gaekwad2 explained:
It adds the diffeence between the current and the previous sample to the signal, thus boosting high frequencies (mostly the top octave ie. 11-22kHz in case of CD/44.1kHz files) and causing slight distortion.

To quote the description of the original foobar plugin:
Quote:
This started out as sort of a toy plugin containing DSPs for differentiation (input f(t), output f'(t)) and integration (input f(t), output F(t))

Recently a DSP for playback of f(t)+f'(t) has been added, in layman's terms this enhances treble / noise / transient content and can be seen as the audio equivalent of image sharpening filters.
It's not the same as increasing the treble:
No, if anything it's similar to boosting the highest band in the equalizer.
But like most 'enhancer' dsps it also creates additional waves (=distortion), which may help if your equipment doesn't reproduce these high end frequencies.
With good equipment, like all dsps, it does more harm than good.

(It is funny that the byproduct of a toy-plugin can cause such a hype, we'll see how long it lasts.)
And yes, you'll be addicted to noise sharpening, or loudness race in its purest form:
Well, in reality, you experience loudness race in its purest form - that which sounds louder feels to sound better. You get used to it very fast, and turning back is pain.
It mixes derivative of the signal (difference to previous sample) with signal itself. Amplitude of this derivative is higher with higher frequencies, thats why only treble is notably affected.
It is a sort of equalizer that increases treble in dependence to high frequency content amplitude - higher amplitude signals get increased more than lower amplitude content. It feels like "curtain has been unvelied"
Anyone remember Dolby B in tapes sounding better without undoing Dolby compression?

Who created noise sharpening?

It was accidentally created by ssamadhi97 while he was writing a Foobar plugin for converting between PCM and DPCM. He chose the name "noise sharpening" because it's similar to an image sharpening filter (according to ssamadhi97 and gaekwad2).

Do we need noise sharpening?

For casual listeners, it's very useful for music that lacks clarity. If your music is already crystal clear, it will make it too metallic and a little harsh on your ear (if you can hear it with your equipement :D)

If you're an audiophile, you may not need it:
Strictly speaking, nobody really needs this DSP. It's just that some people like the effect. If you want to compensate deficiencies in your playback equipment or listening environment, the convolver or the equalizer are more appropriate tools.



Saturday, July 18, 2009

stupid personality test

It said I was like a Black Knight. Holy bullshit!

our distinct personality, The Black Knight, might be found in most of the thriving kingdoms of the time. Your overriding goal is to win. You approach each task or situation as a contest to be won strategically and efficiently. Because you can control your feelings, it is not unusual for you to charm, as well as successfully delegate tasks and responsibilities to the more emotional types. You are often concerned with what's in it for you. You seldom involve yourself in activities where you can not foresee a reward for your investment or effort. On the positive side, you can be analytically empathic and logically persuasive. On the negative side, you may be unemotionally manipulative as well as impulsive. Interestingly, your preference is just as applicable in today's corporate kingdoms.

http://www.cmi-lmi.com/bknight.html

funny translation

check this out! what a funny translation!

Saga - 5 lí do khiến tôi không mua điện thoại iPhone

But it's true, isn't it?

"Nào, mọi người, chúng ta thật sự cần những thông tin chi tiết về giá cả ít nhất là 1 tháng trước khi chiếc điện thoại được bày bán vì thế chúng ta có thể đánh giá được giá cả của nó."

"Nguyên tắc ngón tay cái của chuyên viên máy tính đó chính là không bao giờ sử dụng các đời máy móc thuộc thế hệ thứ nhất."

"Tôi là người yêu công nghệ cũng như giống anh chàng đang ngồi cạnh tôi vậy,nhưng không một loại máy móc nào đáng để đứng xếp hàng để được chiêm ngưỡng và mua được trước, iPhone cũng không hề ngoại lệ."

Labels: ,

Tuesday, May 16, 2006

life goes on and on

life goes on and on.
swim or sink? i'd rather take off and fly away :D