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

Investigate higher dimensional dynamical systems and their attractors for score generation in chord spaces #116

Closed gogins closed 3 years ago

gogins commented 4 years ago

This would be in C++ or JavaScript. It goes far back to some of my original ideas about algorithmic composition, and is related to the idea of parametric composition in chord spaces.

Unlike the parametric composition idea and the focus on fractal functions, this would be about interactively exploring parameters for dynamical systems in division algebras, quaternions and octonions, if indeed they support the kind of dynamical systems that I need, which is the first thing to find out.

I could of course dreate a C++ library based on a library for quaternions or octonions, and expose it in JavaScript for use in NW.js.

There are two related approaches:

  1. Time is iteration, and the evolution of the system generates the score.
  2. Time is a dimension, and the attractor of the system generates the score, either as a fractal function, or by some other means.
gogins commented 4 years ago

I think that division algebras are not required. High-dimensional dynamical systems include neural networks, and are represented as dynamical systems with matrix evolution operators. What I would want is software to evolve such systems, derive Lyupanov exponents, and chart the results as scores.

In this way I should be able to directly target the dimensionality of chord space with or without time as a dimension.

In the literature, "high dimension" means systems with more than one Lyupanov exponent, and/or with dimensions more than 3. Either the term is ambiguous, or I don't yet understand it.

gogins commented 4 years ago

This is interesting, I wonder if it is relevant: https://github.com/simupy/simupy. What is its dimensionality? Possibly arbitrary, see https://readthedocs.org/projects/simupy/downloads/pdf/latest/.

gogins commented 4 years ago

Check this out also: https://github.com/trilinos/Trilinos.

https://www.sciencedirect.com/science/article/pii/S2405896315013658

Planar, but JavaScript: https://github.com/jorgeatorres/dynamite

https://www.boost.org/doc/libs/1_67_0/libs/numeric/odeint/doc/html/boost_numeric_odeint/tutorial/chaotic_systems_and_lyapunov_exponents.html

gogins commented 4 years ago

I have installed simupy. The examples that depend upon sympy (symbolic Python) crash, but the other examples run.

I have downloaded, configured, and am attempting to build Trilinos. This system is bigger than Csound plus extended Csound. The build is now proceeding into the Stokhos package but it fails there.

All of these packages depend upon relatively up to date operating systems and software packages. Trilinos in addition expects to be installed from source code.

gogins commented 4 years ago

Error in Trilinos build:

/home/mkg/Trilinos/packages/PyTrilinos/src/Teuchos.i:148: Error: Syntax error in input(1).

Found the offending line, no idea how to fix the error. Trying to omit this package.

gogins commented 4 years ago

Trilinos now builds. I am trying to see if it can be useful for composing in the context of this issue.

gogins commented 4 years ago

I'm floundering here. Trilinos is for big problems on supercomputers, using distributed systems. It's all about solving linear systems and non-linear systems. Presumably, my focus on chaotic dynamical systems is related to non-linear systems of dimension >= 4. There are no examples specifically about mapping dynamical systems although there is indeed much discussion of bifurcations, chaos, Lyupanov exponents, and so on.

Albers' dissertation discusses computational simulation of dynamical systems in detail and in depth, yet maddeningly lacks one single hint as to software and setup for these runs. I will search again. He may have used Maple or matlab.

Not quite, although Albers seems to have departed the academic career track (actually, still trying to get on board, see https://www.dbmi.columbia.edu/profile/david-albers/), his Web pages indicate the use of the Gnu Scientific Library with custom C++ programs. N.B., he worked with Sprott and Crutchfield and at the Santa Fe Institute.

Trilinos may well be overkill. Taking another look at simupy.

gogins commented 4 years ago

Resource page: https://dsweb.siam.org/Software. Which led to:

  1. https://pydstool.github.io/PyDSTool/FrontPage.html
  2. https://github.com/auto-07p/auto-07p
  3. https://github.com/JuliaDynamics/DynamicalSystems.jl
gogins commented 4 years ago

It occurs to me that this approach may be fundamentally limited, although I do not believe the fractal function approach is fundamentally limited, thanks to the collage theorem.

That is, it may be the case that the branching series of chaotic and high-period attractors produces, if you will, only certain "styles" of sequences. Analysis of different classes of attractor in high-dimensional chaos implies this may be the case.

On the other hand, the literature discusses high-dimensional dynamical systems as neural networks, and how they can be trained to approximate other functions. This bears investigation.

I suspect that the number of parameters required to control a neural network to compute a piece might be significantly higher than the number of parameters required to compute that piece as a fractal function.

I should try to prove, or disprove, this.

gogins commented 3 years ago

I am closing this as a code issue. It may remain as a composing issue.