!"#$%&'()*+,-./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|Convenience function for concatenating four compositions together sequentially. Most general type signature 'cause why not? %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 rest !"#$%&'()*+, !"#$%&'()*+, !"#$%&'()*+, !"#$%&'()*+,5An interface to the drum-specific operations in Bang.(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSXNone-CAn Enum representing the different types of things you can bang on.]'Convenience constructor for drum sounds^/Simple constructor for a quarter-note drum hit._!Get the MIDI offset number for a -` Closed Hi Hata Open Hi Hatb Pedal Hi Hatc Bass DrumdBass Drum (alt)eSnaref Snare (alt)gSnare SidestickhHigh TomiHigh Tom (alt)jMid Tomk Mid Tom (alt)lLow Tomm Low Tom (alt)n Crash CymbaloCrash Cymbal (alt)p Ride CymbalqRide Cymbal (alt)r China Cymbals Splash CymbaltBellu Hand ClapvConvert a primitive - to a y-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~y-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~y-\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.]^_`abcdefghijklmnopqrstuvwxyz{|}~J-/\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.]^_`abcdefghijklmnopqrstuvwxyz{|}~(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 ]  NoneNone !"#$%&'()*+,-./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{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Bang-0.1.0.6Bang.Music.ClassBang.Interface.BaseBang.Interface.DrumBang.Music.TransformBang.Music.OperatorsBangBang.InterpreterBang.Interface Bang.MusicInstrumentNameDrumSetControl InstrumentTempoBPMMusicModify:=::+:Prim PrimitiveRestNotedurntypeDurdurationcappendcemptycconcat$fBifoldableMusic$fFoldableMusic$fBifunctorMusic$fFunctorMusic $fMonoidMusic$fFunctorPrimitiverestnotebpmtempom4quaddoublenormalhalfquartertupletstriplets quintupletssrerqrhrwrPercussionSound 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 BassDrum2drumqd 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 bangRWithbangWithbase Data.MonoidmappendMonoidmemptymconcat hmidi-0.2.1.0System.MIDI.Base MidiEvent Data.FoldablefoldMaptoListmerge interpret System.MIDI DestinationplayWithplay ConnectionrunComposition