Pārlūkot izejas kodu

add tab stops to snippets, plus a few bug fixes

Aneurin Barker Snook 8 gadi atpakaļ
vecāks
revīzija
e624be181f

+ 2 - 2
snippets/hbass

@@ -8,7 +8,7 @@
 let s = striate 16
   in d'bass $
      slow 8 $ stack [
-       s $ sound "bass",
-       s $ sound "sine"
+       s $ sound "${1:bass}",
+       s $ sound "${2:sine}"
        ]
      # gain 0.9

+ 1 - 1
snippets/hbass2

@@ -6,6 +6,6 @@
 # --
 -- @hbass2
 d'bass2 $ swing 0.14 $
-  n "[~ [~ 1] [~!! 0] [~ 0 1 ~]]/4" # s "bass2"
+  n "[~ [~ 1] [~!! 0] [~ 0 1 ~]]/4" # s "${1:bass2}"
   # speed (0.5 ~> "[2 1]")
   # gain 0.82

+ 1 - 1
snippets/hdorr1

@@ -7,7 +7,7 @@
 -- @hdorr1
 d'fx1 $ -- mt $ -- (1)
   (2 ~>) $ chop 16 $
-  s "dorr/4"
+  s "${1:dorr}/4"
   # hresonance 0.05
   # hcutoff 200
   # gain 0.8

+ 1 - 1
snippets/hdorr2

@@ -7,7 +7,7 @@
 -- @hdorr2
 d'fx1 $
   -- superimpose (slow 2) $ -- (1)
-  (2 ~>) $ chop 16 $ s "dorr/4"
+  (2 ~>) $ chop 16 $ s "${1:dorr}/4"
   # hresonance 0.05
   # hcutoff 200
   # gain 0.8

+ 3 - 3
snippets/hdrum0

@@ -6,7 +6,7 @@
 # --
 -- @hdrum0
 d'drum $ stack [
-  n "1/4" # s "drum" -- (2) remove
-  -- n "[1*2, 0*8]/8" # s "drum", -- (2)
-  -- n "[~ 0]" # s "kit" -- (1)
+  n "1/4" # s "${1:drum}" -- (2) remove
+  -- n "[1*2, 0*8]/8" # s "$1", -- (2)
+  -- n "[~ 0]" # s "${2:kit}" -- (1)
   ]

+ 3 - 3
snippets/hdrum1

@@ -6,9 +6,9 @@
 # --
 -- @hdrum1
 d'drum $ stack [
-  n "[1*2, 0*8, [~!! [~!! 0] ! ~!!]]/8" # s "drum",
+  n "[1*2, 0*8, [~!! [~!! 0] ! ~!!]]/8" # s "${1:drum}",
   -- whenmod 3 2 (density 2) $ -- (3)
   -- withmod 11 5 0.5 1 (density 2) $ -- (2)
-  n "~ 0" # s "kit"
-  -- n "[[~ 0] [[2!! ~]/4 0]]/2" # s "kit" -- (1)
+  n "~ 0" # s "${2:kit}"
+  -- n "[[~ 0] [[2!! ~]/4 0]]/2" # s "$2" -- (1)
   ]

+ 2 - 2
snippets/hdrum2

@@ -6,8 +6,8 @@
 # --
 -- @hdrum2
 d'drum $ mt $ stack [
-  n "[1*2, 0*8, [~!! [~!! 0] ! ~!!]]/8" # s "drum",
+  n "[1*2, 0*8, [~!! [~!! 0] ! ~!!]]/8" # s "${1:drum}",
   whenmod 3 2 (density 2) $
   withmod 11 5 0.5 1 (density 2) $
-  n "[[~ 0] [[2!! ~]/4 0]]/2" # s "kit"
+  n "[[~ 0] [[2!! ~]/4 0]]/2" # s "${2:kit}"
   ]

+ 1 - 1
snippets/hdrum23

@@ -5,4 +5,4 @@
 # expand-env: (yas-indent-line fixed)
 # --
 -- @hdrum23
-d'drum $ n "0*4" # s "kit" # gain 0.9 -- (1) s "drum"
+d'drum $ n "0*4" # s "${2:kit}" # gain 0.9 -- (1) s "${1:drum}"

+ 4 - 4
snippets/hdrum3

@@ -6,10 +6,10 @@
 # --
 -- @hdrum3
 d'drum $ swing 0.14 $ stack [
-  n "[1*2, 0*8, [~!! [~!! 0] ! ~!!]]/8" # s "drum",
+  n "[1*2, 0*8, [~!! [~!! 0] ! ~!!]]/8" # s "${1:drum}",
   whenmod 3 2 (density 2) $
   withmod 11 5 0.5 1 (density 2) $
-  n "[[~ 0] [[2!! ~]/4 0]]/2" # s "kit"
-  -- n "[~ 1]/2" # s "sn" # gain 0.85 -- (1)
-  -- n "[~ [1 0/8 1/2 0/2]]/2" # s "sn" # gain 0.85 -- (2)
+  n "[[~ 0] [[2!! ~]/4 0]]/2" # s "${3:kit}"
+  -- n "[~ 1]/2" # s "${2:sn}" # gain 0.85 -- (1)
+  -- n "[~ [1 0/8 1/2 0/2]]/2" # s "$2" # gain 0.85 -- (2)
   ]

+ 5 - 5
snippets/hdrum4

@@ -7,10 +7,10 @@
 -- @hdrum4
 d'drum $ swing 0.14 $ -- mt $ -- (3)
   stack [
-    n "[1*2, 0*8, [[~ 0] ~! [~!! 0] [~! 0!] ~!!]]/8" # s "drum",
-    -- every' 16 16 (const $ sound "kit:3") $ -- (2)
-    -- n "[~ 0]" # s "kit", -- (1)
-    n "[[~ 0] [[2!! ~]/4 0]]/2" # s "kit", -- (1) remove
-    n "[~ [1 0/8 1/2 0/2]]/2" # s "sn"
+    n "[1*2, 0*8, [[~ 0] ~! [~!! 0] [~! 0!] ~!!]]/8" # s "${1:drum}",
+    -- every' 16 16 (const $ sound "$3:3") $ -- (2)
+    -- n "[~ 0]" # s "$3", -- (1)
+    n "[[~ 0] [[2!! ~]/4 0]]/2" # s "${3:kit}", -- (1) remove
+    n "[~ [1 0/8 1/2 0/2]]/2" # s "${2:sn}"
     # gain 0.85
     ]

+ 2 - 2
snippets/hduck

@@ -7,8 +7,8 @@
 -- @hduck
 d'fx2 $ mt $
   stack [
-    1.75 ~> s "tubal/4",
-    (3.75 ~>) $ chop 16 $ s "duck/4"
+    1.75 ~> s "${1:tubal}/4",
+    (3.75 ~>) $ chop 16 $ s "${2:duck}/4"
     # gain 0.6
     # speed 0.9
     ]

+ 1 - 1
snippets/hduon

@@ -5,5 +5,5 @@
 # expand-env: (yas-indent-line fixed)
 # --
 -- @hduon
-d'fx3 $ 3 ~> n "[0 1]/8" # s "duon"
+d'fx3 $ 3 ~> n "[0 1]/8" # s "${1:duon}"
   # gain 0.9

+ 2 - 2
snippets/hhi

@@ -12,5 +12,5 @@ d'hi $
   (0.5 ~>) $
   slow 8 $
   gap 64 $
-  n "[0 1]/2" # s "nimble"
-  # speed ((-4+).(*(-1)) <$> density 1.1 sine1)
+  n "[0 1]/2" # s "${1:nimble}"
+  # speed ((-4+).(*(-1)) <\$> density 1.1 sine1)

+ 1 - 1
snippets/hic1

@@ -5,4 +5,4 @@
 # expand-env: (yas-indent-line fixed)
 # --
 -- @hic1
-d'wax $ slow 16 . striate 256 $ s "icarus"
+d'wax $ slow 16 . striate 256 $ s "${1:icarus}"

+ 1 - 1
snippets/hic2

@@ -5,4 +5,4 @@
 # expand-env: (yas-indent-line fixed)
 # --
 -- @hic2
-d'wax $ retrig $ slow 20 $ sound "icarus:1"
+d'wax $ retrig $ slow 20 $ sound "${1:icarus}:1"

+ 1 - 1
snippets/hnim1

@@ -10,4 +10,4 @@ d'nim $
   superimpose (iter 4 -- (3) iter 6
                -- .(# speed (scale 0.8 (0.8+(2/3)) $ slow 2.5 sine1)) -- (2)
               ) $ -- -}
-  slow 16 . striate 256 $ n "[0 1]/2" # s "nimble"
+  slow 16 . striate 256 $ n "[0 1]/2" # s "${1:nimble}"

+ 1 - 1
snippets/hnim2

@@ -14,4 +14,4 @@ d'nim $
   -- every 3 (density 2) $ -- (3)
   -- every' 2 2 (within (0, 0.5) (const silence)) $ -- (2)
   -- whenmod 5 3 rev $ -- (1)
-  slow 16 . striate 256 $ n "[0 1]/2" # s "nimble"
+  slow 16 . striate 256 $ n "[0 1]/2" # s "${1:nimble}"

+ 1 - 1
snippets/hnim3

@@ -18,4 +18,4 @@ d'nim $
                -- -}
               ) $ -- -}
   -- whenmod 16 12 (# vowel "[a i]/3") $ -- (1)
-  (1 ~>) $ slow 16 . striate 256 $ n "[0 1]/2" # s "nimble"
+  (1 ~>) $ slow 16 . striate 256 $ n "[0 1]/2" # s "${1:nimble}"

+ 1 - 1
snippets/hnim4

@@ -8,5 +8,5 @@
 d'nim $ -- mt $ -- (2)
   (0.25 ~>) $
   whenmod 4 2 (const silence) $
-  slow 16 . striate 256 $ n "[0 1]/2" # s "nimble"
+  slow 16 . striate 256 $ n "[0 1]/2" # s "${1:nimble}"
   -- # vowel "o" -- (1)

+ 1 - 1
snippets/hsnoo

@@ -8,6 +8,6 @@
 d'fx3 $
   (1.5 ~>) $
   slow 4 $ chop 48 $
-  sound (samples "snoo" <$> slow 7 $ run 7)
+  sound (samples "${1:snoo}" <\$> slow 7 $ run 7)
   # gain 0.8
   # cut 10