[Csnd] [OT]Best python midi library.
Date | 2018-01-21 14:54 |
From | Tobiah |
Subject | [Csnd] [OT]Best python midi library. |
I'm going to be doing some algorithmic composition into static MIDI files. There seem to be a few good python libraries for accomplishing this. Any favorites? Thanks, Tobiah Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-01-21 15:50 |
From | Michael Gogins |
Subject | Re: [Csnd] [OT]Best python midi library. |
The MIDI protocol may or may not be satisfactory for algorithmic composition. There are major issues: (1) Pitch is quantized by semitone. There are extensions to obtain fractional pitch values or custom tunings but they are clumsy. (2) Let's say I have a string section. The score tells 3 fiddles to play a unison, starting and stopping at different times, as in a Scelsi piece. MIDI can only handle this by assigning each player to a separate channel. This is clumsy. What I suggest is you do your algorithmic composition in some more flexible score format, such as Csound, and then convert that into MIDI files if you need MIDI files. If you do want or need to compose into MIDI files, try Peter Billam's code, some also available in other languages, at http://www.pjb.com.au/midi/. I've had very good experience with his Lua MIDI code, so I think the Python stuff is probably also good. Obviously, you could develop a Csound score format of your liking, then write a little bit of Python code to translate that into Billam's event format and save the events in a MIDI file. Regards, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sun, Jan 21, 2018 at 9:54 AM, Tobiah |
Date | 2018-01-21 16:36 |
From | Tobiah |
Subject | Re: [Csnd] [OT]Best python midi library. |
On 1/21/2018 7:50 AM, Michael Gogins wrote: > The MIDI protocol may or may not be satisfactory for algorithmic > composition. There are major issues: I agree that the limitations of the MIDI format are lamentable. My target however, is the Kontakt synth, which seems to only communicate through this archaic standard. > If you do want or need to compose into MIDI files, try Peter Billam's > code, some also available in other languages, at > http://www.pjb.com.au/midi/. Thanks, Toby Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-01-21 18:30 |
From | Michael Gogins |
Subject | Re: [Csnd] [OT]Best python midi library. |
Reaktor speaks OSC. Does Kontakt? I'm not 100% sure, but I think it might. Start looking here: https://hexler.net/forum/viewthread/116/#362 Regards, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sun, Jan 21, 2018 at 11:36 AM, Tobiah |
Date | 2018-01-21 20:00 |
From | Tobiah |
Subject | Re: [Csnd] [OT]Best python midi library. |
On 1/21/2018 10:30 AM, Michael Gogins wrote: > Reaktor speaks OSC. Does Kontakt? Sadly, it does not. Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2018-01-23 18:19 |
From | Rob Walton |
Subject | Re: [Csnd] [OT]Best python midi library. |
The most reliable I've seen is mido https://mido.readthedocs.io/en/latest/ On Sun, Jan 21, 2018 at 8:00 PM, Tobiah <toby@tobiah.org> wrote: On 1/21/2018 10:30 AM, Michael Gogins wrote: |
Date | 2018-01-23 18:34 |
From | Anthony Palomba |
Subject | Re: [Csnd] [OT]Best python midi library. |
Anthony On Tue, Jan 23, 2018 at 12:19 PM, Rob Walton <rwalton00@gmail.com> wrote:
|