Commit 9b13e6fe authored by Carlo Laurenzi's avatar Carlo Laurenzi
Browse files

Updated_SpatLib_v8

+ test files updated to Spat lIb v8
parent deb7fff8
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>13B42</string>
<key>CFBundleExecutable</key>
<string>supervp.ring~</string>
<key>CFBundlePackageType</key>
<string>iLaX</string>
<key>CFBundleShortVersionString</key>
<string>2.17.3 </string>
<key>CFBundleVersion</key>
<string>2.17.3 </string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>5A3005</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>13A595</string>
<key>DTSDKName</key>
<string>macosx10.9</string>
<key>DTXcode</key>
<string>0502</string>
<key>DTXcodeBuild</key>
<string>5A3005</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>13B42</string>
<key>CFBundleExecutable</key>
<string>supervp.scrub~</string>
<key>CFBundlePackageType</key>
<string>iLaX</string>
<key>CFBundleShortVersionString</key>
<string>2.17.3 </string>
<key>CFBundleVersion</key>
<string>2.17.3 </string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>5A3005</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>13A595</string>
<key>DTSDKName</key>
<string>macosx10.9</string>
<key>DTXcode</key>
<string>0502</string>
<key>DTXcodeBuild</key>
<string>5A3005</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12F45</string>
<key>CFBundleExecutable</key>
<string>supervp.sfplay~</string>
<key>CFBundlePackageType</key>
<string>iLaX</string>
<key>CFBundleShortVersionString</key>
<string>2.17.2 BETA-2</string>
<key>CFBundleVersion</key>
<string>2.17.2 BETA-2</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>5A1413</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0500</string>
<key>DTXcodeBuild</key>
<string>5A1413</string>
</dict>
</plist>
$svpscrub_instance := 0
; Function to use in @find for map that attempts to find the closest key to input $a
@fun_def @iskeymember($a, $key, $value) { $key = $a }
;;;;;; Definition of SuperVP.scrub Process
;;; Arguments: $soundfile = soundfile name (string)
;;
;; If the $soundfile is in $SFPivots, then enters synch mode. Otherwise drives SFPLAY~
;; If in synch more:
;; - If the content of Pivot map is empty then in SuperVP.PLAY mode (synch to tempo)
;; - If the content is not empty then SuperVP.Scrub mode (synch to pivot + resonance)
@proc_def soundfile1($destination, $soundfile, $dblevel)
{
;; To see if $soundfile exists in MAP, we should launch a FIND and see if it is undefined using @is_undef
;; This is because regular @member acts on VALUE and not KEY! (I believe we should reverse this!!!)
@local $notfound
$notfound := @is_undef(@find($SFPivots, @iskeymember($soundfile)))
if ($notfound) ; check if soundfile is a member of pivot list
{
;;;; SFPLAY Mode
soundfiler_poly.1 note sfplay ($soundfile) ($dblevel) ($destination)
}else
{
;;;; Synchronization mode. Determine which:
if (@size($SFPivots($soundfile))=0)
{
;;; SuperVP Play mode
;print SVPLAY for ($soundfile) at sec: $NOW beat: $RNOW
soundfiler_poly.1 note svplay ($soundfile) ($destination) ($dblevel)
;; now synch speed with tempo
whenever ($RT_TEMPO)
{
svplay_speed ($RT_TEMPO / $SCORE_TEMPO)
}
}else
{
;;; SuperVP Scrub mode with static target(s)
@local $pivot, $delay, $this_scrub_instance
$pivot := $SFPivots($soundfile)[2]
$delay := $SFPivots($soundfile)[3]
soundfiler_poly.1 note svpscrub ($destination) ($soundfile) ($dblevel)
whenever ($svpscrub_instance)
{
; Now the $svpscrub_instance should be set!
$this_scrub_instance := $svpscrub_instance
print Scrub instance ($this_scrub_instance) for ($soundfile) pivot ($pivot) at sec: $NOW beat: $RNOW
group svp @target{$pivot};, @tight
{
curve svp-target @Grain := 0.05s,
@Action :=
{
@command($this_scrub_instance+"-SVPscrub_pos") $x
}
{
$x
{
{ 0.0}
$delay { ($SFPivots($soundfile)[1]) }
}
}
$delay curve svp-absolute @Grain := 0.05s,
@Action :=
{
@command($this_scrub_instance+"-SVPscrub_pos") $x
}
{
$x
{
{ ($SFPivots($soundfile)[1])}
( ($SFPivots($soundfile)[0])-($SFPivots($soundfile)[1]) )ms { ($SFPivots($soundfile)[0]) }
}
}
print ($soundfile) Resonance launch at sec: ($NOW) beat: ($RNOW)
}
}during[1#]
}
}
}
......@@ -12,6 +12,14 @@ $svpscrub_instance := 0
;; If in synch more:
;; - If the content of Pivot map is empty then in SuperVP.PLAY mode (synch to tempo)
;; - If the content is not empty then SuperVP.Scrub mode (synch to pivot + resonance)
; And if the $SFPivots map is undefined, set an empty map
if (@is_undef($SFPivots))
{
$SFPivots := map { } // empty pivots map
print "set an empty map for pivots"
}
@proc_def soundfile($destination, $soundfile, $dblevel)
{
;; To see if $soundfile exists in MAP, we should launch a FIND and see if it is undefined using @is_undef
......@@ -21,8 +29,8 @@ $svpscrub_instance := 0
if ($notfound) ; check if soundfile is a member of pivot list
{
;;;; SFPLAY Mode
soundfiler_poly note sfplay ($soundfile) ($dblevel) ($destination)
;;;; SFPLAY Mode
soundfiler_poly note sfplay ($soundfile) ($dblevel) ($destination)
}else
{
;;;; Synchronization mode. Determine which:
......@@ -30,7 +38,7 @@ $svpscrub_instance := 0
{
;;; SuperVP Play mode
;print SVPLAY for ($soundfile) at sec: $NOW beat: $RNOW
soundfiler_poly note svplay ($soundfile) ($destination) ($dblevel)
soundfiler_poly note svplay ($soundfile) ($destination) ($dblevel)
;; now synch speed with tempo
whenever ($RT_TEMPO)
......@@ -45,7 +53,7 @@ $svpscrub_instance := 0
$pivot := $SFPivots($soundfile)[2]
$delay := $SFPivots($soundfile)[3]
soundfiler_poly note svpscrub ($destination) ($soundfile) ($dblevel)
soundfiler_poly note svpscrub ($destination) ($soundfile) ($dblevel)
whenever ($svpscrub_instance)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment