Library‎ > ‎Processing‎ > ‎examples‎ > ‎

minim(processing 2.x)

AnalyzeSound
This sketch demonstrates how to use an FFT to analyze the audio being generated by an AudioPlayer. FFT stands for Fast Fourier Transform, which is a method of analyzing audio that allows you to visualize the frequency content of a signal. You've seen visualizations like this before in music players  and car stereos.
FFT(高速フーリエ変換)を使って、信号の周波数成分を可視化します。音楽プレイヤーやカーステレオでみるようなビジュアリゼーションが見れます。

delayExample
   is an example of using the Delay UGen in a continuous sound example. Use the mouse to control the delay time and the amount of feedback in the delay unit.
 author: Anderson Mills Anderson Mills's work was supported by numediart (www.numediart.org)
UGen Delayを連続音再生で説明するサンプルです。マウスを操作することで、遅延時間とフィードバックを変更できます。
  // set the delay time by the horizontal location
  float delayTime = map( mouseX, 0, width, 0.0001, 0.5 );
  myDelay1.setDelTime( delayTime );
  // set the feedback factor by the vertical location
  float feedbackFactor = map( mouseY, 0, height, 0.0, 0.99 );

filterExample
   is an example of using the different filters in continuous sound.   
   author: Damien Di Fede, Anderson Mills
   Anderson Mills's work was supported by numediart (www.numediart.org)
OSCのフィルタを使うサンプル
OSC(OpenSound Control)
http://ja.wikipedia.org/wiki/OpenSound_Control


frequencyModulation
  A simple example for doing FM (frequency modulation) using two Oscils. Use the mouse to control the speed and range of the frequency modulation.
  Author: Damien Di Fede
2つのOscilを使用してFM(周波数変調)を行うための簡単な例。
マウスを使用して、周波数変調の速度と範囲を制御するする。

Get Meta Data
by Damien Di Fede.
This sketch demonstrates how to use the getMetaData method of AudioPlayer. This method is also available for AudioSnippet and AudioSampleYou should use this method when you want to retrieve metadata about a file that you have loaded, like ID3 tags from an mp3 file. If you load WAV file or other non-tagged file, most of the metadata will be empty, but you will still have information like the filename and the length.
このスケッチはAudioPlayergetMetaDataメソッドをどうやって使うかについてのデモ。このメソッドはAudioSample, AudioSnippetについても可能。このメソッドはmp3ファイルのID3タグのように、ロードしたファイルに関するメタデータを取得したいときに使用すべきです。WAVファイルまたは他の非タグ付けされたファイルをロードする場合は、メタデータのほとんどは空ですが、ファイル名や長さなどの情報は存在します。


loadFileIntoBuffer
This sketch demonstrates how to use the loadFileIntoBuffer method of the Minim class and is also a good reference for some of the methods of the MultiChannelBuffer class. When the sketch begins it loads a file from the data folder into a MultiChannelBuffer and then modifies that sample data before using it to create a Sampler UGen. You can hear the result of this modification by hitting the space bar.
このスケッチはMinimクラスのloadFileIntoBufferメソッドをどうやってつかうかデモします。また、MultiChannelBufferクラスのいくつかのメソッドについて、良いリファレンスでもあります。スケッチが始まると、データフォルダの中のファイルはMultiChallenBufferに向けてロードがはじまり、Sampler UGenを生成するサンプルデータを変更(modify)します。スペースキーを叩くと変更結果を効くことができます。
  


  MonitorInput
  /**
  * This sketch demonstrates how to monitor the currently active audio input 
  * of the computer using an <code>AudioInput</code>. What you will actually 
  * be monitoring depends on the current settings of the machine the sketch is running on. 
  * Typically, you will be monitoring the built-in microphone, but if running on a desktop
  * its feasible that the user may have the actual audio output of the computer 
  * as the active audio input, or something else entirely.
  * <p>
  * When you run your sketch as an applet you will need to sign it in order to get an input. 
  */
  
  PatchingAnInput
  /**
  * This sketch demonstrates how to create a simple synthesis chain that 
  * involves controlling the value of a UGenInput with the output of 
  * a UGen. In this case, we patch an Oscil generating a sine wave into 
  * the amplitude input of an Oscil generating a square wave. The result 
  * is known as amplitude modulation.
  */
  
  PlayAFile
  /**
  * This sketch demonstrates how to play a file with Minim using an AudioPlayer. <br />
  * It's also a good example of how to draw the waveform of the audio.
  */
  
RecordAudioInput
This sketch demonstrates how to an <code>AudioRecorder</code> to record audio to disk. 
To use this sketch you need to have something plugged into the line-in on your computer, or else be working on a laptop with an active built-in microphone. Press 'r' to toggle recording on and off and the press 's' to save to disk. The recorded file will be placed in the sketch folder of the sketch.
このスケッチはAudioRecorderを使って音声をディスクに保存します。このスケッチを使うためにはコンピュータのライン入力に何かを入力する必要があります。もしくはラップトップPCならビルトインのマイクがあるはずです。Rキーを押すことで録音開始・終了し、Sキーでディスクに保存します。録音されたファイルはスケッチフォルダのなかに保存されます。
★examplesから一度、自分のスケッチとして保存しておかないと、保存されません。


 RecordAudioOutput
 /**
  * This sketch demonstrates how to use an <code>AudioRecorder</code> to record audio to disk. 
  * Press 'r' to toggle recording on and off and the press 's' to save to disk. 
  * The recorded file will be placed in the sketch folder of the sketch.
  */
  
  Scrubbing
  /**
  * This is a relatively simple file player that lets you scrub forward and backward in an audio file.<br />
  * It should be noted that it's not *exactly* scrubbing because the playback speed is not changed,
  * it's simply that the position in the song is changed by very small increments when fast-forwarding or rewinding.
  * But the end result is convincing enough.
  * <p>
  * The positioning code is inside of the Play, Rewind, and Forward classes, which are in button.pde.
  */
  
  SequenceSound
  /**
  * This sketch demonstrates how to create synthesized sound with Minim using an <code>AudioOutput</code> and the
  * default instrument built into an <code>AudioOutput</code>. By using the <code>playNote</code> method you can 
  * schedule notes to played at some point in the future, essentially allowing to you create musical scores with 
  * code. Because they are constructed with code, they can be either deterministic or different every time. This
  * sketch creates a deterministic score, meaning it is the same every time you run the sketch. It also demonstrates 
  * a couple different versions of the <code>playNote</code> method.
  * <p>
  * For more complex examples of using <code>playNote</code> check out algorithmicCompExample and compositionExample
  * in the Synthesis folder.
  */
  
  SoundSpectrum
  /**
  * An FFT object is used to convert an audio signal into its frequency domain representation. This representation
  * lets you see how much of each frequency is contained in an audio signal. Sometimes you might not want to 
  * work with the entire spectrum, so it's possible to have the FFT object calculate average frequency bands by 
  * simply averaging the values of adjacent frequency bands in the full spectrum. There are two different ways 
  * these can be calculated: <b>Linearly</b>, by grouping equal numbers of adjacent frequency bands, or 
  * <b>Logarithmically</b>, by grouping frequency bands by <i>octave</i>, which is more akin to how humans hear sound.
  * <br/>
  * This sketch illustrates the difference between viewing the full spectrum, linearly spaced averaged bands, 
  * and logarithmically spaced averaged bands.
  * <p>
  * From top to bottom:
  * <ul>
  *  <li>The full spectrum.</li>
  *  <li>The spectrum grouped into 30 linearly spaced averages.</li>
  *  <li>The spectrum grouped logarithmically into 10 octaves, each split into 3 bands.</li>
  * </ul>
  *
  * Moving the mouse across the sketch will highlight a band in each spectrum and display what the center 
  * frequency of that band is. The averaged bands are drawn so that they line up with full spectrum bands they 
  * are averages of. In this way, you can clearly see how logarithmic averages differ from linear averages.
  */
  
  SynthesizeSound
  /**
  * This sketch demonstrates how to create synthesized sound with Minim 
  * using an AudioOutput and an Oscil. An Oscil is a UGen object, 
  * one of many different types included with Minim. For many more examples 
  * of UGens included with Minim, have a look in the Synthesis 
  * folder of the Minim examples.
  */
  
  TriggerASample
  /**
  * This sketch demonstrates how to use the <code>loadSample</code> method of <code>Minim</code>. 
  * The <code>loadSample</code> method allows you to specify the sample you want to load 
  * with a <code>String</code> and optionally specify what you want the buffer size of the 
  * returned <code>AudioSample</code> to be. Minim is able to load wav files, au files, aif
  * files, snd files, and mp3 files. When you call <code>loadSample</code>, if you just 
  * specify the filename it will try to load the sample from the data folder of your sketch. 
  * However, you can also specify an absolute path (such as "C:\foo\bar\thing.wav") and the 
  * file will be loaded from that location (keep in mind that won't work from an applet). 
  * You can also specify a URL (such as "http://www.mysite.com/mp3/song.mp3") but keep in mind 
  * that if you run the sketch as an applet you may run in to security restrictions 
  * if the applet is not on the same domain as the file you want to load. You can get around 
  * the restriction by signing all of the jars in the applet.
  * <p>
  * An <code>AudioSample</code> is a special kind of file playback that allows
  * you to repeatedly <i>trigger</i> an audio file. It does this by keeping the
  * entire file in an internal buffer and then keeping a list of trigger points.
  * <code>AudioSample</code> supports up to 20 overlapping triggers, which
  * should be plenty for short sounds. It is not advised that you use this class
  * for long sounds (like entire songs, for example) because the entire file is
  * kept in memory.
  * <p>
  * Use 'k' and 's' to trigger a kick drum sample and a snare sample, respectively. 
  * You will see their waveforms drawn when they are played back.
  */
  
  



Comments