7745 Audio FX

From CCRMA Wiki
Revision as of 08:32, 21 January 2020 by Eberdahl (Talk | contribs) (Starting Audio And Pd)

Jump to: navigation, search

Audio Effects in Pd

Most instructions by Edgar Berdahl, and lab patches for musical interaction description by Matt Wright and possibly others

For this lab you need your Satellite CCRMA kit, a computer to program it, and some headphones with a mini 1/8" stereo jack.




The Satellite CCRMA Setup (Before Adding Arduino)

Included in your kit so far you should have

- Raspberry Pi Model B (with 512MB of RAM)
- One memory card (it may already be inserted into your Raspberry Pi)
- One Ethernet cable for communication with your laptop
- One USB micro cable
- One USB audio interface with 1/4" connectors

If you are missing something, please go get it before assembling your kit. Make sure the SD memory card is seated all of the way in its slot.



Powering Up For The First Time

  • Plug the Ethernet port of the Raspberry Pi into your laptop.
  • Plug the USB audio device into the Raspberry Pi. (The USB audio device won't work if you plug it in after it has booted up.)
  • Then use the USB micro cable to power up the Raspberry Pi. (If you have a USB power supply, you could use it to power the Raspberry Pi, or if not you can try using your laptop's USB connector to power the Rasberry Pi.) You should see some lights turn on, flickering every now and then. This means that the Raspberry Pi is booting up.



Connect To Satellite CCRMA

In order to see what your Satellite CCRMA kit is doing and program it, you need to log in to it. To do so, follow these instructions.

After you login, you will see the prompt ccrma@satellite:~$ This means that you are logged into a computer named "satellite" as the user "ccrma", and you are currently in the directory ~, which is the shortcut for your home directory.



Avoid Powering Down the Board Without Halting it First!

Would you take the battery out of your laptop and unplug its power adaptor without shutting down? I don't think so! The same goes for Satellite CCRMA, at least when you can avoid it, because it is a small computer running linux.

Now we will test the halt procedure. Run the halt command as superuser by typing sudo halt at the Satellite CCRMA prompt. Then you will again have to type in the password temppwd in order to have the privilege to run this command. Wait until about 15 seconds after you see the message "Connection to 192.168.105.106 closed by remote host," and then disconnect the power from the Raspberry Pi via the micro USB connector.



Getting Comfortable With Satellite CCRMA

  • Turn on Satellite CCRMA again using the same procedure as before by plugging the micro USB connector into the Raspberry Pi. After about 30 seconds, the board should be booted up again, so you can log in again by running the command

ssh -XY ccrma@192.168.105.106

  • Run the command pwd to find out the current directory. You will find that you are in the ccrma subdirectory of the directory /home.
  • Type the ls command to see what is in the current directory. The blue items are subdirectories of the current directory. You can change directories using the cd command. For instance, to change into the pd subdirectory, you should run the command

cd pd

  • Now again type pwd to make sure that you understand where you are! Run the ls command to see what files are in here.



Starting Audio And Pd

  • In order to be able to hear audio, you will need to plug a pair of ear buds, headphones, or loudspeakers into the audio output jack (this jack is marked with an image of a pair of "headphones").
  • Start pd now with the following command

pd &

This time the graphical user interface (GUI) for pd should also start.

  • To start audio, click on the DSP checkbox in the main window.
  • Now to test audio, go to the media pull-down menu and choose Test Audio and MIDI... If you still do not here any sound, then probably you missed one of the steps so far. If you look at the messages in the main pd window, you might find a clue.
  • Once you have audio working, close the window test audio and MIDI window.
  • Next, to enable the audio input from the USB audio adapter, go to and make it look like this:

MicInput.png

  • Choose Open from the File menu and select the patch 03.adjustable.volume.pd within the ~/pd/labs-2018-Music-7745/2.audiofx-lab subdirectory. Then go back to the patch, make sure that you have a microphone connected to the input of your sound interface (e.g. a piezo from the previous lab), and observe that the volume control works.
  • Go through the other patches in this directory, becoming more familiar with how those other effects work.
  • Open the patch 30.exercise.pd. Design your own effects chain (for example by copying and pasting the other effects into this patch or creating your own new effects) to process the sound from the microphone to create a sound for the loudspeaker.
  • Record a 30-second ditty of your new digital musical instrument. Submit a ZIP file of the ditty as well as a picture (if your instrument looks different than in the previous week).

Troubleshooting: If you still do not here any sound, then probably you missed one of the steps so far. If you look at the messages in the main pd window, you might find a clue.

List Of Objects

  • You can search that list by using your browser's search function. (Some of the pd extended objects are installed but not all of them.)




The Community

There is a large, dedicated, and very generous community of Pd users on the Internet. Do some web searching (e.g., with a search engine, or else starting from some more specific resources) and look for interesting externals and/or patches. Optional: Download, install, and play with at least one. Can you incorporate it into what you programmed in the previous part?

For more help in finding resources, don't forget to look on the PID Links page.



Appendix: Troubleshooting

Tips:

  • If you are having problems with audio, make sure that compute audio is set to on.
  • If the audio is stuttering, then your processor might not be powerful enough to run all of the patches that are open. Remember, Satellite CCRMA is not as powerful as a laptop. Therefore, be careful about building complicated patches. You can monitor how much CPU you are using by running the top command in the terminal.
  • Type dmesg to see if there are any relevant messages that look like error messages.

Solutions:

  • If you are running out of space on the SD card, you can free up some space by deleting some packages. Run

wajig large

to see which packages are the largest.