Difference between revisions of "220a-fall-2014"

From CCRMA Wiki
Jump to: navigation, search
(Tutorial Session Oct. 6: HW1)
Line 27: Line 27:
  
 
* open a terminal
 
* open a terminal
* <pre>cd</pre> to the directory where you want to create your data file like: cd Desktop/220a/
+
* cd to the directory where you want to create your data file like: cd Desktop/220a/
 
* type: touch myData.dat This creates an empty file called myData.dat.
 
* type: touch myData.dat This creates an empty file called myData.dat.
 
* type: nano myData.dat This opens the file you just created in the terminal.
 
* type: nano myData.dat This opens the file you just created in the terminal.
Line 34: Line 34:
 
* do ctl+o to save the values in myData.dat
 
* do ctl+o to save the values in myData.dat
 
* do ctl+x to exit nano
 
* do ctl+x to exit nano
 +
 +
== How do I create an HTML file? ==
 +
 +
As Chris suggested, one way to do it is to use LibreOffice: https://ccrma.stanford.edu/courses/220a-fall-2013/resources/hw-factory-instructions.html
 +
 +
You can also write an HTML file from scratch. Here's a very good tutorial on that topic: http://www.w3schools.com/html/
 +
 +
As an example, your HW1 html file could look like:
 +
 +
<pre>
 +
 +
</pre>
  
 
= Tutorial Session Sept. 26: HW1, simplest Chuck code & UNIX =
 
= Tutorial Session Sept. 26: HW1, simplest Chuck code & UNIX =

Revision as of 09:44, 7 October 2013

Welcome on the Music 220a wiki!

Music Presentation Sign Up

Please use your full name as appeared on the class list.

  • 09/26 (THU) : 3 volunteers :)
  • 10/01 (TUE) : Chet Gnegy, Madeline Huberth, Holly Jachowski
  • 10/03 (THU) : Elliot Kermit-Canfield, Graham Davis, Clark Pang
  • 10/08 (TUE) : Victoria Grace, Alex Ramsey, Alex Chechile
  • 10/10 (THU) : Ezra Crowley, Freddy Avis, Diego Aguilar
  • 10/15 (TUE) : Nette Worthey, Constantin Basica,
  • 10/17 (THU) :
  • 10/22 (TUE) :
  • 10/24 (THU) :
  • 10/29 (TUE) :
  • 10/31 (THU) :
  • 11/05 (TUE) :

Tutorial Session Oct. 6: HW1

How do I format a .dat file on Linux?

Well it's very simple, just create a text a text file in gedit and fill it with the values you'd like to use. There must be one value per line and the last line of the file must be left blank.

How do I format a .dat file on Mac OSX?

  • open a terminal
  • cd to the directory where you want to create your data file like: cd Desktop/220a/
  • type: touch myData.dat This creates an empty file called myData.dat.
  • type: nano myData.dat This opens the file you just created in the terminal.
  • copy and paste the data values in the terminal.
  • make sure that you have at least one blank line at the end of your file.
  • do ctl+o to save the values in myData.dat
  • do ctl+x to exit nano

How do I create an HTML file?

As Chris suggested, one way to do it is to use LibreOffice: https://ccrma.stanford.edu/courses/220a-fall-2013/resources/hw-factory-instructions.html

You can also write an HTML file from scratch. Here's a very good tutorial on that topic: http://www.w3schools.com/html/

As an example, your HW1 html file could look like:


Tutorial Session Sept. 26: HW1, simplest Chuck code & UNIX

Quick UNIX tutorial: http://freeengineer.org/learnUNIXin10minutes.html

Download Chuck: http://chuck.cs.princeton.edu/release/

Download MiniAudicle: http://audicle.cs.princeton.edu/mini/

//TriOsc, SqrOsc, etc
SinOsc a => dac; 
//a => dac.right;
//a => dac.left;

440 => a.freq;
0.9 => a.gain;

while(true){
    //<<< Std.rand2f( 100.0, 1000.0 ) >>>;
    Std.rand2f( 100.0, 1000.0 ) => a.freq;
    100::ms => now;
}