Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vvzen/osc-route-midi-examples
Collections of examples of sending/receiving MIDI/OSC that can be useful for live visuals
https://github.com/vvzen/osc-route-midi-examples
midi midi-player midiplayer nodejs osc processing routing
Last synced: about 1 month ago
JSON representation
Collections of examples of sending/receiving MIDI/OSC that can be useful for live visuals
- Host: GitHub
- URL: https://github.com/vvzen/osc-route-midi-examples
- Owner: vvzen
- Created: 2020-03-31T22:04:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T18:12:31.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T00:52:56.920Z (over 1 year ago)
- Topics: midi, midi-player, midiplayer, nodejs, osc, processing, routing
- Language: JavaScript
- Homepage:
- Size: 1.4 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# osc-route-midi-examples βοΈπΆπ»π¨
This repo hosts a series of tiny examples that will hopefully make your life easier if you're trying to do real time visuals or music, new media installation work, etc.. π¨π»βπ¨π©π»βπ€
Hope this helps someone!
## processing\_read\_midi
*Processing*
Simple example that shows how to read MIDI from a file and how to send via OSC some of the attributes of each note while the file is being played.
It uses the sequence object from the `javax.sound.midi` package, and the oscp5 processing library.
OSC messages are sent on localhost using UDP as transport.
Original creedits for the code go to Hamoid, who wrote [this tiny wrapper class]([https://github.com/hamoid/Fun-Programming/tree/master/processing/ideas/2017/04/MidiViz]) to facilitate dealing with MIDI.You also can run it in background via the `processing-java` binary.
`processing-java --sketch=/full/path/to/processing_read_midi --run`
You can also export the .pde sketch to an app if you want:
`processing-java --sketch=/full/path/to/processing_read_midi --output=/where/you/like --export`
## node\_receive\_osc
*NodeJS*
This example shows how to receive OSC messages in NodeJS using the `osc` nodejs package.
## node\_bridge\_osc
*NodeJS* *Threejs*
This slightly more complex example shows how to forward OSC messages from NodeJS to the browser using **WebSockets** using the `osc` and `ws` packages.
In this way you can have your browser side library (like *p5js* or *threejs*) creating graphics in the browser but reacting to inputs that could come from any application/framework that supports sending OSC messages via UDP (which means a lot of apps like VezΓ©r or Ableton Live, etc.. or creative coding frameworks like Processing or Openframeworks).