Original link: https://blog.si-on.top/2023/8BitMusic&AbcNotation/
Anything, if you don’t understand it, don’t try to master it.
– Goethe
article trace
writing timeline
2021-12-19
Introduced the composition of basic chords (Chinese and English), in order to better use the sonic pi.
2023-8-11
At the suggestion of the visitor @八阿乌, I am going to write an article about chip/8bit/pixel music
2023-8-15
- Installed Sonic-pi, reviewed the use of the software
- Familiar with
aplayer
calling local audio, the use ofabc.js
- Clarified the content of the article: introduce music theory, chip (8Bit) music;
create a song of your own.
2023-8-19 Article published
- “Little Star” synthesized by Sonic-pi
- Add notes for ABC notation
- Made the cover with unifont font
I always thought that the “Electronic Reading News” last time was the article with the longest time span in the blog (three months), but now this article spanning 604 days has refreshed the record again.
pixel music
Speaking of pixel music , I believe everyone knows a thing or two. Because anyone who reads this article, as long as they are between fifteen and sixteen to forty or fifty, must have seen or even played that kind of electronic game console, such as Xiaobawang, red and white machine, PSP and so on.
Our family probably played game consoles for a long time when we were in the fifth and sixth grades of elementary school (around 2012). At that time, the storm of the Internet and smartphones had not swept through the remote countryside. Our entertainment after school was watching Ultraman discs, playing card game consoles (FC), clocking in, catching fish, and collecting cigarette cases. The game console is the most high-tech thing among them, and it is the most appetizing. One summer, I borrowed a game console from my cousin’s house. Since then, a group of us: me, Mr. H, Mr. X and sometimes Mr. S, come to my house every day after school to play this game console. Know how many [1] have been dried up. However, there were not many games at that time. In order to satisfy the addiction of this game, I secretly used the New Year’s money to buy game cards. There were four games for a five-yuan card. It didn’t take long for a huge sum of more than one hundred to be spent [2] , Later, I exchanged game cards with my classmates at S Zhuang and played for a while. In the end, a “big brother” who dropped out of school early in the village borrowed my card and machine to play. I borrowed it for two or three years. When I returned it, there were only two cards left. Although it was very sad at the time, the dog days slowly dilute all this. Now I have an open-source RetroArch installed on my computer, and I have found some resources, so I can play hundreds of games without spending lucky money. However, however, I still can’t beat the level!
Damn, it’s getting so far, this article is about pixel music, sorry, sorry, let’s get to the point.
Composition of Pixel Music
Pixel music, as the soundtrack of electronic game consoles, has formed an indissoluble bond with games since birth. You may have listened to pixel music hundreds of times, and even dreamed about it in your head ( a FC game addict passed by ), but you don’t know how this kind of music came out. In order not to give you a headache, our family resolutely I want to help you popularize science ( Baidu ): What the hell is pixel music?
In fact, the answer is very simple: the tone is different.
In fact, there is no essential difference between pixel music and other music. They are all sounds of different frequencies and loudness magically combined together. However, the reason why pixel music is different is that it uses a special “instrument” – buzzer to make sound: mainly pulse wave (pulse), triangle wave (triangle), sawtooth wave (sawtooth), square wave (square) sine wave (sine), noise (noise) and a small amount of percussion.
Students who have studied electrical engineering and electronics may understand these waveforms very well, and can even draw a circuit diagram to synthesize them. Here, our family will not show off the garbage electrical engineering knowledge ( it is said that sion scored 66 points in the test at the time ). So pixel music is also called “chip music (Chiptune)”.
In order to facilitate the experience of timbre, here we use “Little Star” to show:
little star sonic-pi
1 |
use_synth :pulse |
pulse wave
triangle wave
sawtooth wave
square wave
It can also be seen from the waveform diagram that the timbres of triangle waves, square waves, and sawtooth waves are very similar.
sine wave
remix
Real pixel music is very complicated, and generally has many tracks. For non-professionals, it is difficult to reproduce and even more difficult to produce. Here is a simple try, mix the above “Little Star” a little bit, add background noise, percussion music, double the speed, to imitate the style of the next pixel music (the recording is slow, and there are some flaws in the end, please listen Forgive me ):
recommended music
In addition to the soundtracks of various games, I recommend two pixel music artists here:
- スパークル (8bit remix) : A pixelated remix about special photography, animation and other film and television music,
- 8 Bit Universe : Pixelated Remix of various music, very famous.
ABC notation
ABC notation is a notation method that appeared in the 19th century. The pitch is recorded with letters from A to G, and other symbols are used to record the changing sound and sound length. It is annotated with %
, by Chris Varsha invention. Later, because computers used the ASCII character set and had to process music, the ABC notation method was valued again and became the information storage method for some music software.
ABC notation consists of a header and a content. The following is an introduction in two parts, and the content is mainly from: “Lao Wang’s Detailed Explanation of ABC Notation” – Music Production and Exchange Base for the Visually Impaired .
Header
The header can mark various parameters, which can be understood as following LaTeX\LaTeX L A T E The preface area of X , the front Matter of markdown. Its parameters are shown in the following table: generally only five parameter items “X:”, “M:”, “L:”, “Q:”, and “K:” are very important and must be filled in, and the rest of the parameter items can be dispensable. The first parameter item of the header must be “X:” and the last parameter item must be “K:”. In other words, “X:” is the beginning of the header, and “K:” is the end of the header.
symbol | name | example | meaning |
---|---|---|---|
T | title | T:小星星 |
The title of the song is “Little Star” |
C | author | C: 秉蕳 |
The author of the song is Bing Yi |
D. | The album name | D: 芯片奏鸣曲 |
Song belongs to album titled Chip Sonata |
x | track number | X:1 |
This track is the first track |
m | time signature | M:4/4 |
This piece is in four-four time. The number before the slash symbol “/” indicates how many beats there are in each measure, and the number after the slash symbol “/” indicates what note is a beat. |
L | shortest note | L: 1/4 |
Letters that represent the following notes are considered quarter notes if they are not accompanied by other symbols. |
Q | track tempo | Q: 1/4=120 |
The tempo is 120 quarter notes per minute. |
K | tune | K: C |
Indicates that the piece is to be played in the key of C major. (E flat major is “K:Eb”, raw G major is “K:G#”, A minor is “K:Am”) |
In addition, there are some less important parameters, such as:
- H:History % History
- S:Source % Source
- N:Notes % Notes
- Z:Transcription note % Annotation
- A:Area % area
- B:Book % book title
- R:Rythm % Rhythm
- P:AB.AC.ABA(AC)3 % Song repeat mode
- V: 1 name=”Notes on the left” %Add 1 to the note sequence number of each line (see “Note Test Exercise” below)
Note
We know that there are 88 tones on the piano, from low to high: big character group two, big character group one, big character group, small character group, small character group, small character group two, small character group three, small character group four, small character group five. The corresponding relationship is as follows:
In the score recorded by ABC notation, the pitch is recorded with the letters A to G, and other symbols are used to record the changing sound, sound length, etc. Seven half-width English letters “C”, “D”, “E”, “F”, “G”, “A”, and “B” are used to represent the notes corresponding to the seven basic phonetic names, corresponding to the C key of numbered notation “1”, “2”, “3”, “4”, “5”, “6”, “7” for . The specific content is:
- Use uppercase letters to denote the notes of the lowercase group. “C” is the middle C, the middle note do in the key of C in numbered notation, and the corresponding MIDI note number is 60; “D” is the D in a group of small characters, the middle note re in the key of C in numbered notation, and the corresponding MIDI note number is 62;” B” is the B in the group of small characters, the middle tone si in the key of C in numbered notation, and the corresponding MIDI note number is 71.
- Add a half-width comma “,” after the uppercase letter to indicate the note of the small character group; add two commas “,” after the uppercase letter to indicate the note of the large character group; add three commas “,” after the uppercase letter to indicate the uppercase group notes; lower ones and so on.
- Use lowercase letters to represent the notes of the second group of small characters. “c” is the treble do in key C of numbered notation, and the corresponding MIDI note number is 72; “b” is the treble si in key C of numbered notation, and the corresponding MIDI note number is 83.
- Add a half-width single quotation mark “‘” after the lowercase letter to indicate the note of the small letter three groups; add two single quotation marks “”” after the small letter to indicate the note of the small letter four group; add three single quotation marks after the small letter “”'” indicates the notes of five groups of small characters; the higher ones can be deduced by analogy.
- The half-width English lowercase letter z represents the rest, and the uppercase Z represents the rest in the rest of the whole measure.
Below is a simple demonstration using ABC notation. You can compare the code with the score generated by abc.js:
ABC notation codes
1 |
T : Note Practice Test Song |
Different durations of notes
Add a half-width Arabic numeral directly behind the note, which is the duration of the increased note, indicating that the duration of the note is a multiple of the duration of the original note before the number; add a half-width slash “/” after the note, or add a slash Adding half-width Arabic numerals behind the bar is to shorten the duration, indicating that the duration of the note is a fraction of the duration of the original note before the number.
Combining these two, the time value of the note is more diverse, and the time value of the note after the combination of the two is a fraction of the time value of the original note.
Do you still remember the meaning of the “L:” parameter item in the table header? Here is an example:
- If “L:1/4”, then “C” means the middle do of the quarter note, “C2” means 2 times the quarter note, which is the middle do of the half note; “C3” means the 3 of the quarter note Double, that is, the middle dot of the dotted half note [3] .
- If “L:1/8”, then “C” means the middle do of the eighth note, and “C2” means twice the eighth note, which is the middle do of the quarter note.
“2” is also added after “C” in the two examples here, but the duration values of the notes they represent are different, that is to say, the parameter value of the “L:” parameter item at the header determines time value. Let’s look at the meaning of the slash again:
- If “L:1/4”, then “C/2” means one-half of a quarter note, which is the middle do of an eighth note (the number “2” behind the slash can be omitted here);” C/4″ means a quarter of a quarter note, which is the middle do of a sixteenth note (when the number behind the slash is “4”, it can be represented by two slashes, that is, “/ 4” is equivalent to “//”).
- If “L:1/8”, then “C/” means one-half of the eighth note, which is the middle do of the sixteenth note; “C//” means one-quarter of the eighth note, which is The middle do of the thirty-second note.
Different combinations of the two can form more complex durations. If “L:1/4”, then “C3/4” means three quarters of a quarter note, which is a dotted eighth note.
Some simple recording methods (by @晓波)
“C3/D/” can be abbreviated as “C>D”, the front note is three-half of the note unit, and the back note is one-half of the note unit; “, the front note is one-half of the note unit, and the back note is three-half of the note unit.
“C7//D//” can be abbreviated as “C>>D”, the front note is seven-quarters of the note unit, and the back note is one-quarter of the note unit; “C<<D”. “C15/8D/8” is abbreviated as “C>>>D”, and “C/8D15/8” is abbreviated as “C<<<D”.
ABC notation codes
1 |
X : 2 |
melody
Let’s take “Two Tigers” as an example to interpret:
ABC notation codes
1 |
X : 3 |
Because of “K:F”, the “F” in the following melody is the do in the F key, the “G” is the re in the F key, and so on.
- In the first measure, “F2” is the middle do of the quarter note, “G2” is the middle re of the quarter note, “A2” is the middle mi of the quarter note, and “F2” is the middle of the quarter note do;
- The second subsection is the same as the first subsection;
- In the third measure, “A2” is the middle note mi of the quarter note, “B2” is the middle note fa of the quarter note, and “c4” is the middle note sol of the half note;
- The fourth subsection is the same as the third subsection;
- In the fifth measure, “cd cB” are four eighth notes, which are the alto sol, la, sol, fa, and “A2 F2” are the quarter notes mi, do;
- The sixth and fifth subsections are the same;
- In the seventh measure, “G2 C2” is the tenor re and bass sol of the quarter note, and “F4” is the tenor do of the half note;
- The eighth section is the same as the seventh section.
In the “K:” parameter item in the table header, sometimes there will be two marks of the upper caret ” ^
” and the underscore ” _
“, which are temporary diacritical marks in the melody, written in front of the notes:
symbol | significance | illustrate |
---|---|---|
^ |
sharp mark | half step up |
^^ |
double sharp | raised a whole tone |
^/ |
Nudge up | raise half a step |
_ |
drop mark | lower half step |
__ |
double flat | drop a whole tone |
_/ |
Nudge down | half a step down |
= |
Restoration mark | restore the sound to its original value |
other decorative symbols
legato
A half-width minus sign “-” is added between two adjacent notes of the same pitch to indicate unison. There should be no space symbol between the minus sign and the note before the minus sign, and the space symbol can be added or not between the note after the minus sign and the minus sign. Such as “C2-C/”, C4-|C”.
Another kind of connection is a slur, which uses left and right brackets to enclose the notes that need to be included by the slur. There should be no spaces after the opening parenthesis and before the closing parenthesis. In “CD ( _E
F | G’3/ F’/) E’ D'”, the start note of the slur is ” _E
” in the previous measure, and the end note is “F’/” in the latter measure.
Simultaneous vocalization
Just use the left and right square brackets to enclose the notes that need to be sounded at the same time. The symbols indicating the increase and decrease of time value can be written after each note, or just write once after the right square bracket. If “L:1/4”, then “[C2E2G2]” means that the three half notes “C2”, “E2” and “G2” are sounded at the same time, and it can also be written as “[CEG]2”.
repeat mark
The writing method of repeated marks is very intuitive, just come to a few :
- “|: cdec
:|
” [4] is actually played as “cdec | cdec |”. - “|: cdec :: ef g2
:|
” actually plays “cdec | cdec | ef g2 | ef g2 |”. - : “|: eefg | gfed | ccde |1 e3/d/ d2 :|2 d3/c/ c2 ||” the actual performance is “eefg | gfed | ccde | e3/d/ d2 | eefg | gfed | ccde | d3 /c/c2 ||”.
- “|: A | B |1,3 C :|2,4 D ||” the order of performance is “A | B | C | A | B | D | A | B | C | A | B | D | |”. As shown in the table below:
symbol | meaning |
---|---|
∣\vert ∣ : | pre-repetition |
: ∣\vert ∣ | post-repetition token |
: ∣\vert ∣ 1 | First House (first repeat) |
: ∣\vert ∣ 2 | Second repetition (Second repetition) |
∣\vert ∣ 1,3 | 1st and 3rd repetition |
∣\vert ∣ 2,4 | Second and fourth repetition |
:: | post-repetition plus pre-repetition |
Ornament
Let’s talk about the most common “applause” first. The apposite notes are enclosed in left and right curly braces “{}” and placed in front of the main notes. If there is only one note in the appotropia, you need to write a slash symbol after the opening curly brace, and then write the note; if the appogia has two or more notes, then you don’t need to write after the opening curly brace For the slash symbol, just write the note directly. The notes inside the curly brackets will not be controlled by the “L:” field. On the notation software that supports abc notation, the software will display the appotropia of one note as an eighth note, and use the appropriation of multiple notes as an eighth note. Sixteenth notes are displayed. That is to say, whether it is the appotropia of one note or multiple notes, we just write the pitch of the note, without writing the numbers or slashes that indicate the duration. For example, “{/B,}C”, “{A,B,}C”, “{A,B,C}C”.
Next, let’s talk about “trill”. Just add a half-width English capital letter T directly to the main note; or add the English word trill enclosed in two half-width exclamation marks in front of the main sound. For example “Tc” or “!trill!c” is actually played as “c/8d/8c/8d/8c/8d/8c//”. Of course, the speed of vibrato performance is not necessarily so strict. Xiaobo only wrote it so strictly for the convenience of explanation.
Let’s talk about “echo” (roll), which is also translated into roll. Just add a half-width English capital letter R directly before the main note; or add the English word roll enclosed by two half-width exclamation marks before the main sound. For example “Rc” or “!roll!c” is actually played as “c/8d/8c/8B/8c2//”.
Emoticons
On the music score, in addition to the notes, we often see some text symbols to explain the way of singing and playing. Xiaobo, how is this expressed in ABC notation?
These symbols are generally called emoticons. In ABC notation, these emoticons are enclosed by two exclamation points and placed before the note of the emoticon object. The following is a list of some common emoticon marks, with simple instructions.
emoji | illustrate |
---|---|
!ppp! | extremely weak |
!pp! | very weak |
!p! | weak |
!mp! | Moderately weak |
!mf! | Zhongqiang |
!f! | powerful |
!ff! | very strong |
! fff! | extremely strong |
!breath! | breathe |
!///! | Tremolo with three slashes |
!arpeggio! | Arpeggio |
!<(! See strong starting point!<)! | crescendo end point |
!>(! See if the start point!>)! | fade-out end point |
note
So how to add attention to certain notes? For example, the fingering of the piano score, the chords of the guitar score, etc.
If it is a chord mark, use half-width double quotation marks to enclose the chord name and put it before the note. Such as “”C”C”, “”Dm”A”, “”G7″B”.
If it is a descriptive text such as piano fingering, in addition to enclosing it in half-width double quotation marks, it is also necessary to add a caret ” “, an underscore “`_`”, less than “<“, greater than “>” after the previous double quotation marks ” or of “@” to specify whether the text is marked above, below, to the left, to the right, or to the upper right of the noted note. For example, “” accented” C” means that there is the word “emphasized” above the “C” note. Of course, whether it is above or below has no visual effect on the ABC notation itself, and its visual function can only be played in some notation software that supports ABC codes.
If these symbols are to be added before a certain note at the same time, in what order should we write them?
The first one is the text description enclosed in double quotation marks, followed by the emoticon enclosed in exclamation marks, followed by grace marks, left parentheses of slurs, temporary diacritics, basic notes, and symbols representing sound groups. This is roughly the case with marks, marks for increasing or decreasing duration, unisonic hyphens or closing parentheses for slurs. If the slur needs to include grace notes such as appogamo, then the opening bracket should be placed in front of the opening curly bracket of the appogas. In fact, the marks placed in front of the notes, except for the ornamental marks, can also be arranged in a free order.
Chord
The combination of three or more tones of different heights according to a certain interval relationship is called a chord. The chords in traditional harmony are formed according to the principle of three-degree superposition.
Triad
A chord in which three notes are stacked in thirds is called a triad . From below, they are called根音the root
,三音the third
,五音the fifth
and are represented by numbers 1, 3, and 5.
in situ triad
A triad with the root as the bass is called an in-place triad, the root goes up to the third, and the third up to the fifth are all thirds.
Major triads
A major chord is a chord that has a root
, a major third
, and a perfect fifth
. When a chord has these three particular notes, it is called a major triad. For example, the major triad built on C, called a C major triad, has pitches C–E–G:
The root note to the third note is a major third. The third to fifth is a minor third, and the root to fifth is a perfect fifth.
-
The major chords are bright in color. Has major characteristics.
Chord root Major third Perfect fifth C C E. G C♯ C♯ E♯ (F) G♯ D♭ D♭ f A♭ D. D. F♯ A D♯ D♯ F♯♯(G) A♯ E♭ E♭ G B♭ E. E. G♯ B f f A C F♯ F♯ A♯ C♯ G♭ G♭ B♭ D♭ G G B D. G♯ G♯ B♯ © D♯ A♭ A♭ C E♭ A A C♯ E. A♯ A♯ C♯♯(D) E♯ (F) B♭ B♭ D. f B B D♯ F♯
Minor triads
a minor chord is a chord that has a root
, a minor third
, and a perfect fifth
.When a chord has these three notes alone, it is called a minor triad. For example, the minor triad built on C, called a C minor triad, has pitches C–E♭–G:
The root to third is a minor third, the third to fifth is a major third, and the root to fifth is a perfect fifth.
-
The minor triad is soft in color and has minor characteristics.
Chord root Minor third Perfect fifth cm C E♭ G C♯m C♯ E. G♯ D♭m D♭ F♭ (E) A♭ Dm D. f A D♯m D♯ F♯ A♯ E♭m E♭ G♭ B♭ Em E. G B Fm f A♭ C F♯m F♯ A C♯ G♭m G♭ B♭♭(A) D♭ G m G B♭ D. G♯m G♯ B D♯ A♭m A♭ C♭ (B) E♭ Am A C E. A♯m A♯ C♯ E♯ (F) B♭m B♭ D♭ f B m B D. F♯
Augmented triads
The root to the third is a major third, the orchid to the fifth is also a major third, and the root to the fifth is an augmented fifth.
- Augmented triads are dissonant and have a sense of expansion.
Diminished triads
The root to the third is a minor third, the third to the fifth is also a minor third, and the root to the fifth is a minus fifth.
- Diminished triads are dissonant and have a sense of contraction.
Major triads add minors; minor triads minors add Heng and Lan chords minors add minors; augmented triads increase majors.
Inverted chords
Using a chord tone other than the root note as the bass is called an inverted chord .
Triads have two inversions. Taking the third as the bass is the first inversion of a triad. The bass and the fifth are three degrees, and the bass and the root are six degrees, so they are called sixth chords, represented by the number “6”. Taking the fifth as the bass is the second inversion of a triad. The relationship between the bass and the root, and the bass and the third are fourths and sixths, respectively. Hence the name forty-six chords. With the number 64\frac{6}{4} 4 6 express.
seventh chord
A chord formed by stacking four notes in thirds is called a seventh chord. The three tones below the seventh chord are the same as the tones in the triad, and are called the root, three and five tones respectively. The fourth note is seven degrees away from the root note , so it is called the seventh note, represented by the number “7”.
major and minor seventh chords
Based on a major triad, the distance between the root and the seventh is a minor seventh chord; or a minor third is formed by superimposing the fifth note of the original major triad.
minor seventh chord
Based on the minor triad, the distance between the root and the seventh is a minor seventh; or a minor third is formed by overlapping the fifth note of the original minor triad.
Half Diminished Seventh (also called Diminished Seventh)
Based on the diminished triad, the distance between the root and the seventh is a minor seventh chord; or a major third is formed by superimposing the fifth note of the original diminished triad.
diminished seventh chord
Based on the diminished triad, the distance between the root and the seventh is a diminished seventh chord, or a minor third is superimposed on the fifth note of the original diminished triad.
Inverted seventh chord
There are three inversions of chords. The third, fifth, and seventh notes of the chord are the bass. After the inversion, its proper name is obtained according to the interval relationship between the bass and the seventh tone, and the interval between the bass and the root.
Fifth and sixth chords
The seventh chord with the second tone as the bass is its first inversion. After the inversion, the bass and the seventh are in fifth degrees, and the bass and root are in sixth degrees, so they are called five-six chords.
Three and four chords
The seventh chord with the fifth as the bass is its second inversion. After the inversion, the bass and the seventh are in thirds, and the bass and the root are in fourths, so they are called three-four chords.
second chord
The seventh chord with the seventh as the bass is its third inversion. After the inversion, the relationship between the bass and the root is a minor second, so it is called a second chord.
But there are still too many chords in the sonic pi, it is too difficult to understand
-
Later, too many handles were broken, so we removed the shell and found that pressing the circuit board of the broken handle can sometimes be used, but it is a little numb. ︎
-
God bless, my mother will never see this passage . ︎
-
Add: The solid dot on the right side of the notehead is called a dot, and the notes with dots are called dotted notes. Each dot extends the duration of the preceding note by half. ︎
-
Markdown-it renders
:|
as , I’m really speechless up ︎
This article is transferred from: https://blog.si-on.top/2023/8BitMusic&AbcNotation/
This site is only for collection, and the copyright belongs to the original author.