Skip to content

Commit

Permalink
Merge pull request #15 from SleepyLGod/fix-readme-files
Browse files Browse the repository at this point in the history
Fix readme files
  • Loading branch information
SleepyLGod committed Nov 2, 2022
2 parents d3d80fc + d0455d0 commit 8f9c79c
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 18 deletions.
14 changes: 10 additions & 4 deletions OmgPianoTranscription/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# 🎶 OmgPianoTranscription
⭐ The project is an implement of [**piano transcription inference**](https://github.com/qiuqiangkong/piano_transcription_inference).
<h3 align="center">
<img src="https://readme-typing-svg.herokuapp.com/?font=Roboto+Mono&size=25&width=430&color=46BEA3duration=1600&lines=🎵Omg+Piano+Transcription🎶" height="80"/></br>
⭐ The project is an implement of <a href="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/qiuqiangkong/piano_transcription_inference">piano transcription inference</a>. 🌠
</h3>

### Build & Run
## 🔨 Build & Run
+ **FFMPEG** is required, please [install](https://www.gyan.dev/ffmpeg/builds/) it in PATH.
+ Download [**ONNX file**](https://github.com/EveElseIf/pianotranscription_java/releases/download/blob/transcription.onnx) and put it on the root of Folder`pianotranscriptioncli/src/main/resources`.
+ Modify the input audio file path in the main function of `pianotranscriptioncli/src/main/java/pianotranscriptioncli/Program.java`
+ Well, if your running system is not Windows, you need to change the string of the file path of the input and output files to make it work.
+ Build and run the project, feel free to run the [`test.http`](./pianotranscriptioncli/src/main/resources/test.http) file in the resource folder if you use IDEA as the IDE, and you'll find the output midi file in Folder`pianotranscriptioncli/src/main/resources/output`. By the way, you can see the process on the command lines in your terminal.
+ Build and run the project, feel free to run the [`test.http`](./pianotranscriptioncli/src/main/resources/test.http) file in the resource folder if you use IDEA as the IDE.

And you'll find the output midi file in Folder`pianotranscriptioncli/src/main/resources/output`.

By the way, you can see the process on the command lines in your terminal.
+ 🎉 Go bears! Just enjoy it!
26 changes: 15 additions & 11 deletions OmgSimplePlayer/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# &#9836; OmgSimplePlayer
<h3 align="center">
<img src="https://readme-typing-svg.herokuapp.com/?font=Roboto+Mono&size=25&width=350&color=46BEA3duration=1600&lines=🎵Omg+Simple+Player🎶" height="80"/></br>
A JS applet reading standard MIDI files, emits JSON events in real time and plays them in the browser.
</h3>

**OmgSimplePlayer** is a JavaScript applet which reads standard MIDI files, emits JSON events in real time, and then converts the events and play them in the web page.
## ⚡ Getting Started
Create a new player by instantiating `MidiPlayer.Player` with an event handler to be called for every MIDI event, then you can load and play a MIDI file.

## Getting Started
Using MidiWriterJS is pretty simple.

Using MidiWriterJS is pretty simple. Create a new player by instantiating `MidiPlayer.Player` with an event handler to be called for every MIDI event. Then you can load and play a MIDI file.

```js
```javascript
const MidiPlayer = require('midi-player-js');

// Initialize player and register event handler
Expand All @@ -19,11 +21,13 @@ Player.loadFile('./test.mid');
Player.play();
```

## Player Events
## 🎼 Player Events

There are a handful of events on the `Player` object which you can subscribe to using the `Player.on()` method.

There are a handful of events on the `Player` object which you can subscribe to using the `Player.on()` method. Some events pass data as the first argument of the callback as described below:
Some events pass data as the first argument of the callback as described below:

```js
```javascript
Player.on('fileLoaded', function() {
// Do something when file is loaded
});
Expand All @@ -45,9 +49,9 @@ Player.on('endOfFile', function() {

Note that because of a common practice called "running status" many MIDI files may use `Note on` events with `0` velocity in place of `Note off` events.

## Full Documentation
## 📕 Full Documentation & Resources

[**Doc on my lark**](https://cao8drqmwu.feishu.cn/docx/AMq0djEQSoxPWNxjWM4cL6uBnOf "文档链接")
[**&#9836; Doc on my lark**](https://cao8drqmwu.feishu.cn/docx/AMq0djEQSoxPWNxjWM4cL6uBnOf "文档链接")

[Some test midi files](https://www.midishow.com/en/midi/5506.html "免费midi")

Expand Down
42 changes: 39 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
# omg-score
⭐ An applet used for listening to piano pieces, then transferring them and play them in the web page.
<h3 align="center">
<img src="https://readme-typing-svg.herokuapp.com/?font=Roboto+Mono&size=25&width=240&color=46BEA3duration=1600&lines=🎵Omg+Player🎶" height="80"/></br>
<font>⭐ Transferring piano pieces and playing them dynamically in the browser. 🌠</font>
</h3>

🔪 Tools: three.js & MIDI.js
<div align="center">
<p>
<a href="#"><img src="https://custom-icon-badges.herokuapp.com/github/last-commit/SleepyLGod/omg-score" alt="omg-score"/></a>
</p>
</div>

## ⚡ Quick setup
```bash
git clone [email protected]:SleepyLGod/omg-score.git
```

## ⚙ Basic
+ The project is divided into 3 parts.
+ The [OmgSimplePlayer](./OmgSimplePlayer/) is the web applet to play standard midi files, and you can change the tempo.
+ The [OmgPianoPlayer](./OmgPianoPlayer) and [OmgPianoTranscription](./OmgPianoTranscription) is the web applet to convert mp3 files to midi files of piano pieces, and play them dynamically. The former is the frontend and the latter is the backend. You can see a three-dimensional piano model and adjust its spatial position freely. When the piano is being played, you can see the keys move with the notes, and you can also download the converted midi files and use them for other playback editors and editors.

## 🔨 Tasks
- [ ] Convert mp3 files to standard midi files.
- [ ] Convert songs and pieces in other formats like wav to standard midi files.
- [ ] Choose and upload local files freely.
- [ ] Play all kinds of standard midi files in the web page simply.
- [ ] Change the song tempo in the simple player.
- [ ] Play midi files(piano pieces) in the web page dynamically.
- [ ] Change the song tempo in the dynamic player.
- [ ] Play midi files of various musical instruments in the web page dynamically.
- [ ] Modify the converting and transmitting speed.

## 🔪 Tools
+ Three.js
+ MIDI.js
+ Piano transcription inference
+ Maven & springboot

## 🙋‍♂️ Support
💙 If you like this project, give it a ⭐ and share it with friends!

0 comments on commit 8f9c79c

Please sign in to comment.