Perspective, or angles between the lines lends the illusion of depth. With perspective, 3D object can be depicted in 2D screen.
When one covers one eye and looks, the world still appears as in 3D because perspective alone is enough to create the 3D effect. Another obvious clue is nearby objects appear larger than the distant ones. This perspective effect is called foreshortening.
To enhance 3D effect in drawing on 2D, another technique is to remove hidden lines and surfaces from the object on screen. Applying different color to different side of object simulates the effects of light. Adding shadow further enhances the illusion.
Texture mapping takes an image, such as a photo and applies it on the surface of an object to give it a realistic looks. For example, applying wood texture onto a cube to make it looks like a box. The process of stretching and compressing texels (texture elements) is called filtering.
Fog adds haziness to objects in a scene depending on the distance where objects are.
Blending is the combination of colors or objects on the screen, similar to superimposing 2 images. By varying the amount of each object with the scene, one can make the effect of transparency. Blending can create the illusion of reflection.
Antialiasing blends the lines with the background color to eliminate the jagged edges.
Sunday, April 10, 2011
Saturday, April 2, 2011
CISC and RISC
If RISC is faster, why was CISC predominant in the past? Back then, computer had very little storage. An instruction that could roll up several steps of complex operation, such as a do-loop, into a single instruction was an advantage, because memory was precious. In addition, instruction fetch was piecemail and sequential. Reducing the number of instruction saved time.
As it turned out, assembly langauage progreammers used the complicated machine instructions but compilers generally did not. It was difficult enough for compiler to recognize when a complicated instruction could be used, but the real problem was code optimizations. Verbatim translation of source constructs isn't very efficient. An optimizing compiler works by simplifying and eliminating redundant computations, After optimization, opportunities to use the complicated instructions tended to disappear.
On the other hand, there were several pushes for the development of RISC.
(1) The number of transistors that could fit on a single chip was increasing.
(2) Techiques like pipelining was difficult to be implemented for variable length instruction common in CISC design.
(3) As compilers improved, the resulting code generated for RISC out-performed equivalent complicated multi-cycle instructions in CISC.
As it turned out, assembly langauage progreammers used the complicated machine instructions but compilers generally did not. It was difficult enough for compiler to recognize when a complicated instruction could be used, but the real problem was code optimizations. Verbatim translation of source constructs isn't very efficient. An optimizing compiler works by simplifying and eliminating redundant computations, After optimization, opportunities to use the complicated instructions tended to disappear.
On the other hand, there were several pushes for the development of RISC.
(1) The number of transistors that could fit on a single chip was increasing.
(2) Techiques like pipelining was difficult to be implemented for variable length instruction common in CISC design.
(3) As compilers improved, the resulting code generated for RISC out-performed equivalent complicated multi-cycle instructions in CISC.
DRAM and SRAM
DRAM are charge-based devices, where each bit is represented by a electrical charge stored in a very small capacitor. The charge can be leaked away in a short amount of time, so the system has to continuously refreshed to prevent the data from being lost. The act oreading also discharges te bit, requiring refresh. It is not possible to read the memory bit in DRAM while refresh takes place.
SRAM is based on gates and each bit stored in four to six connected transistors. SRAM retains the data as long as there is power, without the need to refresh.
Access time is the amount of time takes to read or write a memory location. Memory cycle time describe how often you can repeat reference to the same memory chip.
Fast page mode DRAM saves time by allowing a mode in which the entire address doesn't have to be re-clocked into the chip for each memory operation. Instead, there is an assumption that the memory will be accessed sequentially and only the low-order buts of the address are clocked in for successive reads or writes.
EDO RAM is a modification to output buffering on page mode RAM that allows it to operate roughly twice as fast for operation other than refresh.
Synchronous DRAM is sychnorized using an external clock that allows the cache and DRAM to coordinate their operations. Also SDRAM can pipeline the retrieval of multiple memory bits to improve overall throughput.
Cached DRAM contains a SRAM cache on the same chip as the DRAM. This improves performance to close to SRAM.
SRAM is based on gates and each bit stored in four to six connected transistors. SRAM retains the data as long as there is power, without the need to refresh.
Access time is the amount of time takes to read or write a memory location. Memory cycle time describe how often you can repeat reference to the same memory chip.
Fast page mode DRAM saves time by allowing a mode in which the entire address doesn't have to be re-clocked into the chip for each memory operation. Instead, there is an assumption that the memory will be accessed sequentially and only the low-order buts of the address are clocked in for successive reads or writes.
EDO RAM is a modification to output buffering on page mode RAM that allows it to operate roughly twice as fast for operation other than refresh.
Synchronous DRAM is sychnorized using an external clock that allows the cache and DRAM to coordinate their operations. Also SDRAM can pipeline the retrieval of multiple memory bits to improve overall throughput.
Cached DRAM contains a SRAM cache on the same chip as the DRAM. This improves performance to close to SRAM.
Saturday, March 12, 2011
Form
Divide music into parts and convential muscial theory gives alphabet labels to the miscial parts within a composition.
1-part form: A
e.g. Happy Birthday - is the most primitive song structure sometimes refered as the air or ballad form. The melody is repeated with slight variation.
2-part form: AB
Binary form contain 2 contrasting sections functioning as statement and counterstatement. e.g. Greensleeves in AABB
Song form: ABA
3-part or tertiary form. One of the simpliest way to write in song form is to vary and repeat the melody e.g. Twinkle twinkle little star. Another variation of song form is AABA with B bridging the stretched A.
Arch form: ABCBA
Classical form
- sonata - common in period from mid 1700 to early 20 century. Sonata are based on song form (ABA). The first part is the exposition which presents the main theme of the song as well as 2 or 3 minor themes. The second part (or B part) is called development often sounds belonging to another musical piece, usually in different ey and even different time Signature. The 3rdpart is to return to the theme and called recapitulation.
Sonata has its roots in language - in this case, the sonnet. In sonnet (like those Shakespeare wrote), the first quatrain (4-line verse) consists of 2 set of rhyming pairs (A part), whereas the second verse consists of 2 comptelely dofferent set of rhyming pairs (B part). The 3rd verse retruns to the rhyming A section.
- rondo (ABACA) or ABACADA. The A seciton is called refrain ties the pieces together. B, C and D are called episodes can be in any key or time signature. Rondo also has its roots in poetry. In 13th century France, the rondeau was a popular form of street poetry which often set to music
- Concerto - contrasts between having a large ensemble playing a section of music and a solo/smaller group playing the same or similar section.
- Symphony - performed by an orchestra. It combines several different muscial forms into one piece of music harmoniously. There are traditionally 4 movements in a symphony
(a) Sonata Allegro
(b) Slower movement
(c) Minuet or scherzo
(d) combination of sonata and rondo, a thematic repeat of the first movement.
- Fugue - first form that fully utiliuze the left hand of the pianist. The treble clef and the bass lef take turns carrying the melody.
- Divertimento - a light and short form of instrumental chamber music has several short movement chiefly for entertainment value.
- Minimalism - extremem simplication of rhythms, patten and harmonies. Prolonged chordal or melodic repetitions and often in trancelike effect - AAAA....
- Through composed - no repetitious of themes
Popular forms
- blues - AABA patternof I, IV and V
- rock - 32 bar compounded blue. One plays the first 32 bars, go to the second bridge and repeat the first 32 bars again e.g. every breath you take
- verse-chorus form: Intro ABAVBCB
Intro us usually instrumental and set the mood, or short spoken piece
A (verse) being the story of the song
B (chorus) is the hook of the osng, both lyrically and musically, should be the most memorable, anthemic part of the song. Often the title too
A (verse) is the part 2 of the story
B (chorus) reinforce the hook to make it memorable
C (bridge) can be instrumental or lyrical and is differnt sounding than the verse or chorus
B (end, chorus) repeat chorus to fade or just stop at the I chord (candence) after one time through
1-part form: A
e.g. Happy Birthday - is the most primitive song structure sometimes refered as the air or ballad form. The melody is repeated with slight variation.
2-part form: AB
Binary form contain 2 contrasting sections functioning as statement and counterstatement. e.g. Greensleeves in AABB
Song form: ABA
3-part or tertiary form. One of the simpliest way to write in song form is to vary and repeat the melody e.g. Twinkle twinkle little star. Another variation of song form is AABA with B bridging the stretched A.
Arch form: ABCBA
Classical form
- sonata - common in period from mid 1700 to early 20 century. Sonata are based on song form (ABA). The first part is the exposition which presents the main theme of the song as well as 2 or 3 minor themes. The second part (or B part) is called development often sounds belonging to another musical piece, usually in different ey and even different time Signature. The 3rdpart is to return to the theme and called recapitulation.
Sonata has its roots in language - in this case, the sonnet. In sonnet (like those Shakespeare wrote), the first quatrain (4-line verse) consists of 2 set of rhyming pairs (A part), whereas the second verse consists of 2 comptelely dofferent set of rhyming pairs (B part). The 3rd verse retruns to the rhyming A section.
- rondo (ABACA) or ABACADA. The A seciton is called refrain ties the pieces together. B, C and D are called episodes can be in any key or time signature. Rondo also has its roots in poetry. In 13th century France, the rondeau was a popular form of street poetry which often set to music
- Concerto - contrasts between having a large ensemble playing a section of music and a solo/smaller group playing the same or similar section.
- Symphony - performed by an orchestra. It combines several different muscial forms into one piece of music harmoniously. There are traditionally 4 movements in a symphony
(a) Sonata Allegro
(b) Slower movement
(c) Minuet or scherzo
(d) combination of sonata and rondo, a thematic repeat of the first movement.
- Fugue - first form that fully utiliuze the left hand of the pianist. The treble clef and the bass lef take turns carrying the melody.
- Divertimento - a light and short form of instrumental chamber music has several short movement chiefly for entertainment value.
- Minimalism - extremem simplication of rhythms, patten and harmonies. Prolonged chordal or melodic repetitions and often in trancelike effect - AAAA....
- Through composed - no repetitious of themes
Popular forms
- blues - AABA patternof I, IV and V
- rock - 32 bar compounded blue. One plays the first 32 bars, go to the second bridge and repeat the first 32 bars again e.g. every breath you take
- verse-chorus form: Intro ABAVBCB
Intro us usually instrumental and set the mood, or short spoken piece
A (verse) being the story of the song
B (chorus) is the hook of the osng, both lyrically and musically, should be the most memorable, anthemic part of the song. Often the title too
A (verse) is the part 2 of the story
B (chorus) reinforce the hook to make it memorable
C (bridge) can be instrumental or lyrical and is differnt sounding than the verse or chorus
B (end, chorus) repeat chorus to fade or just stop at the I chord (candence) after one time through
Cadences
Music has commas, full stops and paragraph used in the same way as storytelling. The term for phrase (sentence) ending is called cadence.
Cadence means return to the I/i chord from iv or V chord. The stopping position of music that does not make sense to listener will not be fulfilling. Audiences expect a certain closure.
Authentic (Perfect) Cadences - V/v to I/i
Plagal Cadences IV/iv to I/i. It is used to end a phase rather than the song because they do not sound decisive as Authentic Cadences.
Deceptive or interrupted cadences is to resolve the V/v to any chord other than I/i. The most common ones are V/v to VI/vi. This is one of the weakest cadence as it makes one feels incomplete. Other forms are V to IV/ii/V/VIIl.
Half (Imperfect) Cadences stop at IV, iv, V or v and not resolved to I (thus half of the cadence).
Cadence means return to the I/i chord from iv or V chord. The stopping position of music that does not make sense to listener will not be fulfilling. Audiences expect a certain closure.
Authentic (Perfect) Cadences - V/v to I/i
Plagal Cadences IV/iv to I/i. It is used to end a phase rather than the song because they do not sound decisive as Authentic Cadences.
Deceptive or interrupted cadences is to resolve the V/v to any chord other than I/i. The most common ones are V/v to VI/vi. This is one of the weakest cadence as it makes one feels incomplete. Other forms are V to IV/ii/V/VIIl.
Half (Imperfect) Cadences stop at IV, iv, V or v and not resolved to I (thus half of the cadence).
Chord Progression
Certain sequences of chords sound nicer than the others. Over time, a consensus devleoped to become the rules of chord progression. The rules arre based on a concept called chord leading - certain chords naturally lead to other chords.
Major chord leading
I can appear anywhere in a progression (any chord can go to I)
ii to I, IV, V, or viio (minor seventh dim)
iii to I, ii, IV or vi
IV to I, ii, iii, V or viio
V to I or vi
vi to I, ii, iii IV or V
viio to I or iii
Minor chord leading
i can appear anywhere in a progression
iio or ii to i, iii, V, v, viio, VII
III or III+ to i, iv,IV, VI, #vio, viio, VI
iv or IV to i, V, v, viio or VII
V or v to i, VI or #vio
VI or #vio to i, III, III+ iv, IV, V, v, viio or VII
viio or VII to i
Common chord progressions
(1) I, IV, V and V7 (C, F, G, G7)
e.g. I-IV, I-V, I-IV-V or V7, I-IV-I-V of V7, I-IV-V-IV
(2) mixing other chords with combination of IV and V
e.g. I-ii-IV-V, I-ii-IV, I-V-vi-IV, I-vi-ii-V or V7, I-vi-IV-V, I-vi-ii-V7-ii
(3) starting with non-tonic chord
e.g. ii7-V7-I, IV-I-IV-V
(4) 12-baror blues progression
I-IV-I-V7-IV-I (C, F, C, G7, F, C)
(5) circles of fifths - each chord is a diatonic fifth above the following chords which makes each chord functionally a dominant for the next
I-IV-viio-iii-vi-ii-V-I (C, F, Bdim, Em,Am, Dm, G, C)
Major chord leading
I can appear anywhere in a progression (any chord can go to I)
ii to I, IV, V, or viio (minor seventh dim)
iii to I, ii, IV or vi
IV to I, ii, iii, V or viio
V to I or vi
vi to I, ii, iii IV or V
viio to I or iii
Minor chord leading
i can appear anywhere in a progression
iio or ii to i, iii, V, v, viio, VII
III or III+ to i, iv,IV, VI, #vio, viio, VI
iv or IV to i, V, v, viio or VII
V or v to i, VI or #vio
VI or #vio to i, III, III+ iv, IV, V, v, viio or VII
viio or VII to i
Common chord progressions
(1) I, IV, V and V7 (C, F, G, G7)
e.g. I-IV, I-V, I-IV-V or V7, I-IV-I-V of V7, I-IV-V-IV
(2) mixing other chords with combination of IV and V
e.g. I-ii-IV-V, I-ii-IV, I-V-vi-IV, I-vi-ii-V or V7, I-vi-IV-V, I-vi-ii-V7-ii
(3) starting with non-tonic chord
e.g. ii7-V7-I, IV-I-IV-V
(4) 12-baror blues progression
I-IV-I-V7-IV-I (C, F, C, G7, F, C)
(5) circles of fifths - each chord is a diatonic fifth above the following chords which makes each chord functionally a dominant for the next
I-IV-viio-iii-vi-ii-V-I (C, F, Bdim, Em,Am, Dm, G, C)
Chord Composition
A major triad is built of 2 intervals - a major third and a further minor third on top it. Another way to look at this is a major third and a perfect fifth
A minor triad composed of a minor third and a further major third on the top. In other words, a minor third and a perfect fifth
An augmented triad composed of a major third plus a major third, or in other words, a major third and an augmented fifth.
A diminished triad composed of a minor third and another minor third on top, or in other words a minor third and a diminished fifth.
C- Major chords are happy, simple, honest and bold composed of 1,3,5
Cm - Minor chords are sad and serious composed of 1,3b,5
Cmaj7 - Major seventh are pretty, delicate, sensitive and thoughtful composed of major+7
Cm7 - Minor seventh are pensive, moddy and introspective composed of minor+7b
C7 - Dominant 7 are sassy, outgoing and strong composed of major+7b
C6 - Major sixth are playful composed of major+6
Cm6 - Minor sixth are dark, sensuous, troubled composed of minor+6
Csus4 - Suspended 4 are regal and material composed of C without third (sus part)+4 (i.e. 1,4,5). This chord creates a harmonic suspension and could be resolved by returning to the original triad
C9 - Ninth are energetic and lively composed of major+9 (or 2 raised to an octave)
Cm9 - Minor ninth are sad, tender and complex composed of minor+9
Cdim - Diminished are dark, strained and complex composed on a Minor with its fifth flatted (i.e. 1,3b,5b)
C+ - Augmented are anticipatory and full of movement composed on Major with its fifth sharped
Cm7/b5 - Minor 7, flat 5 or half diminished are disparaging, sorrowful, difficult and deep composed of Cm7 with 5b
In summary,
Cmaj7 = C + 7
C7 = C + 7b
C6 = C + 6
C9 = C + 9 = C + 2
C+ = C with 5#
Cm = C with 3b
Cm7 = Cm + 7b
Cm6 = Cm + 6
Cm9 = Cm + 9
Cdim = Cm with 5b
Csus4 = C - 3 + 4
A minor triad composed of a minor third and a further major third on the top. In other words, a minor third and a perfect fifth
An augmented triad composed of a major third plus a major third, or in other words, a major third and an augmented fifth.
A diminished triad composed of a minor third and another minor third on top, or in other words a minor third and a diminished fifth.
C- Major chords are happy, simple, honest and bold composed of 1,3,5
Cm - Minor chords are sad and serious composed of 1,3b,5
Cmaj7 - Major seventh are pretty, delicate, sensitive and thoughtful composed of major+7
Cm7 - Minor seventh are pensive, moddy and introspective composed of minor+7b
C7 - Dominant 7 are sassy, outgoing and strong composed of major+7b
C6 - Major sixth are playful composed of major+6
Cm6 - Minor sixth are dark, sensuous, troubled composed of minor+6
Csus4 - Suspended 4 are regal and material composed of C without third (sus part)+4 (i.e. 1,4,5). This chord creates a harmonic suspension and could be resolved by returning to the original triad
C9 - Ninth are energetic and lively composed of major+9 (or 2 raised to an octave)
Cm9 - Minor ninth are sad, tender and complex composed of minor+9
Cdim - Diminished are dark, strained and complex composed on a Minor with its fifth flatted (i.e. 1,3b,5b)
C+ - Augmented are anticipatory and full of movement composed on Major with its fifth sharped
Cm7/b5 - Minor 7, flat 5 or half diminished are disparaging, sorrowful, difficult and deep composed of Cm7 with 5b
In summary,
Cmaj7 = C + 7
C7 = C + 7b
C6 = C + 6
C9 = C + 9 = C + 2
C+ = C with 5#
Cm = C with 3b
Cm7 = Cm + 7b
Cm6 = Cm + 6
Cm9 = Cm + 9
Cdim = Cm with 5b
Csus4 = C - 3 + 4
Subscribe to:
Posts (Atom)