Difference between revisions of "Stompbox Real Sensors"

From CCRMA Wiki
Jump to: navigation, search
(Build the Button and LED Circuit)
(Putting it all Together)
Line 77: Line 77:
 
== Putting it all Together ==
 
== Putting it all Together ==
  
* Create a patch to make sounds based on button and sensor values from the Arduino. You can try to adapt your patches from Lab 1, or come up with a new patch.  
+
* Create a new effect whose parameters are adjustable by the potentiometers and button.
  
* Try to make a simple musical interaction. Think about music -
+
* Think about the result
 +
** do the controls allow the entire space of parameters to be explored?
 +
** is it easy to choose any desired set of parameters?
 +
** does the effect sound good?
 
** does it have dynamics?
 
** does it have dynamics?
** can you turn the sound off?
+
** would you want to use it live?
** can it be expressive?
+
*** If not, what is missing still?
 
+
 
+
 
+
 
+
 
+
  
 
== Appendix: Install Stompbox Firmware onto your Arduino Nano ==
 
== Appendix: Install Stompbox Firmware onto your Arduino Nano ==

Revision as of 07:17, 18 May 2011

Lab 2: Controlling an Effect with Real Sensors
Designed by Edgar Berdahl

Due on Wednesday, July 20th at 9AM


Download software

  • Make a Lab2/ folder for this lab.
  • Download the following:
    • Arduino Software
      • If you have never used an Arduino with your computer before, you need to install the FTDI driver that comes with the Arduino software; this enables your computer to recognize the USB serial communication chip on the Arduino.
    • Firmata firmware (use firmata2.0beta3.zip)
    • Either Maxuino or Pduino.

Power Connections

  • In order to run circuits on the breadboard, you need to get power to it. The Arduino gets 5V from the USB connection, so in this section you will make the 5V accessible to the breadboard.
  • Make sure that your Arduino is mounted at the very end of the breadboard with the higher-numbered rows, as shown in the following picture. In that case, the GND and 5V pins will end up in the 19th row. (Otherwise if your Arduino isn't mounted this way, you simply won't be able to rely on the row numbers, but you can still figure out how to wire things up!)
  • Recall first that that holes in the solderless bread board are wired together as shown:

Breadboard.png

  • Using short jumpers, connect the GND row to the blue "GND" bus on the breadboard, and connect the 5V row to the red "power" bus on the breadboard.
  • Connect the "GND" and "power" busses from both sides of the breadboard together as shown.

Circuit0-big.jpg


Viewed from further away, your breadboard should now look like the following:

Circuit0.jpg

First Circuit: Potentiometer

Now you will build the following voltage divider circuit, to connect one potentiometer to analog input A0.

Pot-A0.jpg

For some help on placing the wires, please see the following picture. In order to ensure the correct orientation, ensure that the text on the potentiometer is facing away from the Arduino (see also oblique picture in next section). Circuit2.jpg

Add A Second Potentiometer

Now connect a second potentiometer to analog input A3 using the same voltage divider circuit.

SBcircuit3-direct.jpg


Again, ensure that the text on the potentiometer is facing *away* from the Arduino (see the red boxes in the following figure):

SBcircuit3.jpg

Add A Button

Most stomp boxes have a button, so we include that as well according to the following circuit:

SBbutton-circuit.jpg

The corresponding picture of the bread board is shown below:

SBcircuit5.jpg


Add An LED

Finally, we add an LED for fun and to help with debugging.

SBcircuit6.jpg



Putting it all Together

  • Create a new effect whose parameters are adjustable by the potentiometers and button.
  • Think about the result
    • do the controls allow the entire space of parameters to be explored?
    • is it easy to choose any desired set of parameters?
    • does the effect sound good?
    • does it have dynamics?
    • would you want to use it live?
      • If not, what is missing still?

Appendix: Install Stompbox Firmware onto your Arduino Nano

If this wasn't already completed for you before starting the lab, then you must do it yourself!

  • Change to the ~/stompbox directory by typing cd ~/stompbox at the console.
  • From the terminal, run the command arduino & to start up the Arduino software.
  • From the menu Tools|Board choose Arduino Duemilanove or Nano w/ 328
  • From the menu Tools|Serial port choose /dev/ttyUSB0
  • Open the sketch ~/stompbox/simple-stompbox/FirmataAllInputs_ExceptOnePWMOut/FirmataAllInputs_ExceptOnePWMOut.pde
  • Press the Verify button.
  • Check the Arduino messages window to make sure that you have successfully installed the firmware. (Usually, it will say something like Done compiling and Binary sketch size ...)

Important Note

Some small amount of the text and images here was taken from prior laboratory exercises for the course Music 250A. We regret that we do not know who contributed these elements, but these people are likely to include Wendy Ju, Bill Verplank, Michael Gurevich, and possibly more.


Stompbox 2011