Skip to content

Commit 27858b1

Browse files
committed
README.md
1 parent fc09932 commit 27858b1

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,31 @@ A simple MIDI File Parser which is based on the [Midi Parser from Alexandre Biqu
44

55
The original library has been converted to a Header Only C++ Library. Unlike the original implementation, we can feed the parser incrementally with data. This is important if you want to use it on a microcontroller that has only a limited amount of RAM.
66

7-
It can be used as __Arduino or as cmake library__, so you can also compile, run and debug it on a desktop computer.
7+
It can be used as __Arduino library or as regular cmake library__, so you can also compile, run and debug it on a desktop computer.
88

99
## Documentation
1010

1111
- [MidiFile](https://pschatzmann.github.io/arduino-midi-fileparser/docs/html/classMidiFile.html)
1212

1313

14+
## Installation in Arduino
15+
16+
For Arduino you can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with
17+
```
18+
cd ~/Documents/Arduino/libraries
19+
git clone https://github.com/pschatzmann/arduino-midi-fileparser
20+
```
21+
22+
## Building the Example on the Desktop
23+
24+
You can build the example sketch on the desktop
25+
```
26+
cd ~/Documents/Arduino/libraries/libraries/arduino-midi-fileparser/examples/midi-parse
27+
mkdir build
28+
cd build
29+
cmake ..
30+
make
31+
```
32+
1433

1534

src/MidiFile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
#include <string.h>
1818
#include "MidiFileState.h"
1919

20+
// Compiling outside of Arduino requires the millis() function.
2021
#ifndef ARDUINO
2122
#include <chrono>
2223
#include <cstdint>
2324
#include <iostream>
2425

25-
uint64_t millis() {
26+
inline uint64_t millis() {
2627
using namespace std::chrono;
2728
return duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
2829
}
@@ -124,7 +125,6 @@ class MidiFile {
124125
return parser_state;
125126
}
126127

127-
128128
/// Returns false after an error or when all data has been consumed
129129
operator bool() {
130130
return is_ok;

0 commit comments

Comments
 (0)