Thursday, October 30, 2014

Just Intonation App / Compilation!

Thought you might be interested in a simple program I wrote (back in '09...) for calculating Just Intonation scales based on overtones. The link is here: http://www.joemariglio.com/winter09_10/scale_calc_browser/
In case you want the non-browser version: OSX WIN LNX
It offers a geometric way of constructing scales that line up with user-select-able equal divisions of the octave. Super basic, but possibly helpful?

KEYBOARD COMMANDS:
"+" - increase number of vertical bars (tones equal temperament)
"-" - reset number of vertical bars to 2
"c" - clear scale buffer
"r" - return scale buffer, printing to file named with date and time, located in app directory (file io won't work in browser version)

Another Just-Intonation related thing you might like is a compilation from the 80's, put together by a tape cassette 'zine' called Tellus, which was distributed out of a small arts collective in New York, called Harvestworks: http://www.ubu.com/sound/tellus_14.html .
This compilation features a multicultural take on Just Intonation, and even includes our friend Harry Partch!

Happy Tuning!

Tuesday, October 28, 2014

Exercise 4

Readings: Please read Chapter 4 from Miller's book.

Exercises:

1. In the Western tempered scale, if A is tuned to 440 Hz., what is the frequency of the D below it?

2. What is the frequency of the same D as in problem 1, using the Just Intoned scale in D instead of the tempered scale?

3. A major triad may be formed by the frequencies 100, 125, and 150 Hz. Another may be formed of frequencies two octaves up: 400, 500, 600. Which triad is likely to sound "sweeter"? Why?

4. How many equal-tempered tritones does it take to span the normal frequency range of the human ear?

5. Imagine a tuning system not based on equal divisions of an octave (R = 2), but rather a tripling of value (R=3). Assuming we keep the familiar 12 equal divisions of this "tritave", what would the equivalent of a major 3rd (ie, 4 "half-steps" up) be as a ratio?

Home Lab:

How much detuning makes an interval sound sour? This project is a test of the Helmholz theory of consonance and dissonance. The interval we'll work on is the fourth below 440 Hz. (and later, 220 Hz.)

First, using "sinusoid" objects, make a perfect fourth using the frequencies 440 and 330. You can connect them to the same "output" object so that they have the same amplitude as each other. Now drag the 330 Hz. tone down in frequency until, to your ears, the result starts to sound ``sour". How many Hz. did you have to decrease the 330-Hz. tone to make it sour? (If it never sounds sour to you at all, just report that.)

Now do the same things with pulse trains. You'll need the "pulse" object. Make two of them, frequencies 440 and 330, with "BW" (bandwidth) set to 2000, and connect them to an "output" object as you did with the sinusoids. Now reduce the 330-Hz. one to 329. What do you hear?

Now reduce it further until it sounds sour. How many Hz. less than 330 did you have to go? Was it further away than the tempered fourth (329.628)?

One could think that the number of Hz. you have to mis-tune an interval to get sourness might be a constant or else that it might be a constant proportion (i.e., interval). To find out, repeat the experiment for 220 Hz. and 165 Hz. Again, decrease the lower frequency (165) until you think it sounds sour. How many Hz. did it take and is it more nearly the same frequency difference or the same proportion?

Monday, October 20, 2014

Exercise 3

Readings:

Please read Chapter 3: Spectra from Miller Puckette's website.
Also, Chapter 2 from the Pierce book.

Exercises:

1) a) How many octaves above the fundamental is the 11th harmonic?
b) if the fundamental is 440 Hz, what is the frequency of this harmonic?
2) What is the closest equal temperament approximation to the interval between the 4th and 5th harmonic?
3) A low-pass filter has a frequency-dependent gain (as a ratio, not in dB) of
g(f) = 1/sqrt(1+(f/500Hz)) .
What is the gain, in dB, at 2000 Hz?
4) A virtuoso flautist, playing a perfect 1 kHz tone, generates only the first 3 odd harmonics with her instrument. At that very moment, a tugboat passes by and sounds its 55 Hz foghorn, containing the first 20 harmonics (even and odd).
a) What are the two harmonics closest in frequency to each other in this coincidence?
b) Are they within 10 Hz of each other?
c) Are they within a critical band?

Home Lab:

Critical bands and loudness. This project tries to investigate how loudnesses of clusters of sinusoids are perceived differently when they are spaced withing a critical band than otherwise. For this experiment you should try to set yourself up with a reasonable listening environment, either using headphones or playing through a stereo (but not your laptop speaker).

Start by connecting a single ``sinusoid" object with frequency 1000 Hz. to an ``switch" object (these objects are both in the Music 170 library).

Now make another version (in the same patch) with four sinusoids tuned to 960, 980, 1000, anad 1020 Hz.. Connect all four to th input of a second ``output" so that you can turn them on and off as a group, independently of the first one.

Make a third group of objects in the same way (or just duplicate the second group) but now set the frequencies to 500. 1000, 2000, and 4000.

Now, by turning them on and off (using the on/off control on the three output objects) equalize the outputs until all three are at a comfortable (reasonably soft) listening level. (If you have to push any of the output gains past about 90 dB, you should turn up your speaker instead. On my system I'm using gain values between 50 and 70.)

Now adjust the three output gains so that, as you turn them on one at a time, you judge them to have roughly equal loudnesses. Write down the three gain values you had to use to equalize them.

Since the four frequencies are roughly at the same level on the equal-loudness contour chart (Wikipedia is your friend), the different frequencies should be less a factor than the spacing. Is it in fact nearly true (or totally false) that in the close spacing example, you ended up adjusting the complex tone so that its power was roughly equal to the power of the single 1000 Hz. tone? Is that still true when the four frequencies are spread widely (500-4000)?

Tuesday, October 14, 2014

Exercise 2

1) Take a look at the sinusoid in Exercise 1, Problem 1. How many samples would you need to delay the recording by to make a sinusoid that is perfectly out of phase with the original?


2) Without adjusting either signals' level, mix the sinusoid from Exercise 1, Problem 1, with the sinusoid from Exercise 2, Problem 1. What is the estimated peak amplitude of the resulting signal?


3) 18th century Viennese pianos have 2 strings per note. Yours is fairly out of tune. You press a single key corresponding to strings with frequencies 440 Hz and 450 Hz. What is the frequency at which the resulting sound "beats"?


4) In a fit of indiscretion, you multiply a 15 kHz sinusoid by a 12 Khz sinusoid, recording it at a sample rate of 40 kHz. What two frequencies result?
Home Lab:


The homelab can be found here, after the numbered questions, under the heading "Project". Answer the questions related to this lab and include them with your responses to the Problem Set.

Saturday, October 11, 2014

Decibels in PureData

Just a quick reminder for those of you working on the Project for week 1:

PureData uses a slightly different form of dB than the one we derived in class. To convert between the two, simply add 100 to the level in standard dB to get the level in PureData's dB. Similarly, to convert a PureData dB to standard dB, subtract 100.

Professor Puckette could likely defend his decision for this better than I can, but I imagine he did this to keep the PureData dB values positive.

Tuesday, October 7, 2014

Exercise 1

Due Tuesday, 10/14, by 3:30pm.
Show your work!


Problem Set:



1. A recorded sinusoid has a sample rate of 48 kHz and a frequency of 660 Hz. What is its period in samples?
2. You take a recorded sinusoid of your favorite frequency, invert it, and multiply it by 2.
a) What is the change in gain?
b) How about the change in level (dB)?
3. What frequency is 1/2 octave above 330 Hz.?
4. A Nintendo Gameboy has 4 Digital-to-Analog Converter (DAC) channels, each capable of producing sound with a word length of 4 bits. What the Signal-to-Noise Ratio (SNR) for one of these channels?
5. If you generate a sinusoid of frequency 90 Hz, but only sample your sinusoid at a rate of 100 Hz, what frequency will you hear when you play it?


Home Lab:


The homelab can be found here, after the numbered questions, under the heading "Project". Answer the questions related to this lab and include them with your responses to the Problem Set.

Have fun!

Monday, October 6, 2014

Week 0: Spring Demo

This week, we introduced the course, the Professor, and the TA's. Afterwards, we demonstrated an amplified spring. This gave us an opportunity to talk about some interesting propagation effects. Although we weren't quite ready to explain all the effects mathematically (it was only the first day, after all!), we are well on our way.