WG      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F NoneManually releasing a CFString.Peeks a CFString.8Creates a new CFString. You have to release it manually.>Safe passing of a CFString to the OS (releases it afterwards). GHI JKLMNO   GHI JKLMNONone Safe-InferredLow level stuff. !%Type of the user callback function. "pThe type representing a timestamped MIDI message. Time is measured in milisecs elapsed since the last call to  . $(The type representing a MIDI message. /#not including the bytes 0xf0, 0xf7 0*first argument is the MIDI channel (1..16)1A "regular" MIDI message.Remark: 8f not having a velocity field is a design decision, and a questionable one. According to the MIDI standard, NoteOff also has a velocity. However, most keyboards do not use this feature (send the default value 64), and there are keyboards which do not send NoteOff messages at all, but send NoteOn messages with zero velocity instead (for example the EMU Xboard series). I don't know what would be a good solution. At the moment, the code auto-translates NoteOn messages with zero velocity to NoteOff messages, and the NoteOff velocity is ignored. This behaviour can be inverted with the Cabal flag NoNoteOff. 2'Pitch wheel (value, from -8192..+8191) 3Global aftertouch (pressure) 4Program Change (program) 5#Control Change (controller, value) 6(Polyphonic key pressure (key, pressure) 7Note On (key, velocity) 8Note Off (key) $ !"#$%&'()*+,-./0123456789:PQ;<" !"#$%&'()*+,-./0123456789:;<"918765432$0/.-,+*)('&%"#! :;<  !"#$ 0/.-,+*)('&%187654329:PQ;<None24=?MIDI objects which can have a name, model name and manufacturerEr] is readProcRefCon (The refCon you passed to MIDIInputPortCreate or MIDIDestinationCreate); sj is srcConnRefCon (A refCon you passed to MIDIPortConnectSource, which identifies the source of the data).Y+Sends a short message with timestamp "now".Z4Sends a list of short messages with timestamp "now".[/Sends a short message with the given timestamp.\8Sends a list of short messages with the given timestamp.^Creates a new input port._Creates a new output port.`Disposes an existing port.a#Connects an input port to a source.b(Disconnects an input port from a source.c.Creates a new MIDI client with the given name.d!Disposes an existing MIDI client.eNote: If a client iterates through the devices and entities in the system, it will not ever visit any virtual sources and destinations created by other clients. Also, a device iteration will return devices which are offline (were present in the past but are not currently present), while iterations through the system's sources and destinations will not include the endpoints of offline devices. Thus clients should usually use f and gD, rather iterating through devices and entities to locate endpoints.f$Enumaretes the MIDI sources present.g)Enumaretes the MIDI destinations present.h.Creates a new MIDI source with the given name.i3Creates a new MIDI destination with the given name.j#Disposes an existing MIDI endpoint.RSTUVWXYZ[\=>?@]^_`ABCDEaFbcGdeHIJKLMNOPQRSfghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghij.=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij.efg=>?@hijcd^_`abY[Z\]SRQPONMLKJIHGETFCDABWXVUqRSZYXWVUT[\=>?@]^_`ABCDEaFbcGdeHIJKLMNOPQRSfghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijNone k3The opaque data type representing a MIDI connectionl$Gets all the events from the buffer.m/Gets the next event from a buffered connection.n(Returns the time elapsed since the last s call, in milisecs.oOpens a MIDI Source. There are two possibilites to receive MIDI messages. The user can either support a callback function, or get the messages from an asynchronous buffer. However, mixing the two approaches is not allowed.pOpens a MIDI Destination.q0Sends a short message. The connection must be a A.rdSends a system exclusive message. You shouldn't include the starting / trailing bytes 0xF0 and 0xF7.scStarts a connection. This is required for receiving MIDI messages, and also for starting the clock.tStops a connection.uCloses a MIDI Connectionklmnopqrstu5 !"#$%&'()*+,-./0123456789:;<=>?@ACfgklmnopqrstuCAkfg=>?@opuqrstmlnk lmnopqrstuData declarations for Bang(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSX Safe-InferredvESimple data type representing the types of instruments Bang supports.Currently, the only value is w.xLSimple data type representing different control structures for compositions.y(Change the instrument (currently unused)z0Set 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 z change)~Parallel composition of musicSequential composition of musicA 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 |vwxyz{|}~vwxyz{|}~|~}x{zyvwvwx{zy|~}=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(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 z 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 ]   None4The opaque data type representing a MIDI connection.5The opaque data type representing a MIDI destination.0The opaque data type representing a MIDI source.2Enumerates the MIDI sources present in the system.7Enumerates the MIDI destinations present in the system.WThese functions return the name, model and manufacturer of a MIDI source / destination.Note: On Win32, only 4 returns a somewhat meaningful string at the moment.Opens a MIDI Source. There are two possibilites to receive MIDI messages. The user can either support a callback function, or get the messages from an asynchronous buffer. However, mixing the two approaches is not allowed.Opens a MIDI Destination.9Gets the next event from a buffered connection (see also ).Gets all the events from the buffer (see also )0Sends a short message. The connection must be a .dSends a system exclusive message. You shouldn't include the starting / trailing bytes 0xF0 and 0xF7.)Note: On Win32, the connection must be a cStarts a connection. This is required for receiving MIDI messages, and also for starting the clock.Stops a connection.Closes a MIDI Connection.(Returns the time elapsed since the last  call, in milisecs.4 !"#$%&'()*+,-./0123456789:;< 5An interface to the drum-specific operations in Bang.(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSXNoneCAn 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 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 Cymbal Ride Cymbal (alt)  China Cymbal  Splash Cymbal Bell  Hand ClapConvert a primitive  to a "y      !"#$%&'()*+,-./0123456789:;<=y      !"#$%&'()*+,-./0123456789:;<=y      !"#$%&'()*+,-./0123456789:;<=J/      !"#$%&'()*+,-./0123456789:;<=NoneNone      !"#$%&'()*+,-./0123456789:;<= Safe-Inferred7vwxyz{|}~ ;A Domain Specific Language for generating drum compositions(c) Benjamin Kovach, 2014MITbkovach13@gmail.com experimentalMac OSXNone @BPM of the composition to playAInitial z of the composition to playBDefault options to C with. 4defaultOptions = Options{ o_bpm = 120, o_tempo = 1 }C)Play a composition over the first system  for MIDI events. bang = bangWith defaultOptionsDC a composition repeatedly. bangR = bang . mconcat . repeatED with specified >. 1bangRWith opts = bangWith opts . mconcat . repeatFC with specified >. with specified > a composition over a given -Run a composition by repeatedly updating the ! and sending events as they come. >?@ABCDEFvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF CDFE>?@AB >?@ABCDEF !"#$%&'()*+,,-./01223456789:;<=>3?@ABCDEFGHIJKLMNOOPPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                   ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I I J K L M N O PQRSTUVWXYZ[\]^_`abcdeefghijklmnopqrstuvwxyz{|}~w w O P r s L { | y x } ~  z M N    Bang-0.1.0.4System.MacOSX.CoreFoundationSystem.MacOSX.CoreAudioSystem.MIDI.BaseSystem.MacOSX.CoreMIDISystem.MIDI.MacOSXBang.Music.ClassBang.Interface.BaseBang.Music.TransformBang.Music.OperatorsBang.Interface.DrumBang System.MIDIstartBang.InterpreterBang.Interface Bang.MusicCFAllocatorRef CFStringRef CFDataRef ByteCount ItemCountCFIndexUniCharOSStatusOSErrSInt64SInt32SInt16SInt8UInt64UInt32UInt16UInt8osStatusString osStatusErrorreleaseCFString peekCFString newCFString withCFStringaudioConvertNanosToHostTimeaudioConvertHostTimeToNanosaudioGetCurrentHostTimeaudioGetCurrentTimeInNanos ShortMessage sm_channelsm_msgsm_byte1sm_byte2ClientCallback MidiEvent MidiMessage UndefinedReset ActiveSensingSRTStop SRTContinueSRTStartSRTClock TuneRequest SongSelect SongPositionSysEx MidiMessage' PitchWheel Aftertouch ProgramChangeCCPolyAftertouchNoteOnNoteOff TimeStamptranslateShortMessageuntranslateShortMessage shortMessage MIDIHasNamegetNamegetModelgetManufacturer DestinationSource MIDIReadProc MIDIPacket MIDITimeStamp MIDIPortRefMIDIEndpointRef MIDIEntityRef MIDIDeviceRef MIDIObjectRef MIDIClientRefOpaqueMIDIPortOpaqueMIDIEndpointOpaqueMIDIEntityOpaqueMIDIDeviceOpaqueMIDIObjectOpaqueMIDIClientmkMIDIReadProcisShortMessagedecodeShortMessagedepackMIDIPacketListdepackSingleMIDIPacketmidiSend midiSendList midiSend' midiSendList' midiSendSysEx newInputPort newOutputPort disposePortconnectToSourcedisconnectFromSource newClient disposeClientenumerateDevicesenumerateSourcesenumerateDestinations newSourcenewDestinationdisposeEndpoint Connection getEvents getNextEvent currentTime openSourceopenDestinationsend sendSysExstopcloseInstrumentNameDrumSetControl InstrumentTempoBPMMusicModify:=::+:Prim PrimitiveRestNotedurntypeDurdurationcappendcemptycconcat$fBifoldableMusic$fFoldableMusic$fBifunctorMusic$fFunctorMusic $fMonoidMusic$fFunctorPrimitiverestnotebpmtempom4quaddoublenormalhalfquartertupletstriplets quintupletssrerqrhrwr reverseMusicmirrormirrorRcrosstakeDurdropDur partitionDurhushForhushFromhushAtpoly withDurationreplrepfitLfitR normalize normalizeC normalize1 normalizeC1><!>#>>>~~=~~==~~~<<~~>>~@><@~>!<PercussionSound 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 openTriangleOptionso_bpmo_tempodefaultOptionsbangbangR bangRWithbangWith CFAllocatorCFStringCFDatac_CFStringCreateWithCharactersc_CFStringGetCharacterAtIndexc_CFStringGetCharactersPtrc_CFStringGetLength c_CFReleasekCFAllocatorDefault translate' translate''MIDISendSysExCallbackNotificationMessageIDMIDIMsgIOErrorSerialPortOwnerChangedThruConnectionsChangedPropertyChanged ObjectRemoved ObjectAdded SetupChanged Notification MIDIObject midiObjectEndpointendpointMIDISysexSendRequestMIDINotifyProcMIDINotificationMIDIObjectType MIDIUniqueIDmkMidiSendSysExCallbackc_MIDIObjectSetStringPropertyc_MIDIObjectSetIntegerPropertyc_MIDIObjectSetDataPropertyc_MIDIObjectGetStringPropertyc_MIDIObjectGetIntegerPropertyc_MIDIObjectGetDataPropertyc_MIDIObjectFindByUniqueIDc_MIDIPortDisconnectSourcec_MIDIPortConnectSourcec_MIDIPortDisposec_MIDIOutputPortCreatec_MIDIInputPortCreatec_MIDIEndpointGetEntityc_MIDIEndpointDisposec_MIDIDestinationCreatec_MIDISourceCreatec_MIDIGetDestinationc_MIDIGetSourcec_MIDIGetNumberOfDestinationsc_MIDIGetNumberOfSourcesc_MIDIGetDevicec_MIDIGetNumberOfDevicesc_MIDIClientDisposec_MIDIClientCreatec_MIDISendSysex c_MIDISendptr_kMIDIPropertyModelptr_kMIDIPropertyManufacturerptr_kMIDIPropertyNamekMIDIPropertyNamekMIDIPropertyManufacturerkMIDIPropertyModelmidiObjectGetStringPropertymidiObjectGetIntegerPropertygenericGetNamegenericGetModelgenericGetManufacturerencodeShortMessageListencodeShortMessage depackMsgListdepackSingleMessagesysex sysexloopmidiSendSysExCallback newEndpoint$fMIDIHasNameDestination$fMIDIHasNameSource$fMIDIHasNamePtr$fMIDIHasNamePtr0$fMIDIHasNamePtr1$fMIDIHasNamePtr2$fMIDIObjectDestination$fMIDIObjectSource$fMIDIObjectPtr$fMIDIObjectPtr0$fMIDIObjectPtr1$fMIDIObjectPtr2$fMIDIObjectPtr3 $fEndpointPtr$fEndpointDestination$fEndpointSource cn_isInputcn_port cn_endpointcn_timecn_alive cn_fifo_cb cn_midiproc cn_mydataPortDeviceClientclient getClient nanoToMiliconvertShortMessagemyMIDIReadProcsendShortMessagecleanupbase Data.MonoidmappendMonoidmemptymconcat Data.FoldablefoldMaptoListmerge interpretplayWithplayrunComposition