part2txt

part2txt — Write a text file containing partial tracks data

Description

The part2txt opcode takes a PVS_TRACKS fsig input and writes the data as sequence of track lists, one for each time point, to a line-oriented text file. Each track is placed on a separate line containing the amplitude, frequency, phase, and track ID. A separator line containing four -1.0 values is used to define the end of the track list for a given time point.

Syntax

part2txt SFile,ftrks

Initialization

SFile -- output filename

Performance

ftrks -- output pv stream in TRACKS format

Example

Here is an example of the part2txt opcodes. It uses the file part2txt.csd.

Example 697. Example of the part2txt opcodes.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
-n
</CsOptions>
<CsInstruments>

instr 1
isiz = 2048
ihsiz = isiz/4
S1 = "flutec3.wav"
p3 = filelen(S1)
ain diskin2 S1,1
ffr,fphs  pvsifd   ain, isiz, ihsiz, 1
ftrk      partials ffr, fphs, 0.01, 1, 1, 500
part2txt "partialsh.txt",ftrk
endin

</CsInstruments>
<CsScore>
i1 0 1
</CsScore>
</CsoundSynthesizer>


The example above shows partial tracking of an ifd-analysis signal and cubic-phase additive resynthesis with pitch shifting.

Credits

Author: Victor Lazzarini
June 2015