Skip to content

Commit

Permalink
add _ muting to Sound.Tidal.Boot
Browse files Browse the repository at this point in the history
  • Loading branch information
geikha committed Apr 18, 2024
1 parent 9b296b9 commit ef6beb1
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/Sound/Tidal/Boot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ only = (hush >>)
p :: Tidally => ID -> ControlPattern -> IO ()
p = streamReplace tidal

-- | Silences a specific stream, regardless of ControlPattern input. Useful for rapid muting of streams
_p :: Tidally => ID -> ControlPattern -> IO ()
_p n _ = streamReplace tidal n silence

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

This binding for ‘n’ shadows the existing binding

Check warning on line 112 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

This binding for ‘n’ shadows the existing binding

-- | Silences a specific stream, regardless of ControlPattern input. Useful for rapid muting of streams
p_ :: Tidally => ID -> ControlPattern -> IO ()
p_ = _p

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘p_’

Check warning on line 116 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘p_’

-- | See 'Sound.Tidal.Stream.streamHush'.
hush :: Tidally => IO ()
hush = streamHush tidal
Expand Down Expand Up @@ -201,6 +209,44 @@ d14 = p 14
d15 = p 15
d16 = p 16

-- | Rapidly silence what's playing on the given orbit
_d1, _d2, _d3, _d4, _d5, _d6, _d7, _d8, _d9, _d10, _d11, _d12, _d13, _d14, _d15, _d16 :: Tidally => ControlPattern -> IO ()
_d1 = _p 1
_d2 = _p 2
_d3 = _p 3
_d4 = _p 4
_d5 = _p 5
_d6 = _p 6
_d7 = _p 7
_d8 = _p 8
_d9 = _p 9
_d10 = _p 10
_d11 = _p 11
_d12 = _p 12
_d13 = _p 13
_d14 = _p 14
_d15 = _p 15
_d16 = _p 16

-- | Rapidly silence what's playing on the given orbit
d1_, d2_, d3_, d4_, d5_, d6_, d7_, d8_, d9_, d10_, d11_, d12_, d13_, d14_, d15_, d16_ :: Tidally => ControlPattern -> IO ()
d1_ = _d1

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d1_’

Check warning on line 233 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d1_’
d2_ = _d2

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d2_’

Check warning on line 234 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d2_’
d3_ = _d3

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d3_’

Check warning on line 235 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d3_’
d4_ = _d4

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.6.5

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.8.3

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 9.0.1

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.4.0.0 - ghc 8.10.1

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal latest - ghc latest

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / cabal 3.8.1.0 - ghc 9.4.1

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d4_’

Check warning on line 236 in src/Sound/Tidal/Boot.hs

View workflow job for this annotation

GitHub Actions / build (9.0.1, 3.4.0.0)

Defined but not used: ‘d4_’
d5_ = _d5
d6_ = _d6
d7_ = _d7
d8_ = _d8
d9_ = _d9
d10_ = _d10
d11_ = _d11
d12_ = _d12
d13_ = _d13
d14_ = _d14
d15_ = _d15
d16_ = _d16

-- | See 'Sound.Tidal.Stream.streamGet'.
getState :: Tidally => String -> IO (Maybe Value)
getState = streamGet tidal
Expand Down

0 comments on commit ef6beb1

Please sign in to comment.