[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Re: JoshPVHelp



ah interesting, in the meantime we have in fact exploited csound ;-))))

ciao, -sciss-


(
var path = "/Applications/SuperCollider_f/sounds/ AlphavilleIlArrive.aif";
	var offset	= 0;  // initial silence in seconds
	var factor	= 1.0;	// stretch factor
	var ksmps		= 10;
	
	var cmd, result, file, dur, orc, sco, targetDur, outPath, csound;

	("Processing '" ++ path ++ "'...").postln;
	csound = "/usr/local/bin/csound";
	file = SoundFile.openRead( path );
	file.close;
	dur = file.numFrames / file.sampleRate;
	targetDur = (dur - offset) * factor;
	outPath = path.splitext.first ++ "Stretch.aif";
	cmd = (csound ++ " -U pvanal \"" ++ path ++ "\" /tmp/analyse.pvx");
	cmd.postcs;
	result = cmd.systemCmd;
	("RESULT = " ++ result).postln;
	if( result == 0, {
		orc = File( "/tmp/test.orc", "w" );
orc.putString( "sr="++file.sampleRate++"\nkr="+ +file.sampleRate.asInteger.div(ksmps)++"\nksmps="++ksmps++"\nnchnls=1 \n\n" ); orc.putString( "instr 1\n kline1 line 0, p3, p5\n asig1 pvoc kline1, 1, p4\n out asig1\nendin" );
		orc.close;

		sco = File( "/tmp/test.sco", "w" );
sco.putString( "i1 " ++ offset ++ " " ++ targetDur ++ " \"/tmp/ analyse.pvx\" " ++ dur ++ "\ne\n" );
		sco.close;

cmd = (csound ++ " -A -o \"" ++ outPath ++ "\" /tmp/test.orc /tmp/ test.sco");
		cmd.postcs;
		result = cmd.systemCmd;
		("RESULT = " ++ result).postln;
		if( result == 0, {
			"Ok!".postln;
		});
	});
)

Am 23.10.2007 um 18:31 schrieb Joshua Parmenter:

PVFile and PVSynth use CSound PV files. They work almost exactly like AtsFile and AtsSynth.

Josh

On Oct 23, 2007, at 9:21 AM, Sciss wrote:

wooop, sorry confusion. i mean PVSynth.sc ; that is in JoshUGens but has no help file (also not for PVFile).

can we use PVFile / PVSynth in analogy to AtsFile / AtsSynth, to try out if phase vocoder sounds better than ats?

ciao, -sciss-


Am 23.10.2007 um 18:19 schrieb Sciss:

hi (josh),

i recognize JoshPV.sc is inside the JoshUGens download now, but the help files are missing (you need to take them from the ppc3 download JoshPVUGens)

ciao, -sciss-


_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users

******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono
*/


_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users