[Csnd] [OT]Best python midi library.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] [OT]Best python midi library.

Tobiah
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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] [OT]Best python midi library.

Michael Gogins-2
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 <[hidden email]> 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
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] [OT]Best python midi library.

Tobiah
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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] [OT]Best python midi library.

Michael Gogins-2
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 <[hidden email]> 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
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] [OT]Best python midi library.

Tobiah
On 1/21/2018 10:30 AM, Michael Gogins wrote:
> Reaktor speaks OSC. Does Kontakt?

Sadly, it does not.

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] [OT]Best python midi library.

Rob Walton-2
The most reliable I've seen is mido https://mido.readthedocs.io/en/latest/

On Sun, Jan 21, 2018 at 8:00 PM, Tobiah <[hidden email]> wrote:
On 1/21/2018 10:30 AM, Michael Gogins wrote:
Reaktor speaks OSC. Does Kontakt?

Sadly, it does not.


Csound mailing list
[hidden email]
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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] [OT]Best python midi library.

Anthony Palomba
Rtmidi works like a charm.


Best,
Anthony

On Tue, Jan 23, 2018 at 12:19 PM, Rob Walton <[hidden email]> 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 <[hidden email]> wrote:
On 1/21/2018 10:30 AM, Michael Gogins wrote:
Reaktor speaks OSC. Does Kontakt?

Sadly, it does not.


Csound mailing list
[hidden email]
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 [hidden email] 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 [hidden email] 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