MUMT 307

Outline

  • Uploading html files
  • Basic Unix commands
  • Setup sftp client
  • Upload files to your home page (lab)
  • Spectrum
  • Digital filters
  • Modifying existing Javascript webpages (lab)

MUMT 307

Upload your html files to music.mcgill.ca

  • Open a Terminal / Command Prompt
  • Login by: ssh username@music.mcgill.ca
  • Enter password: (case sensitive and there's no echo)
  • If you're successful you should see the prompt:
    -bashr-3.2$
  • Once logged in go to the home directory for your web pages: cd public_html
  • To edit your home page (index.html): nano index.html
  • Or upload files using an sftp client, e.g., Filezilla and CyberDuck
  • Change your password using: passwd

MUMT 307

Basic Unix Commands

  • To change directories: cd
    • To go up a directory: cd ..
  • To make a new directory: mkdir DIRECTORY_NAME
  • To list files in a directory: ls
  • To edit a file: nano FILNE_NAME
  • For more information on a command: man COMMAND_NAME
  • For more, see Unix/Linux Command Overview
  • For a tutorial on Unix commands see: Unix/Linux Tutorial for Beginners

MUMT 307

Setting up your sftp client

  • Download a client: FileZilla, Cyberduck, or Komodo
  • FileZilla
    • Use "Site Manager..." under "File" menu
  • Cyberduck
    • Use "New Bookmark..." under "Bookmark" menu
  • Komodo
    • Use "Preferences" under "Komodo" menu; then Servers
  • Create an index.html file and upload to your homepage (public_html)

MUMT 307

Spectrum

  • Frequeny domain vs time domain representations of signals
  • Demo: Web Audio API Visualizer
  • A demo with Web Audio API oscillator
  • Additive synthesis for band-limited waveforms
    • Square wave: odd harmonics with decreasing amplitude (-6dB) (1/(2n+1)) y = sin x + (1/3) sin 3x + (1/5) sin 5x + (1/7) sin 7x + ...
    • Triangle wave: odd harmonics with decreasing amplitude (-12dB) (1/(n*n)) y = sin x + (1/9) sin 3x + (1/25) sin 5x + (1/49) sin 7x + ...
    • Sawtooth wave: all harmonics with decreasing amplitude (-6dB) (1/n) y = sin x + (1/2) sin 2x + (1/3) sin 3x + (1/4) sin 4x + (1/5) sin 5x +...
  • DFT and FFT: Fourier's theorem
  • Gary's notes on Spectrum

MUMT 307

Digital Filters

MUMT 307

Digital Filters: Simple examples

  • Sample inputs (SF: sample frequency):
    • a @ 0Hz -> {1, 1, 1, ...}
    • b @ SF/2 Hz -> {1, -1, 1, -1, ...}
    • c @ SF/4 Hz -> {1, 0, -1, 0, 1, 0, -1, ...}
  • Case 1: y(n) = x(n) + x(n-1)
    • a -> {1, 2, 2, 2, ...}
    • b -> {1, 0, 0, 0, ...}
  • Case 2: y(n) = x(n) - x(n-1)
  • Case 3: y(n) = x(n) + x(n-2)
  • Case 4: y(n) = x(n) - x(n-2)

MUMT 307

Digital Filters: Simple examples

  • Sample inputs (SF: sample frequency):
    • a @ 0Hz -> {1, 1, 1, ...}
    • b @ SF/2 Hz -> {1, -1, 1, -1, ...}
    • c @ SF/4 Hz -> {1, 0, -1, 0, 1, 0, -1, ...}
  • Case 1: y(n) = x(n) + x(n-1)
    • a -> {1, 2, 2, 2, ...}
    • b -> {1, 0, 0, 0, ...}
  • Case 2: y(n) = x(n) - x(n-1)
    • a -> {1, 0, 0, 0, ...}
    • b -> {1, -2, 2, -2, ...}
  • Case 3: y(n) = x(n) + x(n-2)
  • Case 4: y(n) = x(n) - x(n-2)

MUMT 307

Modifying existing Javascript webpages

  • Download the main source
  • Inspect the main source to look for dependent files (.js, .css)
  • Download the dependent files to appropriate places
  • Edit the main source code to reflect the locations of the dependant files
  • Test it on the local file system with the Error/Javascript Console
  • Upload the files to the remote web server
  • Test the webpage
  • Try with the Web Audio API Filter
  • Try with the Web Audio API Visualizer