Skip to main content

GitHub and Git; Intro to Sound unit

Texts to have read/watched:

Work to have achieved:

Plan for the day

  1. GitHub for Poets review (15-25 min)
  2. First project assignment: Soundscape Narrative (10-15 min)
  3. Audacity Tour, by way of a past-semester example (10-15 min)
  4. Git Beyond GitHub (10 min)
  5. Multiple views of the same files
  6. HW Preview

1. GitHub for Poets review (25 min)

Take 5 minutes or so to write on your own, from memory, about the video(s) you watched over the weekend: what stands out? what do you take away? what are you left wondering?
Next, in pairs, compare your impressions. Help each other with your questions; be ready to share remaining questions or big takeaways. Spend another 5-8 minutes here.

EXT: What do you think are the limitations of the GitHub interface? What are some things you might want to do with Git that you haven’t yet seen? Conversely, what do you think GitHub, as a website, might do better than Git at the command line?

Okay, so back to full-class discussion. What are your takeaways? Your remaining questions?

2. First project: Soundscape Narrative (20 min)

As I explained in the syllabus, your first project is to arrange layers of sound to convey a sense of place and story. In assigning this, I have two main goals for you:

  1. to learn how to capture sound and edit it using digital tools, and
  2. to explore the affordances of sound as a medium,

with particular attention to its ability to communicate

  • immersive environment and
  • narrative pacing and change.
To read the full assignment – and fork a copy for yourself – go to https://github.com/benmiller314/soundscape2020spring.

Let’s read through this together.

3. Audacity Tour, by way of a past-semester example (10-15 min)

I want to start with a behind-the-scenes view of one of the finished soundscapes I’ll ask you to listen to for homework.

This is Tyller Barner’s “Coffeeshop Conversations,” from Spring 2019. I’m very happy to talk at some point about the piece itself, but for now, let’s see what it can show us about this new application, Audacity.

Initial questions to ask:

  • How is the space of the app laid out?
  • What’s given the most prominent visual focus?
  • What features/tools do you have quick access to?

Now let’s play

Project files vs. rendered files

Important: Audacity project files, with extension .aup, do not in themselves contain any sound. They are, instead, an index of the files that live in an adjacent folder: if your main file is project.aup, then the data folder is project_data. The .aup file and the \_data folder must always live in the same containing folder, and move together. If you have one in your repository but not the other, the project will not open properly!

NB: You should never need to manipulate the files in the _data folder directly: just let Audacity handle them.

4a. Git Beyond GitHub (10 min)

The number of files in the _data folder can get quite large – easily into the hundreds. And the GitHub web interface, as great as it is, cannot handle that many files at once. Trying might well break your project.

So we’ll need another solution.

Luckily, we have one! As you’ll have learned from the videos, GitHub as a (mostly web-based) file-sharing and project-management platform is built on top another system – Git – which runs mostly on text commands.

And Git can handle quite a bit more than GitHub can… and then share it seamlessly to GitHub, with all the hard work taken care of.

In particular:

  • Git lets you "stage" multiple files at once and wrap them in a single commit.
  • Git lets you keep track of changes locally (on your own computer) before you're ready to share them with the world – and then to "push" multiple commits all at once.
  • If you use the command line, you can also access and activate more features of Git than the GitHub defaults allow.

Clone Warriors

All of that depends on getting your files from GitHub onto your own computer, while still keeping them linked and tracked.

Which means it’s now time to clone the repository you just created: that is, let’s download it and make sure we’re still tracking it with the same Git commit history.

github clone or download button

There are three ways…

github clone or download button, open
  • download zip (but I don't recommend this)
  • command line: git clone %clone_url%
  • open in desktop (I recommend this)
    • If you haven't yet downloaded GH Desktop, it'll automatically redirect you to a page where you can.
github open in desktop – choose file location
Click that little "choose" button to get a dialog box, letting you put the files somewhere you can access them easily.

5. Multiple Views of the Same Files

Where do the files go when you clone them? You could use Windows Explorer or Mac Finder to open the folder you just saved to…

… but how to do commits there? How to see file history?

The command line: behind the scenes

See also the “Git and GitHub for Poets” episode 1.5, intro to the command line.

Much as a repository is just another name for a file folder you’re tracking, the command line is just another way of seeing the files you’re used to seeing in windows. (Note the lowercase ‘w.’) Instead of a graphical interface, everything here will be text.

The command line goes by many names: a.k.a. Terminal on Mac, or GitBash (or PowerShell) on Windows. If you’re not sure how to open it, try these instructions.

terminal window showing git status command
Above, a terminal window. In the top line, the text to the left of the dollar sign ($) is a "prompt," showing where you are and who you're logged in as; text to the right are commands entered. Here, git status yields information about the repository's state (what's new, modified, or deleted since the last commit) and gives tips about how to proceed (last line before the return of the prompt).

To get where you’re going:

cd path/to/your/folder    # change directory
pwd               # print working directory (i.e. where am I?)
ls                # list directory contents
cd ..             # go up one directory level
cd ~              # go to home folder
open .            # open the current directory in Finder/Explorer

NB: As a shortcut to the folder path in step one above, you can type cd (note the space) and just drag-and-drop the folder from Finder/Explorer into the command line. NB: You can also press tab to autocomplete a partial file or folder name.

Change something in one view, and it changes in the other. Because it's really the same place.

Basic git workflow:

git status           # see what git is tracking / what's changed
git pull             # download changes from GitHub
git status           # start of loop
# here you make changes to your files
git add %filename%   # optionally repeat
git status
git commit -m "your headline commit message - note the quotes" -m "your optional extra details, if you want them, just go in a second message."
                     # repeat add/commit loop as desired
git push             # publish your changes

NB: Git may present you with some error messages, especially the first time you try to use it. Don’t panic: read what the error message has to say! Most of the time, they’ll give you some clear instructions on what to do to fix the problem.

Yet another view

Alternately, if you’ve downloaded GitHub Desktop, you can use a visual interface to accomplish all of those local commands. And it’ll also generously prompt you to push changes when you’ve finished committing them.

github desktop shows status and diff view by default
Above, Github Desktop. Checking the boxes at the left is akin to git add; uncheck to unstage individual files, as they'll all be selected by default. Commit messages are entered at the bottom left. A button to push is part of the toolbar at the top right.

(NB: If you haven’t tried GH Desktop in a few years, it’s vastly improved since then.)

4b. Back to Git Beyond GitHub

With all that settled, let's finally take advantage of Git outside of GitHub, and make two changes in the same commit:
  1. rename the README.md file to ASSIGNMENT.md, and
  2. create a new README.md file that describes, in your own words, what you think you might make in this space. (Don't worry, you can always change it later.)
Then push your changes so they appear on GitHub.

Atom editor would be especially useful here!

EXT: If you’re already good with all this – e.g. if you’ve used Git before – please help others who are catching up.

HW for next time:

  • Download the Audacity audio editor, or update to the latest version if you already have it.
  • Bring headphones – we should have time to practice using it!

  • Listen to the following recordings made by students in response to a similar prompt:
  • Listen, as well, to the following audio tracks from the first few minutes of successful TV dramas:
    • Breaking Bad. Sound extracted from https://www.youtube.com/watch?v=D-G8weg2Ndg under Fair Use, for instructional purposes.
    • Battlestar Galactica. Sound extracted from https://www.youtube.com/watch?v=9VBTcDF1eVQ under Fair Use, for instructional purposes. (NB: starts very quiet)
  • Write a short blog post to the appropriate thread on the issue queue: What do you notice, i.e. what stands out while reading or listening? What does that suggest, or what does it make you wonder?