Audio File In CHOP

From Derivative
Jump to: navigation, search

Summary
[edit]

The Audio File In CHOP reads audio from files on disk or at http:// addresses. File types .mp3, .aif, .aiff, .au, and .wav files are supported. It always outputs time sliced audio data. If you want to record the data, use a Record CHOP or Movie File Out TOP.

See Audio Movie CHOP for reading from movie files. See OSC In CHOP for receiving audio streams via OSC.

For large files the Audio File In CHOP streams the file from disk so loading the entire file into memory is not needed.

  • It streams files from disk and from http: locations (latter copies to local disk first) - It only keeps a few seconds in memory at a time.
  • The supported audio files are .mp3 .aif .aiff .wav and other audio formats.
  • It also plays audio-only from any movie files that TouchDesigner supports, like .mov, .mpg .mp4. See also the Audio Movie CHOP for playing audio from movie files in sync with their video.
  • Audio files can be dragged/dropped onto TouchDesigner, double-clicked (if preferred), and RMB Open With... TouchDesigner.

PythonIcon.pngaudiofileinCHOP_Class


Parameters - Audio File In Page

File file - Path of source.

Reload reloadpulse -

Play play - Audio will playback when this is set to 1 and stop when set to 0.

Play Mode playmode - - Specifies the method used to playback the audio, there are 3 options.

  • Locked to Timeline locked - This mode locks the playback position to the timeline. Scrubbing or jumping in the timeline will change the song position accordingly. The parameters Play, Reset, Speed, and Index are disabled in this mode since the timeline is directly tied to playback position.
  • Specify Index specify - This mode allows the user to specify a particular position in the song using the Index parameter below. Use this mode for random access to any location in the audio stream.
  • Sequential sequential - This mode continually plays regardless of the timeline position (the Index parameter is disabled). Reset and Speed parameters below are enabled to allow some control.

Speed speed - This is a speed multiplier which only works when Play Mode is Sequential. A value of 1 is the default playback speed. A value of 2 is double speed, 0.5 is half speed and so on. This node can not play audio backwards so negative values will not work well.  

Cue cue - Jumps to Cue Point when set to 1. Only available when Play Mode is Sequential.

Cue Pulse cuepulse -

Cue Point cuepoint - Set any index in the song as a point to jump to.  

Cue Point Unit cuepointunit - -

Index index - This parameter explicitly sets the song position when Play Mode is set to Specify Index. The units menu on the right lets you specify the index in the following units: Index, Frames, or Seconds.  

Index Unit indexunit - -

Repeat repeat - - Repeats the audio stream when the end is reached.

  • Off off -
  • On on -

Trim trim - Enables the Trim parameters below.

Trim Start trimstart - Sets an In point from the beginning of the audio, allowing you to trim the starting position of the audio stream. The units menu on the right let you specify this position by index, frames, or seconds.  

Trim Start Unit trimstartunit - -

Trim End trimend - Sets an Out point from the end of the audio, allowing you to trim the ending position of the audio stream. The units menu on the right let you specify this position by index, frames, or seconds.  

Trim End Unit trimendunit - -

Pre-Read Length prereadlength - The amount of audio to buffer to maintain smooth playback.  

Pre-Read Length Unit prereadlengthunit - -

Open Timeout opentimeout - The time (in milliseconds) TouchDesigner will wait for the audio file to open. If the Open Timeout time is reached, the Audio File In CHOP will stop waiting, and play silence. If the file still isn't opened the next time the CHOP cooks, it'll wait again, and do the same. It'll keep doing this until the file is opened, or the open fails.  

Mono mono - Output mono channel only even if file has multiple channels.

Volume volume - Set the level the file is read in at. A setting of 1 is full signal while 0 is muted.  


Parameters - Common Page

Time Slice timeslice - Turning this on forces the channels to be "Time Sliced". A Time Slice is the time between the last cook frame and the current cook frame.

Scope scope - To determine which channels get affected, some CHOPs use a Scope string on the Common page.

Sample Rate Match srselect - - Handle cases where multiple input CHOPs' sample rates are different. When Resampling occurs, the curves are interpolated according to the Interpolation Method Option, or "Linear" if the Interpolate Options are not available.

  • Resample At First Input's Rate first - Use rate of first input to resample others.
  • Resample At Maximum Rate max - Resample to the highest sample rate.
  • Resample At Minimum Rate min - Resample to the lowest sample rate.
  • Error If Rates Differ err - Doesn't accept conflicting sample rates.

Export Method exportmethod - - This will determine how to connect the CHOP channel to the parameter. Refer to the Export article for more information.

  • DAT Table by Index datindex - Uses the docked DAT table and references the channel via the index of the channel in the CHOP.
  • DAT Table by Name datname - Uses the docked DAT table and references the channel via the name of the channel in the CHOP.
  • Channel Name is Path:Parameter autoname - The channel is the full destination of where to export to, such has geo1/transform1:tx.

Export Root autoexportroot - This path points to the root node where all of the paths that exporting by Channel Name is Path:Parameter are relative to.

Export Table exporttable - The DAT used to hold the export information when using the DAT Table Export Methods (See above).


CHOPs
Ableton Link • Analyze • Angle • Attribute • Audio Band EQ • Audio Device In • Audio Device Out • Audio Dynamics • Audio File In • Audio Filter • Audio Movie • Experimental:Audio NDI • Audio Oscillator • Audio Para EQ • Audio Play • Audio Render • Audio Spectrum • Audio Stream In • Audio Stream Out • Beat • BlackTrax • Blend • Experimental:Bullet Solver • Clip Blender • Clip • Clock • Composite • Constant • Copy • Count • CPlusPlus • Cross • Cycle • DAT to • Delay • Delete • DMX In • DMX Out • Envelope • EtherDream • Event • Expression • Extend • Fan • Feedback • File In • File Out • Filter • Function • Gesture • Handle • Helios DAC • Hog • Hokuyo • Hold • Experimental:Import Select • In • Info • Interpolate • Introduction To CHOPs id• Inverse Curve • Inverse Kin • Join • Joystick • Keyboard In • Keyframe • Kinect • Lag • Leap Motion • Leuze ROD4 • LFO • Limit • Logic • Lookup • LTC In • LTC Out • Math • Merge • MIDI In • MIDI In Map • MIDI Out • Mouse In • Mouse Out • NatNet In • Noise • Null • Object • Oculus Audio • Oculus Rift • OpenVR • OSC In • OSC Out • Out • Override • Panel • Parameter • Pattern • Perform • Pipe In • Pipe Out • PosiStageNet • Pulse • RealSense • Record • Rename • Render Pick • Reorder • Replace • Resample • S Curve • Scan • Script • Select • Sequencer • Serial • Shared Mem In • Shared Mem Out • Shift • Shuffle • Slope • SOP to • Sort • Speed • Splice • Spring • Stretch • Switch • Sync In • Sync Out • Tablet • Time Slice • Timeline • Timer • TOP to • Touch In • Touch Out • Trail • Transform • Trigger • Trim • Warp • Wave • ZED

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.

The location of an operator within the TouchDesigner environment, for example, /geo1/torus1, a node called torus1 in a component called geo1. The path / is called Root. To refer instead to a filesystem folder, directory, disk file or http: address, see Folder.

The panel at the bottom of TouchDesigner, it controls the current Time of the full system or just one component.

Each SOP has a list of Points. Each point has an XYZ 3D position value plus other optional attributes. Each polygon Primitive is defined by a vertex list, which is list of point numbers.

To pulse a parameter is to send it a signal from a CHOP or python or a mouse click that causes a new action to occur immediately. A pulse from a CHOP is typically a 0 to 1 to 0 signal in a channel, and a pulse via python is via a .pulse() call on a pulse-type parameter, such as Reset in a Speed CHOP.

A Time Slice is the time from the last cook frame to the current cook frame. In CHOPs it is the set of short channels that only contain the CHOP channels' samples between the last and the current cook frame.

A parameter in most CHOPs that restricts which channels of that CHOP will be affected. Normally all channels of a CHOP are affected by the operator.

samples-per-second of a CHOP. Each CHOP in your network has a sample rate, whether it is used or not. The overall timeline has a "frame rate", which is the number of animation frames per second, generally your monitor display frequency.

Exporting is the connection of CHOP channels to parameters of operators. The output of each exporting CHOP is one or more channels, active only while the CHOP Viewer is on. The current value of a channel can be exported to a parameter of any operator, overriding that parameter's value. See Parameter.

An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.

Parameters in TouchDesigner are an operator's settings (numbers, menus, flags, strings, paths) which the user can alter. Parameters for any operator can be opened by right-clicking on the operator and selecting "Parameters..." A currently selected operator's parameters can be viewed in a Network Editor by pressing the keyboard shortcut 'p'.

TouchDesigner is a hierarchy of components. "root" is the top-most network in the hierarchy. The Path is simply /. A typical path is /project1/moviein1.