-
-
Notifications
You must be signed in to change notification settings - Fork 293
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import MIDI files #326
Comments
It took me a while to figure out which Alda subproject repo this issue should belong to. What I'm describing could be implemented as a standalone CLI tool, kept in its own repo and installed separately to Alda. But it would be great if we included such a thing as a built-in ...Then I thought about implementing it in Java and puked in my mouth a little bit. If it were up to me, I'd do it in Clojure. So I finally landed on alda-core being the right place to add this feature. We could make it a part of the Alda "standard library," and implement the |
I'd like to take a crack at this. No guarantees (it's a clojure learning project for me, and MIDI parsing seems a bit hairy, even using the java libraries), but I'll give it a go. 😺 |
Great, thanks! Let me know if you have any questions along the way.
…On Jan 1, 2017 9:18 AM, "James Kiesel" ***@***.***> wrote:
I'd like to take a crack at this. No guarantees (it's a clojure learning
project for me, and MIDI parsing seems a bit hairy, even using the java
libraries), but I'll give it a go. 😺
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/alda-lang/alda-core/issues/25#issuecomment-269904644>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEroF4dwv15-dUhw69gc2R3vQFrP61OXks5rN7W8gaJpZM4K7Ld8>
.
|
So, It is still not a exact way to import the midi file?😅 |
I found this issue by accident after googling for "MIDI-decompiler". I guess the base problems in both languages (ALDA and MidicaPL) are the same. So maybe you can re-use a part of the strategies that I'm using. Or even parts of my code, if you prefer to do it in Java. In Midica the decompilation is mainly distributed over the following classes:
My decompiler works only for MIDI files with division type PPQ (pulse per quarter note). This makes it easier to guess the note length of a Note-ON/Note-OFF combination from the MIDI file. I hope this can help you for building a decompiler for ALDA as well. |
@truj Midica looks awesome! It's very much in the same spirit as Alda, but with its own flavor and a different niche. It makes me happy that there are other people out there doing similar things. Your MIDI decompiler will be super helpful as a reference. Thanks for sharing! |
Interesting! I'd be happy to help, feel free to ping me with any questions in truj/midica#53. |
@gdpelican started implementing MIDI import for Alda v1 (in Clojure) here: alda-lang/alda-core#30 At this point, Alda v2 (Go / Kotlin) is almost ready for release, so we'll have to close the aforementioned PR, but it's still valuable to use as reference when we implement this feature (in Go) for Alda v2. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Moved from #85.
Quoth @crisptrutski:
Shout-out to @alandipert for also having the same intriguing idea. 💡
It would be cool to be able to read a MIDI file and spit an Alda score to STDOUT. You could then redirect that to a file...
$ alda import -f carry_on_my_wayward_son.mid > carry_on_my_wayward_son.alda
...or even pipe it back to
alda
to play it, effectively makingalda
a sort of command-line MIDI player!$ alda import -f gangnam_style.mid | alda play
The text was updated successfully, but these errors were encountered: