gdritter repos when-computer / 67ce2c2
Merge branch 'master' of rosencrantz:/srv/git/when-computer Getty Ritter 7 years ago
3 changed file(s) with 19 addition(s) and 12 deletion(s). Collapse all Expand all
2323
2424 \img{/static/tuning/sin.svg}
2525
26 When we talk about the \em{frequency} of this sound, we're talking about the time between peaks in the wave. Frequency is measured in \em{hertz} (abbreviated as \em{Hz}),
27 which in this context just means "peaks of the wave per second".\ref{hertz}
28 \sidenote{It's also my least favorite kind of donut.}
29 Two sounds that have the same number of peaks per second are perceived by human being as being the same sound.
30
31 Additionally, sounds whose frequencies are simple ratios are perceived as somehow "pleasing", while sounds whose frequencies are related by more complicated ratios are perceived as "less pleasing". For example, this will play two frequencies in sequence and then together, one at 300 Hz, and one at 600 Hz, which are related by a \tt{2:1} ratio. The two sounds will sound appropriate to one another:
26 When we talk about the \em{frequency} of this wave, we're talking about how often the peaks in that wave show up. (The frequency is related to the \em{period} of the wave, which measures the distance between peaks in the waveform: the bigger the period, the less often peaks will show up.) Frequency is measured in \em{hertz} (abbreviated as \em{Hz}), which in this context just means "peaks of the wave per second".\ref{hertz} \sidenote{It's also my least favorite kind of donut.}
27
28 In reality, notes played by a physical instrument or produced by a human voice are a \em{lot} more complex than just this simple sine wave: they are often made up of several simultaneous waves combined together! However, even with very complicated musical sounds, we can still pick out the \em{pitch} of the sound, which is the frequency of the note that is perceptually dominant\ref{pitch}.
29 \sidenote{The pitch is heavily related to the \em{fundamental frequency} of a sound, but the two aren't identical: the pitch of a sound is a subjective perceptual property, which may not be identical to the fundamental frequency due to complexities in the sounds or the way we percieve them.}
30 Consequently, for our purposes here, we can treat every note as if it's associated with a single frequency, by which I will mean note's pitch. I'll often say "the frequency of the note" in this post when I in fact mean "the frequency of the pitch of the note".
31
32 Finally, let's to delve into perception a little bit here: this whole section is a very much handwavey, but bear with me. When notes that have the same pitch are played simultaneously, they are perceived by human being as being "the same note". Additionally, when notes whose pitches are simple ratios are played simultaneously, are perceived as somehow "pleasing" or "complimentary" to each other, while notes whose frequencies are related by more complicated ratios are perceived as "less pleasing".
33
34 For example, this will play two frequencies in sequence and then together, one at 300 Hz, and one at 600 Hz, which are related by a simple \tt{2:1} ratio. The two notes will sound appropriate to one another:
3235
3336 \audio{/static/tuning/consonant.mp3}
3437
3639
3740 \audio{/static/tuning/dissonant.mp3}
3841
39 In music and music theory, sounds which "go together" are said to be \em{consonant} and sounds which "don't go together" are called \em{dissonant}. There isn't a strictly-defined separation between the two: some pairs of sounds are clearly consonant (such as the \tt{2:1} ratio) and some are clearly dissonant, but there is no well-defined cutoff point where sounds stop being consonant and start being dissonant. It's best to think of them as relative to one another: a pair of sounds can be \em{more consonant} or \em{more dissonant} than another pair, rather than being \em{consonant} or \em{dissonant} on an absolute scale.\ref{condis} \sidenote{Also note that the terms \em{consonant} and \em{dissonant} are old, and have been informally and sometimes contradictorily defined for centuries: some people define them in terms of frequencies, some in terms of perception, some in terms of both. Defining them as \em{pleasant} and \em{unpleasant} is reductive, but not necessarily a bad intuition.}
42
43 In music and music theory, notes which "go together" are said to be \em{consonant} and notes which "don't go together" are called \em{dissonant}. When talking about two notes, we can refer to their difference as an \em{interval}, so consonance and dissonance are generally a property of intervals.
44
45 There isn't a strictly-defined separation between consonance and dissonance: some pairs of sounds are notes consonant (such as notes related by the the \tt{2:1} ratio) and some are clearly dissonant, but there is no well-defined cutoff point where an interval stops being consonant and start being dissonant. It's best to think of them as relative to one another: a pair of sounds can be \em{more consonant} or \em{more dissonant} than another pair, rather than being \em{consonant} or \em{dissonant} on an absolute scale.\ref{condis} \sidenote{Also note that the terms \em{consonant} and \em{dissonant} are old, and have been informally and sometimes contradictorily defined for centuries: some people define them in terms of frequencies, some in terms of perception, some in terms of both. Defining them as \em{pleasant} and \em{unpleasant} is reductive, but not necessarily a bad intuition.}
4046
4147 \h1{Picking Points in Sound-Space}
4248
5460
5561 \svgimg{/static/tuning/s2.svg}
5662
57 Next, \\(600 \\times \\frac\{3\}\{2\}\\) produces \\(900\\). That's outside the range I've chosen to display here: but, like before, we're going to be including not just 900 Hz, but also all the doubled and halved frequencies we can reach from 900 Hz, and one of those—450 Hz—is within the range of our graphic. Luckily, no matter which new tone we choose add, we're going to also be adding one corresponding tone in the 400 Hz to 800 Hz range, so whenever the new tone generated by application of the \tt{3:2} ratio is outside this range, I'll go ahead and halve it, so every new set of frequencies we generate will be in this range.
63 Next, \\(600 \\times \\frac\{3\}\{2\}\\) produces \\(900\\). That's outside the range I've chosen to display here: but, like before, we're going to be including not just 900 Hz, but also all the doubled and halved frequencies we can reach from 900 Hz, and one of those—450 Hz—is within the range of our graphic. Luckily, no matter which new tone we choose add, we're going to also be adding one corresponding tone in the 400 Hz to 800 Hz range, so whenever the new tone generated by application of the \tt{3:2} ratio is outside this range, I'll go ahead and halve it so we can only work with frequencies in this range.
5864
5965 \svgimg{/static/tuning/s3.svg}
6066
6565 (telml (translate-feed-file filename))
6666 (metadata (telml-meta telml)))
6767 (make-post filename
68 (localtime (stat:mtime (cadr file-entry)))
68 (localtime (meta-date metadata))
6969 (meta-slug metadata)
7070 (meta-title metadata)
7171 (meta-tags metadata)
11 ;; template-ey things and style things
2
3 (load "libs.scm")
24
35 ;; The date format we're using is {year:04}-{month:02}-{day:02}.
46 (define (date->string date)
2325 (name "Getty Ritter")
2426 (email "gettyritter@gmail.com"))
2527 (content
26 (@ (type "xhtml"))
27 (div (@ (xmlns "http://www.w3.org/1999/xhtml"))
28 ,(post-content post))))))
28 (@ (type "html"))
29 ,(++ "<![CDATA[" (serialize-sxml (post-content post)) "]]>")))))
2930
3031 (define (atom-feed posts)
3132 (let ((updated (date->tz (post-time (car posts)))))