PVFile:
Filter:
JoshMisc/Classes (extension) | Libraries > JoshUGens | UGens > FFT

PVFile
ExtensionExtension

Reads and prepares data from CSounds pvanal program

Description

NOTE: This currently only works with .pv files. .pvx and CSound 5 files will be implemented soon.

Class Methods

.new

Arguments:

path

Path to a CSound pv file.

server

The server that data will be loaded on to. Defaults to Server.default.

.load

Read and load directly to the server.

Arguments:

path
server

Instance Methods

.checkMN

.path

.saveForSC

To use NRT - you must re-write the data file out as a sound file!

Arguments:

path

The path to save the soudfile to. This can then be allocRead 'd into a Score.

.nBins

The number of bins in the analysis.

.sndDur

The duration of the sound file analyzed.

.headerSize

.mags

.fileSize

.calcMagScale

.signal

.buffer

The buffer number where PVFile stores data to a server.

.bufnum

.server

.nFrames

The number of frames in the analysis.

.save

Arguments:

path

.pvpvoc

.loadToBuffer

Load pc data to a buffer for real-time performance.

Arguments:

buf

A buffer to load to. If nil, one is allocated for you.

.asControlInput

.loaded

.readData

.maxFreq

From the header, the highest freq analyzed.

.minFreq

From the header, the lowest freq analyzed.

.hopSize

.magScale

A (possibly vain) attempt to figure out an appropriate amplitude to scale the output of PVSynth by. Returns the reciprocal of the average of all mags times the number of bins. (mags.flat.mean * nBins).reciprocal

.spacing

.getBinFreqs

Returns an array of freqs of nFrames length for bin.

Arguments:

bin

.frameBSize

.le

.data

An array showing the data form the pv file.

Returns:

An Array

.sr

.fileFormat

.freeBuffer

Liberates the buffer from SuperCollider tyranny.

.asUGenInput

.header

Returns the pv file's header. (well... most of it).

.readHeader

.numChannels

.getFrameFreqs

Returns an array of freqs of nBins length for a given frame.

Arguments:

frame

.freqs

.len

.windowSize

.magicNum

.getBinMags

Returns an array of mags of nFrames length for bin.

Arguments:

bin

.getFrameMags

Returns an array of mags of nBins length for a given frame.

Arguments:

frame

.init

Arguments:

argpath
argserver

Examples