Git Product home page Git Product logo

mido2max's Introduction

Mido2Max

This is a quick code experiment to iteratively send midi to Max in real-time via Mido. The midi is sent by OSC, which might seem odd but it's easy and it works. Alternatively you can simply play the midi in Python by itself, but this code has only been tested on Windows 10. The original idea was to generate midi through music21 or some other library and send to Max, all in real-time. At the moment, the generative code has not been developed, and this code simply iterates through a static midi file.

Requirements

pip install -r requirements.txt

About / How-to-Use

python mido_play_sendOSC_min.py runs the Mido2Max code and python mido_play_min.py runs the python-only code. Both programs use computer clock, and you can read here about timing. In this code, there are two time parameters that you can modify to affect the timing of the midi playback. One is the duration of each individual note, and the other is the system clock. You have access to these as arguments. python mido_play_sendOSC_min.py --clock_scale 1.0 --dur_scale 1.0 is the default setting, which will play back the midi file faithfully according to each individual midi note time value (as opposed to a global tempo). If you would like to change the "tempo", then you can change the dur_scale value. For example --dur_scale 0.5 will double the tempo. clock_scale will affect the timing of the individual midi notes by scaling the computer clock. It's really just there for fun: python mido_play_sendOSC_min.py --clock_scale 0.1 --dur_scale 0.1 kinda sounds like Thelonius Monk if he were reduced to a lowly python program. Finally, to run your own file, use the argument --filename [your_midi_file].mid. The default is One Note Samba.

mido2max's People

Contributors

j-fo-s avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.