7l      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Data declarations for Bang(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSX Safe-InferredESimple data type representing the types of instruments Bang supports.Currently, the only value is .LSimple data type representing different control structures for compositions.(Change the instrument (currently unused)0Set the speed for a section of music (default 1)MSet the beats per minute (WARNING: Only set this once, or BPM will multiply!)8A musical composition with duration type dur (typically ) and instrument type a (typically a PercussionSound)Modifier (typically  or  change) Parallel composition of music Sequential composition of music A Primitive musical object. `Primitive objects in music are simply notes with duration and type, or rests with only duration. A   with duration A  with duration  and type &Get the duration of a full composition Parallel Part of a second  "instance" for  Parallel Part of a second  "instance" for  Parallel Part of a second  "instance" for         =An interface to the basic, general musical operations in Bang(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSX Safe-Inferred  for a given duration.#Convenience constructor for single sSet the bpm of a compositionSet the tempo of a composition )Set the time signature of a composition n is the beat unit, d3 is the number of beats per measure. For example,  ts 4 4 == Common time!%Quadruple the tempo of a composition.""Double the tempo of a composition.#DSet the tempo of a composition to 1 (default, typically idempotent).$ Half the tempo of a composition.%#Quarter the tempo of a composition.&%Convenience constructor for smashing n) values into a single 1-duration measure.'Play 3 notes per measure.(Play 5 notes per measure.)Sixteenth rest* Eighth rest+ Quarter rest, Half rest- Whole rest0Shorthand for  dottedRest1$Constructor for a singly-dotted rest2Eighth Dotted Rest3Quarter Dotted Rest4Half Dotted Rest5Whole Dotted Rest6 Sequence k5 compositions together without the need for lists. m corresponds to m in , , etc.APlay k8 compositions concurrently without the need for lists. c corresponds to c in , , etc.0 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK0 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK0 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK0 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK5An interface to the drum-specific operations in Bang.(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSXNoneLCAn Enum representing the different types of things you can bang on.|'Convenience constructor for drum sounds/Simple constructor for a quarter-note drum hit.Eighth Dotted DrumQuarter Dotted DrumHalf Dotted DrumWhole Dotted Drum!Get the MIDI offset number for a L Closed Hi Hat Open Hi Hat Pedal Hi Hat Bass DrumBass Drum (alt)Snare Snare (alt)Snare SidestickHigh TomHigh Tom (alt)Mid Tom Mid Tom (alt)Low Tom Low Tom (alt) Crash CymbalCrash Cymbal (alt) Ride CymbalRide Cymbal (alt) China Cymbal Splash CymbalBell Hand ClapConvert a primitive L to a LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~͂L{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONM|}~SL/{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONM|}~(General transformations on compositions (c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSX Safe-InferredReverses a composition,Play a composition forwards, then backwards.,Play a composition backwards, then forwards.7Play a composition forwards and backwards concurrently.Take the first d! duration units of a composition.Drop the first d! duration units of a composition.wSplit a composition at a specific duration and return the composition before said duration along with the rest of it. Turn the first d. duration units of a composition into silence.2Turn the rest of a composition into silence after d duration units.*Turn the section of a composition between pos and d into silence.Play a polyrhythm with m having units of length 1/x and n with units of length 1/yExample: poly (3, 3 #> bd) (4, 4 #> sn)!Set the duration of a compositionReplicate a composition n times. Infinitely repeat a composition.Fit the duration of b to the duration of aFit the duration of a into the duration of bCNormalize the durations of each value in a list of Compositions to d and compose them sequentially.CNormalize the durations of each value in a list of Compositions to d and compose them concurrently.pNormalize each composition's duration to the duration of the first element in the list and compose sequentially.pNormalize each composition's duration to the duration of the first element in the list and compose concurrently. The DSL part of the Bang library(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSX Safe-InferredInfix operator for Set the  of a composition (default 1)0Example (play 4 bass drum hits at double speed): 2 !> (4 #> bd)Infix operator for !Example (play a bass drum twice): 2 #> bd^Map a function over a list of compositions and sequentially compose them. Note: This is just  specialized to the list Monoid.Example (play sn, t1 and t2 all twice): (2 #>) >>~ [sn, t1, t2]Infix operator for Example (A 3/4 polyrhythm): (3, 3 #> bd) ~=~ (4, 4 #> sn)Infix operator for -Example (a 3/4 polyrhythm with duration 3/4): (3 #> bd) ~= (4 #> sn)Infix operator for *Example (a 3/4 polyrhythm with duration 1: (3 #> bd) =~ (4 #> sn)Infix operator for Example: /2 ~~ mconcat [ 16 #> bd , 4 #> sn , wr ] Infix operator for %Example (Only play 2 bass drum hits): (1/2) <<~ (4 #> bd)Infix operator for  Example (play 2 closed hi-hats): $(1/2) ~>> ( (2 #> bd) <> (2 #> hc) )Infix operator for -Example (half rest, then two closed hi-hats): $(1/2) ~@> ( (2 #> bd) <> (2 #> hc) )Infix operator for /Example (two bass drum hits, then a half rest): $(1/2) <@~ ( (2 #> bd) <> (2 #> hc) )Infix operator for lExample (Play 12 bass drum hits, then 4 closed hi-hats, then 3 snares, each within a single measure's time): 31 <!> [ 12 #> bd , 4 #> hc , 3 #> sn ] Infix operator for {Example: (Play 12 bass drum hits, then 4 closed hi-hats, then 3 snares, all concurrently within a single measure's time): 31 >!< [ 12 #> bd , 4 #> hc , 3 #> sn ]   None   None !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Safe-Inferred7 ;A Domain Specific Language for generating drum compositions(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSXNone BPM of the composition to playInitial  of the composition to playDefault options to  with. 4defaultOptions = Options{ o_bpm = 120, o_tempo = 1 })Play a composition over the first system   for MIDI events. bang = bangWith defaultOptions a composition repeatedly. bangR = bang . mconcat . repeat with specified . 1bangRWith opts = bangWith opts . mconcat . repeat with specified .   with specified    a composition over a given  -Run a composition by repeatedly updating the  ! and sending events as they come.     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   -Experimental module for live coding with Bang(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSXNone-Bang live from a GHCi session. Note that the ThreadIdd involved must be referenced directly in order to replace or add to the currently running track. Example: track <- bangL bd!Bang live with specified options.BKill a thread playing music and replace it with a new composition.Example:  m1 <- bangL hc m2  -m1 `killThen` (bd < hc <> bd <> bd) HAdd another track to play concurrently with the currently playing track.Example:  m1 <- bangL hc m2  -m1 `addTrack` (bd < hc <> bd <> bd) EExperimental module for sequential music composition with do-notation(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSXNone%  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ EExperimental module for concurrent music composition with do-notation(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSXNone%  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~              Bang-0.1.1.0BangBang.Music.ClassBang.Interface.BaseBang.Interface.DrumBang.Music.TransformBang.Music.OperatorsBang.Experimental.LiveBang.Experimental.SequentialDoBang.Experimental.ConcurrentDoBang.InterpreterBang.Interface Bang.Musicbase Data.Monoid<>InstrumentNameDrumSetControl InstrumentTempoBPMMusicModify:=::+:Prim PrimitiveRestNotedurntypeDurdurationcappendcemptycconcat$fBifoldableMusic$fFoldableMusic$fBifunctorMusic$fFunctorMusic $fMonoidMusic$fFunctorPrimitiverestnotebpmtempotsquaddoublenormalhalfquartertupletstriplets quintupletssrerqrhrwrdots dottedRestdr oneDotRestedrqdrhdrwdrm2m3m4m5m6m7m8m9m10m11m12c2c3c4c5c6c7c8c9c10c11c12PercussionSound OpenTriangle MuteTriangle OpenCuica MuteCuica LowWoodBlock HighWoodBlockClaves LongGuiro ShortGuiro LongWhistle ShortWhistleMaracasCabasaLowAgogo HighAgogo LowTimbale HighTimbaleLowConga OpenHighConga MuteHighCongaLowBongo HighBongo RideCymbal2 VibraSlap CrashCymbal2Cowbell SplashCymbal TambourineRideBell ChineseCymbal RideCymbal1HighTom1 CrashCymbal1HighTom2MidTom1 OpenHihatMidTom2 PedalHihatLowTom1 ClosedHihatLowTom2 SnareDrum2HandClap SnareDrum1 SideStick BassDrum1 BassDrum2drum dottedDrum oneDotDrumedqdhdwdeddqddhddwdd toMIDINumhchohcobdbd2snsn2stickt1t2t3t4t5t6cccc2rcrc2chinasplashbellclapdrumToMidiEvent bassDrum2 bassDrum1 sideStick snareDrum1handClap snareDrum2lowTom2 closedHihatlowTom1 pedalHihatmidTom2 openHihatmidTom1highTom2 crashCymbal1highTom1 rideCymbal1 chineseCymbalrideBell tambourine splashCymbalcowbell crashCymbal2 vibraSlap rideCymbal2 highBongolowBongo muteHighConga openHighCongalowConga highTimbale lowTimbale highAgogolowAgogocabasamaracas shortWhistle longWhistle shortGuiro longGuiroclaves highWoodBlock lowWoodBlock muteCuica openCuica muteTriangle openTriangle reverseMusicmirrormirrorRcrosstakeDurdropDur partitionDurhushForhushFromhushAtpoly withDurationreplrepfitLfitR normalize normalizeC normalize1 normalizeC1><!>#>>>~~=~~==~~~<<~~>>~@><@~>!<Optionso_bpmo_tempodefaultOptionsbangbangR bangRWithbangWithwaitTime metronomebangL bangLWithkillThenaddTrack>>mappendMonoidmemptymconcat hmidi-0.2.1.0System.MIDI.Base MidiEvent Data.FoldablefoldMaptoListmerge interpret System.MIDI DestinationplayWithplay ConnectionrunComposition