Import MIDI files #438
Replies: 10 comments 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
-
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. 😺 |
Beta Was this translation helpful? Give feedback.
-
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>
.
|
Beta Was this translation helpful? Give feedback.
-
So, It is still not a exact way to import the midi file?😅 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@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! |
Beta Was this translation helpful? Give feedback.
-
Meanwhile I tried out ALDA and had a bit of time to learn more about it. |
Beta Was this translation helpful? Give feedback.
-
Interesting! I'd be happy to help, feel free to ping me with any questions in truj/midica#53. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
According to FYI: I have now upgraded Midica to support alda 2 in the importer as well as in the exporter. |
Beta Was this translation helpful? Give feedback.
-
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
Beta Was this translation helpful? Give feedback.
All reactions