All Projects → mi-creative → mi-gen

mi-creative / mi-gen

Licence: GPL-3.0 License
Mass-Interaction Sound Synthesis Toolbox for Max/MSP's gen~

Programming Languages

Max
122 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to mi-gen

Robotics-Object-Pose-Estimation
A complete end-to-end demonstration in which we collect training data in Unity and use that data to train a deep neural network to predict the pose of a cube. This model is then deployed in a simulated robotic pick-and-place task.
Stars: ✭ 153 (+206%)
Mutual labels:  physics-simulation
modular-starter-kit
The starter kit with entire modular approach to help remove boilerplate code in developing
Stars: ✭ 14 (-72%)
Mutual labels:  modular
tune
Make xenharmonic music and create synthesizer tuning files for microtonal scales.
Stars: ✭ 73 (+46%)
Mutual labels:  modular
featool-multiphysics
FEATool - "Physics Simulation Made Easy" (Fully Integrated FEA, FEniCS, OpenFOAM, SU2 Solver GUI & Multi-Physics Simulation Platform)
Stars: ✭ 190 (+280%)
Mutual labels:  physics-simulation
amanuensis
The Amanuensis is an automated songwriting and recording system aimed at ridding the process of anything left-brained, so one need never leave a creative, spontaneous and improvisational state of mind, from the inception of the song until its final master. See the README for instructions and feel free to message me at soundcloud.com/to_the_sun.
Stars: ✭ 30 (-40%)
Mutual labels:  max-msp
pedalevite
Pédale Vite — DIY multi-FX pedalboard for guitar/bass/etc.
Stars: ✭ 68 (+36%)
Mutual labels:  modular
FrisPy
Frisbee flight simulator written in Python.
Stars: ✭ 23 (-54%)
Mutual labels:  physics-simulation
GA-Toolbox
Genetic Algorithms Toolbox
Stars: ✭ 41 (-18%)
Mutual labels:  modular
mujoco
Python wrapper for MuJoCo physics simulation.
Stars: ✭ 12 (-76%)
Mutual labels:  physics-simulation
midori
🔧 advanced modular discord bot
Stars: ✭ 44 (-12%)
Mutual labels:  modular
kin-poly
Official implementation of NeurIPS 2021 paper: "Dynamics-Regulated Kinematic Policy for Egocentric Pose Estimation". This repo contains a copy of the code for "Universal Humanoid Controller" and "Kinematic Policy".
Stars: ✭ 32 (-36%)
Mutual labels:  physics-simulation
build
Build system scripts based on GENie (https://github.com/bkaradzic/genie) project generator
Stars: ✭ 30 (-40%)
Mutual labels:  modular
octicons-modular
GitHub Octicons with tree-shaking support and icon-per-file style.
Stars: ✭ 25 (-50%)
Mutual labels:  modular
synth
A Teensy 4 modular FM polyphonic synth.
Stars: ✭ 39 (-22%)
Mutual labels:  modular
PySDM
Pythonic particle-based (super-droplet) warm-rain/aqueous-chemistry cloud microphysics package with box, parcel & 1D/2D prescribed-flow examples in Python, Julia and Matlab
Stars: ✭ 26 (-48%)
Mutual labels:  physics-simulation
magpylib
Python package for computation of magnetic fields of magnets, currents and moments.
Stars: ✭ 95 (+90%)
Mutual labels:  physics-simulation
fdtd
A 3D electromagnetic FDTD simulator written in Python
Stars: ✭ 195 (+290%)
Mutual labels:  physics-simulation
PMLib
A physical modelling library for SuperCollider
Stars: ✭ 14 (-72%)
Mutual labels:  sound-synthesis
generator-nitro
Your frontend? Fuel it with Nitro! Develop your frontend with a proven but flexible Node.js app, even in a large team.
Stars: ✭ 65 (+30%)
Mutual labels:  modular
pacco
A bundler for modular and extensible web projects.
Stars: ✭ 16 (-68%)
Mutual labels:  modular

mi-gen

Mass-Interaction Sound Synthesis Toolbox for Max/MSP's gen~

mi-gen is a mass-interaction physical modelling toolbox for the Max/MSP patching environment. It allows coding and simulating virtual physical objects, modelled as networks of masses and interactions (springs, dampers, conditional contacts, etc.), directly within gen~'s codebox system.

Installation

Clone or download the github repository and place the mi-gen folder in the Max/MSP's package folder (in Windows: {path-to-documents}/Max[7/8]/Packages).

A Quick Introduction

Once you've placed the package in Max's package folder and launched Max, head over to the "extras" tab: you should find an mi-gen~/mi-gen~ Intro Patch. Open the 00 - MI_Introduction and - tadaaaaa - get to know which physical elements compose mi-gen~, what they do and how the library integrates with gen~'s codebox.

Above: The mi-gen~ introduction patch.

Creating Models : MIMS and MIMS4Max

While it's possible to create phyiscal models by writting genexpr code by hand, we can make things much easier by using a model scripting tool, that will generate all the necessary code based on a physical model description: this is where MIMS (Mass Interaction Model Scripter) comes in.

A first prototype of MIMS was developped in Python here. However, a much nicer and up-to-date MIMS4Max tool is now directly integrated into mi-gen~! It relies on Max's new NodeJS integration, using Javascript to interpet and compile model descriptions into gen~ code.

In simple terms, first you write a model with a simple syntax on the left, following which it is parsed. If the model syntax is correct, code is generated on the right, allowing you to create a "[model].gendsp" object that can be dropped straight into any Max/MSP project. Oh, and as a bonus you can also generate DSP code for the Faust environment !

If mi-gen~ is in your Max package location, MIMS4Max should be located in your extras tab under: mi-gen~/MIMS4Max/MIMSforMax.

Above: The MIMS4Max model scripting tool, developped with Node4Max

Running the examples

The examples are located in the "examples" subfolder. There are several, demonstrating various virtual instruments and interactions (plucked and bowed strings, meshes, polyphonic instruments, etc.). They are always composed of a patch file, a gendsp file containing the model, and generally a .mdl file, corresponding to a model description.

Tutorial Material

The best way to explore the tutorial examples is through a navigation patch in the extras mi-gen~/NavigateTutorials. You can browse between three tutorial chapters:

  • The oscillator series, focusing on the harmonic oscillator.
  • The building series, which progressively introduces various concepts for building models in mi-gen~.
  • The modelling series, focusing on some more advanced modelling techniques.

Above: The tutorial navigation patch.

Above: A tutorial patch of a bowed string model.

The Model Gallery

The Model_Gallery folder in the examples also contains many patches that you can also explore, play with and tweak around, or use as a base for your own work.

Above: a mass-interaction rectangular mesh (from the Mesh_15by15 example), rendered using NURBS in Jitter

Above: a mass-interaction string model and associated Max patch (FrettedString example)

How mass-interaction models are expressed within gen~

Models are created in codebox objects (allowing textual coding within the gen~ system) using the migen-lib.genexpr library, that defines the various physical elements, as well as functions for input/output, etc.

The code for a very basic mass-interaction model implemented with mi-gen~ is shown below:

require("migen-lib");

// Model data structures
Data m_in2(3);
Data gnd(3);
Data m1(3);

// Control Rate Parameters
Param Z(0.0001);
Param K(0.01);
Param M(1.);

History model_init(0);
// Model init phase
if(model_init == 0){
    init_mat(m_in2, 1, 1);
    init_mat(gnd, 0, 0);
    init_mat(m1, 0, 0);
    model_init = 1;
}

// Model computation
update_input_pos(m_in2, in2);
compute_ground(gnd);
compute_mass(m1, M);
compute_contact(m1, m_in2, 0.1, 0, 0);
apply_input_force(m1, in1);
compute_spring_damper(m1, gnd, K, Z);

out1 =  get_pos(m1);

The above model creates a harmonic oscillator (a mass connected to a fixed point by a dampened spring) that can be subjected to force impulses via the first inlet of the codebox object and can be struck using a contact interaction (with stiffness, damping and threshold distance parameters) by another mass, whose position is controlled by the second inlet.

Each material element in the model (mass, fixed point, etc.) is a represented by a 3-value Data array, containing the element's current position, previous position, and sum of forces applied to it by interactions.

The model_init flag allows to initialise the model state (initial positions and previous positions - thus resulting initial velocity) during the first step of computation.

Authors

This project was developped by James Leonard, within the Digital Arts and Sensory Immersions research cell at GIPSA-Lab (Grenoble, France) with the support of the French Ministry of Culture.

For more information and video tutorials, head over to: www.mi-creative.eu

Read the supporting paper (published at SMC'19): http://www.mi-creative.eu/paper_smc19_gen.html

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the LICENSE file for details

Acknowledgments

This work implements mass-interaction physical modelling, a concept originally developped at ACROE - and now widely used in sound synthesis, haptic interaction and visual creation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].