Hi! This page provides the essential documentation for yap.wags.fm.
yap.wags.fm currently accepts two formats:
The text format, which is in the starter document, consists of mini-notation. Here's an example:
bd bd hh chin*4
# @duration 0.8
A big thanks to whoever wrote the Tidal documentation, which was dutifully copied below.
Symbol | Description | Example |
---|---|---|
hh27 | A single note. | bassdm hh27 bassdm hh27 |
~ | A rest. | bassdm ~ bassdm hh27 |
[ ] | Create a pattern grouping. | [bassdm kick] hh27 |
, | Play multiple patterns at the same time. | bassdm hh27 , cr cr cr cr |
< > | Alternate between patterns. | [hh hh hh] [hh27 gab hh27 <gab cr>] |
Click here for a full list of available samples. If a sample does not have a colon and a number after it (ie hh
instead of hh:0
), it is an alias for the 0
version. So sn
is sn:0
, hh
is hh:0
, etc.
All lines starting with a #
are ignored except in the following cases:
# @duration 4.2
. This number must be a float, meaning it must have a decimal part, even if that part is 0. Only positive numbers are allowed.# @drone pad
, where pad
is the name of the sample to use.# @sample glz https://freesound.org/data/previews/204/204694_2570743-lq.mp3
, where glz
is the name of the sample to use and the url after is its url (ie on freesound.org).The following example uses the sample pad
as a drone and imports a sound from freesound.org to use in the loop.
bd bd glz chin*4
# @sample glz https://freesound.org/data/previews/204/204694_2570743-lq.mp3
# @duration 1.3
# @drone pad
You can copy any wags document into the editor and it should "just work."" Check out this crash course to learn more about wags
syntax. To whet your appetite, a playable and editable example is below! Anything from that crash course or from this cookbook is fair game.
For more complex synthesis, use this notation at the expense of reactivity (it takes a couple more cycles to update). Also, on mobile devices, PureScript mode can be a bit janky (I'm working to fix this).
module Main where
import Prelude
import WAGS.Lib.Learn (Player, player)
import WAGS.Lib.Learn.Oscillator (lfo)
import WAGS.Lib.Tidal (tdl)
import WAGS.Lib.Tidal.Types (AFuture)
import WAGS.Lib.Tidal.Tidal as T
wag :: AFuture
wag = T.make 4.0
{ earth: T.s
$ T.onTag "pad"
( T.changeRate
( _.sampleTime
>>> mul 1.3
>>> add 1.0
>>> min 1.2
)
)
$ map
( T.changeVolume
( _.clockTime
>>> lfo
{ phase: 0.0
, freq: 4.0
, amp: 0.4
}
>>> add 0.4
)
)
$ T.parse "pad:2 pad:2;pad"
}
main :: Player
main = player (tdl wag)
module Main where
import Prelude
import WAGS.Lib.Learn (Player, player)
import WAGS.Lib.Learn.Oscillator (lfo)
import WAGS.Lib.Tidal (tdl)
import WAGS.Lib.Tidal.Types (AFuture)
import WAGS.Lib.Tidal.Tidal as T
wag :: AFuture
wag = T.make 4.0
{ earth: T.s
$ T.onTag "pad"
( T.changeRate
( _.sampleTime
>>> mul 1.3
>>> add 1.0
>>> min 1.2
)
)
$ map
( T.changeVolume
( _.clockTime
>>> lfo
{ phase: 0.0
, freq: 4.0
, amp: 0.4
}
>>> add 0.4
)
)
$ T.parse "pad:2 pad:2;pad"
}
main :: Player
main = player (tdl wag)
Why the name yap.wags.fm?