We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66b0443 commit 88d11b8Copy full SHA for 88d11b8
src/ZMidi/Read.fs
@@ -53,7 +53,15 @@ module ReadFile =
53
return (uint32 result) }
54
55
let getVarlenText = gencount getVarlen readChar (fun _ b -> System.String b)
56
- let getVarlenBytes = gencount getVarlen readByte (fun _ b -> b)
+ let getVarlenBytes =
57
+ parseMidi {
58
+ let! l = getVarlen
59
+ return! ParserMonad (
60
+ fun data state ->
61
+ Ok (data.[state.Position .. state.Position + (int l) - 1], { state with Position = state.Position + int l})
62
+ )
63
+ }
64
+
65
let deltaTime =
66
parseMidi {
67
let! v = getVarlen
0 commit comments