hmt-base-0.20: Haskell Music Theory Base
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Bits

Description

Bits functions.

Synopsis

Documentation

bit_pp :: Bool -> Char Source #

True = 1, False = 0

gen_bitseq :: FiniteBits b => Int -> b -> [Bool] Source #

Generate n place bit sequence for x.

pack_bitseq :: Bits i => [Bool] -> i Source #

Given bit sequence (most to least significant) generate Bits value.

:set -XBinaryLiterals
pack_bitseq [True,False,True,False] == 0b1010
pack_bitseq [True,False,False,True,False,False] == 0b100100
0b100100 == 36

gen_bitseq_pp :: FiniteBits b => Int -> b -> String Source #

bits_pp of gen_bitseq.

:set -XBinaryLiterals
0xF0 == 0b11110000
gen_bitseq_pp 8 (0xF0::Int) == "11110000"