SuperCollider CLASSES (extension)

PVFile

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 (path, server)

Arguments:

path

Path to a CSound pv file.

server

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

*load (path, server)

Read and load directly to the server.

Arguments:

path
server

Inherited class methods

Instance Methods

-checkMN

-path

-saveForSC (path)

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 (path)

Arguments:

path

-pvpvoc

-loadToBuffer (buf)

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 (bin)

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 (frame)

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

Arguments:

frame

-freqs

-len

-windowSize

-magicNum

-getBinMags (bin)

Returns an array of mags of nFrames length for bin.

Arguments:

bin

-getFrameMags (frame)

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

Arguments:

frame

-init (argpath, argserver)

Arguments:

argpath
argserver

Inherited instance methods

Examples

a = PVFile.new(Platform.resourceDir +/+ "sounds/cl-c4.pv", s);