gogins / csound-extended

Extensions for Csound including algorithmic composition, Android app, and WebAssembly.
GNU Lesser General Public License v2.1
40 stars 1 forks source link

Integrate with other open source algorithmic composition systems #161

Closed gogins closed 3 years ago

gogins commented 3 years ago

Add better facilities for integrating CsoundAC with other open source algorithmic composition systems. I will start with Python, but there might be others. Other systems should be able both to receive events from CsoundAC, and to send events to CsoundAC. The model should be something like the LispNode, but the Node subclasses should be specialized for the composition system in question.

The main motivation here is to use Xenakis sieves with the chord space stuff without having to re-invent the wheel.

gogins commented 3 years ago

I'm not necessarily going to do all of these, by any means! This is just to identify possibilities.

gogins commented 3 years ago

Might be easier to port the sieve from something.

znmeb commented 3 years ago

@gogins Is there an implementation of the sieves in any language? I've got the book but don't recall ever seeing code other than what Xenakis himself or his students wrote.

gogins commented 3 years ago

At least music21, athenaCL, and I think SuperCollider.

Regards, Mike

On Fri, Apr 16, 2021, 18:52 M. Edward (Ed) Borasky @.***> wrote:

@gogins https://github.com/gogins Is there an implementation of the sieves in any language? I've got the book but don't recall ever seeing code other than what Xenakis himself or his students wrote.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gogins/csound-extended/issues/161#issuecomment-821685032, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIGJK4ZYL6M73IFJFZJL3TJC5UVANCNFSM43AODG2Q .

znmeb commented 3 years ago

I'll try SuperCollider first - I already have the build scripts for that. :-)

gogins commented 3 years ago

I have completed a facility for generating scores in athenaCL and using them in CsoundAC, as csound-extended/CsoundAC/athenacl-to-csoundac.py. I do not currently see how to go in the other direction, or if that would even be necessary.

gogins commented 3 years ago

Got the musx stuff working with just Csound. Now for CsoundAC.

gogins commented 3 years ago

Did musx_to_csound and musx_to_csoundac.

Installed abjad and music21. abjad uses Lilypond and thus uses the Lilypond file export format, which would be awkward for CsoundAC because it is not a flat, context-free list.

music21 has notes that are found in streams, so presumably iterating over streams (as done internally for MIDI) could produce a flat list of notes.

Indeed, Score.flat produces a flat list of objects, many of them Notes, with offsets (and even seconds, if a tempo is given) measured in beats from the start of the Score.

gogins commented 3 years ago

In general, feeding CsoundAC scores to other systems would require those systems to already have in place some facility for reading external music. MIDI of course is the lingua franca.

gogins commented 3 years ago

Abjad uses only Lilypond for output.

Lilypond either engraves, or creates MIDI files, or does this text export:

http://lilypond.org/doc/v2.18/Documentation/notation/saving-music-events-to-a-file
gogins commented 3 years ago

For systems such as abjad, music21, and Lilypond, it is tedious to discover how to flatten the score and yet retain all the information that CsoundAC needs. For these systems, the CsoundAC ExternalNode can store a Python script and the inputs to the system, save the score as a MIDI file, and import the MIDI file into a CsoundAC Score.

gogins commented 3 years ago

I've taken this as far as I can consistent with continuing to compose. I am opening a separate issue for the inability to run nudruz with Embeddable Common Lisp.

gogins commented 3 years ago

For musx, fractional pitches are implemented using a master track with different pitch bends for different channels, then fractional pitches for actual instruments are divided between channels. This is awkward to say the least.

gogins commented 3 years ago

This will probably be an ongoing issue for a while.

gogins commented 3 years ago

I had a productive Zoom call with Rick Taube and played some stuff for him, which till now he has not heard because ctcsound is broken at this time for recent versions of Python.

I am closing this issue as @ricktaube says he will merge my Csound adapter code into musx. New issues will appear in @ricktaube/musx.