Csound Csound-dev Csound-tekno Search About

[Csnd] [OT]Best python midi library.

Date2018-01-21 14:54
FromTobiah
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

Date2018-01-21 15:50
FromMichael Gogins
SubjectRe: [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  wrote:
> 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

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

Date2018-01-21 16:36
FromTobiah
SubjectRe: [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

Date2018-01-21 18:30
FromMichael Gogins
SubjectRe: [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  wrote:
> 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

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

Date2018-01-21 20:00
FromTobiah
SubjectRe: [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

Date2018-01-23 18:19
FromRob Walton
SubjectRe: [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:
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

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

Date2018-01-23 18:34
FromAnthony Palomba
SubjectRe: [Csnd] [OT]Best python midi library.
Rtmidi works like a charm.


Best,
Anthony

On Tue, Jan 23, 2018 at 12:19 PM, Rob Walton <rwalton00@gmail.com> wrote:
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:
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

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

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