A first approach to physical modelling


#41

ok just a second I think the problem is, that I missunderstood the development. Major functions need to be implemented within the firmaware I guess. @johannes So if you would like to add some kind of a damped harmonic oscillator how would you implement that? And what the best strategy for physical modelling in this case? As far as I see there is now way build up complex codes in a object? Is the code directly c? Perhaps somebody can explain me the way of implementation.So it doesn't help me to create complex code in c from matlab, because it has to be implemented in the firmware?

C code like this won't work?
https://drive.google.com/open?id=0B16rrKKNzh9WUDRKUjJQQWVINFk


#42

Your objects can include external files, so you can keep common functions in a separate file, and call them from different objects.

You can also use functions from the CMSIS DSP library, and there are a number of utility functions provided by @johannes to do various common tasks. They're undocumented, but it's usually possible to work out what they do by looking at the Factory library objects.
You can also make use of the builtin maths functions provided by the CortexM4 MCU.

a|x


#43

It might do. It depends if it requires external functions that aren't available to the Axoloti compiler, and if the processor is powerful enough to do the work required.

You'd also need to work around the fixed sample-rate of the Axoloti, and the limited RAM available.

These are some of the reasons I've taken my first baby steps in Axoloti object coding by working on ports of lo-fi vintage digital sound-generators and Arduino sketches, rather than trying to back-port code designed for desktop computers.

That's not to say that more complex physical model stuff wouldn't also be very cool. It's just I don't have the maths skills to attempt anything like that myself, sadly.

a|x


#44

Hey,

I can look at this once I get my axoloti. I will either get it from someone in the US that is not using it or I'll wait for the thonk kit as my interest is coupled to being able to control parameters not using a computer :slight_smile:

I can have a look at this once I get it. I just googled harmonic oscillator C code and found this:

http://www.maths.tcd.ie/~ryan/TeachingArchive/161/teaching/harm_osc_rk.c.html

Looks like it's using a 4th order runge kutta and I'd guess trivial do implement in the axoloti C framework.

My interests lie more in the 2D physical modeling but would love to get started in 1D for sure. Matrices in Max (gen) and reaktor are a pain this is why I got interested in axoloti. The main issue will likely be to make changes to create optimal code that the M4 likes and is able to cope with and this is where the CMSIS library will likely be very very useful :slight_smile:

The M4 will never reach the power of a dedicated DSP with clever programming but aleph didn't take off with developers or users for that matter. I cannot find almost any examples of aleph making music on youtube, whereas lots of interesting videos of people exploring the axoloti platform !