Difference between revisions of "Testing audio output"

From CCRMA Wiki
Jump to: navigation, search
Line 1: Line 1:
 
== Recording/Analyzing Signals
 
== Recording/Analyzing Signals
  
* Easiest: just write a binary output file.  The [[http://audacity.sourceforge.net/ Audacity]] audio editor can "Import Raw" audio. Select the correct format and import. Audacity is installed on all CCRMA machines or can be downloaded for free [http://audacity.sourceforge.net/ here]. You will automatically view the time domain signal. To see the frequency response, you can select a portion of audio and click Analyze->Plot Spectrum.
+
* Easiest: just write a binary output file.  The [http://audacity.sourceforge.net/ Audacity] audio editor can "Import Raw" audio. Select the correct format and import. Audacity is installed on all CCRMA machines or can be downloaded for free [http://audacity.sourceforge.net/ here]. You will automatically view the time domain signal. To see the frequency response, you can select a portion of audio and click Analyze->Plot Spectrum.
  
 
==Reference Signals==
 
==Reference Signals==
Line 7: Line 7:
 
When creating signal generators yourself, you will want to compare your audio output to reference signals. Here are a few audio programing languages/environments that might be useful.
 
When creating signal generators yourself, you will want to compare your audio output to reference signals. Here are a few audio programing languages/environments that might be useful.
  
*[[http://chuck.cs.princeton.edu/ Chuck]]-audio programming language (suggested for ease-of-use)
+
*[http://chuck.cs.princeton.edu/ Chuck]-audio programming language (suggested for ease-of-use)
  
*[[http://puredata.info/ Pure Data]]- a graphical audio programming language
+
*[http://puredata.info/ Pure Data]- a graphical audio programming language
  
*[[http://www.audiosynth.com/ SuperCollider]]-audio programming language
+
*[http://www.audiosynth.com/ SuperCollider]-audio programming language
  
 
== SAMPLE CHUCK CODE==
 
== SAMPLE CHUCK CODE==

Revision as of 15:04, 22 September 2010

== Recording/Analyzing Signals

  • Easiest: just write a binary output file. The Audacity audio editor can "Import Raw" audio. Select the correct format and import. Audacity is installed on all CCRMA machines or can be downloaded for free here. You will automatically view the time domain signal. To see the frequency response, you can select a portion of audio and click Analyze->Plot Spectrum.

Reference Signals

When creating signal generators yourself, you will want to compare your audio output to reference signals. Here are a few audio programing languages/environments that might be useful.

  • Chuck-audio programming language (suggested for ease-of-use)
  • Pure Data- a graphical audio programming language

SAMPLE CHUCK CODE

   // Comment/uncomment the different oscillators to hear each 
   SinOsc s => dac;
   //TriOsc s => dac;
   //SqrOsc s => dac;
   //PulseOsc s => dac;
  .2 => s.gain;
   while( true )
   {
       440.0 => s.freq;
       100::ms => now;
   }
   // Use this for impulse
   //Impulse i => dac;
   //while( true ) {
   //    1.0 => i.next;
   //    100::ms => now;
   //}
   // Use this for noise 
   //Noise n => dac;
   //.2 => n.gain;
   //while( true )
   //{
   //    100::ms => now;
   //}


Download and install. From there you'll need to create a small bit of code to make the same output signals.