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

[sc-dev] Fwd: SF.net SVN: supercollider: [5651] trunk/build



Revision: 5651
          http://svn.sourceforge.net/supercollider/?rev=5651&view=rev
Author:   cruxxial
Date:     2006-10-27 06:38:12 -0700 (Fri, 27 Oct 2006)

Log Message:
-----------
cleaning up cnfusing help file example in SFP / VSFP

Modified Paths:
--------------
    trunk/build/Help/crucial/Players/SFP/SFP.help.rtf
    trunk/build/SCClassLibrary/crucial/Players/SFP/SFP.sc
    trunk/build/SCClassLibrary/crucial/Players/SFP/SFPGui.sc

Modified: trunk/build/Help/crucial/Players/SFP/SFP.help.rtf
===================================================================
--- trunk/build/Help/crucial/Players/SFP/SFP.help.rtf 2006-10-21 19:47:37 UTC (rev 5650) +++ trunk/build/Help/crucial/Players/SFP/SFP.help.rtf 2006-10-27 13:38:12 UTC (rev 5651)
@@ -1,7 +1,6 @@
-{\rtf1\mac\ansicpg10000\cocoartf102
+{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fnil\fcharset77 Monaco;} -{\colortbl;\red255\green255\blue255;\red0\green0\blue191;\red191 \green0\blue0;\red96\green96\blue96;
-}
+{\colortbl;\red255\green255\blue255;\red0\green0\blue191;\red191 \green0\blue0;}

\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040 \tx5600\tx6160\tx6720\ql\qnatural

 \f0\b\fs36 \cf0 SFP   						sound file player
@@ -11,10 +10,24 @@

\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040 \tx5600\tx6160\tx6720\ql\qnatural
 \cf2 SFP\cf0 .new(path,tempo,firstBeatIsAtFrame)\
 \
+\
 (\
+\
+\cf2 SFP\cf0 .getNew(\{ \cf2 arg\cf0  v;\
+	\cf2 Sheet\cf0 (\{ \cf2 arg\cf0  layout;\
+		v.topGui(layout);\
+	\})\
+\})\
+\
+)\
+\
+\
+(\
+// no path supplied\

\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040 \tx5600\tx6160\tx6720\ql\qnatural
-\cf3 // click on the path to browse for a file\cf0 \
+\cf3 // click on the path (which is nil) to browse for a file\cf0 \

\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040 \tx5600\tx6160\tx6720\ql\qnatural
-\cf2 SFP\cf0 .new(\cf4 "no file selected"\cf0 ).gui\
+\cf2 SFP\cf0 .new.gui\
 )\
+\
 }
\ No newline at end of file

Modified: trunk/build/SCClassLibrary/crucial/Players/SFP/SFP.sc
===================================================================
--- trunk/build/SCClassLibrary/crucial/Players/SFP/SFP.sc 2006-10-21 19:47:37 UTC (rev 5650) +++ trunk/build/SCClassLibrary/crucial/Players/SFP/SFP.sc 2006-10-27 13:38:12 UTC (rev 5651)
@@ -146,7 +146,7 @@
 		
 	var <found = false,<soundFilePath;
 	
-	*new { arg path="no file",tempo,firstBeatIsAtFrame=0;
+	*new { arg path,tempo,firstBeatIsAtFrame=0;

		^super.new.init(path).tempo_(tempo).firstBeatIsAt_(firstBeatIsAtFrame)
 	}
 	storeArgs { ^[this.soundFilePath,tempo,firstBeatIsAt] }
@@ -168,8 +168,8 @@
 	
 	init { arg sfilePath;
 		if(sfilePath.isNil,{
-			file = SoundFile.new("no soundfile specified...",numChannels:2);
-			name = soundFilePath = "no soundfile specified";
+			file = SoundFile.new(nil).numChannels_(2);
+			name = soundFilePath = nil;
 		},{
 			// we don't have to check actually
 			if(sfilePath.isString,{
@@ -229,6 +229,7 @@
 	
 	//name { ^this.fileName }
 	fileName {
+		if(soundFilePath.isNil,{ ^nil });
 		^PathName(soundFilePath).fileName
 	}
 	fileDuration { ^file.duration }

Modified: trunk/build/SCClassLibrary/crucial/Players/SFP/SFPGui.sc
===================================================================
--- trunk/build/SCClassLibrary/crucial/Players/SFP/SFPGui.sc 2006-10-21 19:47:37 UTC (rev 5650) +++ trunk/build/SCClassLibrary/crucial/Players/SFP/SFPGui.sc 2006-10-27 13:38:12 UTC (rev 5651)
@@ -30,7 +30,8 @@
 		var pathLabel,hf,ch,sr;
 		
 		// click on the path to select a different sound file
- pathLabel=ActionButton(layout,model.fileName, { this.replaceFile },minWidth:150); + pathLabel=ActionButton(layout,model.fileName ? "click here to select a soundfile",
+					{ this.replaceFile },minWidth:150);
 		hf=CXLabel(layout,("__________________"));
 		ch=CXLabel(layout,("_____________"));
 		sr=CXLabel(layout,"_____________");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.