Comments (10)
- get a version of ofxMidi that works with yout version of openframeworks for 0.9.8
$ cd /home/pi/opt/of/addons && git clone https://github.com/danomatika/ofxMidi/
- add
ofxMidi
to ~/opt/of/apps/open-nsynth/open-nsynth/addons.make - in /home/pi/opt/of/apps/open-nsynth/open-nsynth/src/ofApp.h add at the beginning after the includes
#include "ofxMidi.h"
and change line 35 to
class ofApp : public ofBaseApp, public ofxMidiListener{
- add at line 73
// the midi stuff
void newMidiMessage(ofxMidiMessage& eventArgs);
ofxMidiIn midiIn;
ofxMidiMessage midiMessage;
- In /home/pi/opt/of/apps/open-nsynth/open-nsynth/src/ofApp.cpp change after line 77 add at end of void ofApp::setup() -> adapt this to your needs
// print input ports to console
midiIn.listPorts(); // via instance -> comment this line when done
//ofxMidiIn::listPorts(); // via static as well
// open port by number (you may need to change this)
midiIn.openPort(1);
//midiIn.openPort("IAC Pure Data In"); // by name
//midiIn.openVirtualPort("ofxMidiIn Input"); // open a virtual port
// don't ignore sysex, timing, & active sense messages,
// these are ignored by default
midiIn.ignoreTypes(false, false, false);
// add ofApp as a listener
midiIn.addListener(this);
// print received messages to the console
midiIn.setVerbose(true);
- add at the end of ofApp.cpp
void ofApp::newMidiMessage(ofxMidiMessage& msg) {
midiMessage = msg;
// ofLog(OF_LOG_NOTICE,"channel: " + ofToString(midiMessage.channel) + " control: "
// + ofToString(midiMessage.control) +" value: " + ofToString(midiMessage.value)+" pitch: " + ofToString(midiMessage.pitch)
// +" velocity: " + ofToString(midiMessage.velocity));
int idx;
idx = midiMessage.pitch;
if (msg.velocity == 127){
synthMutex.lock();
synth.on(idx);
synthMutex.unlock();
}
else{
synthMutex.lock();
synth.off(idx);
synthMutex.unlock();
}
}
- in ~/opt/of/apps/open-nsynth/open-nsynth run
$ make -j4
- stop nysth service
sudo service open-nsynth stop
- run compiled app
$ bin/open-nsynth
from open-nsynth-super.
This is easly done by adding the ofxMidi library to the app
from open-nsynth-super.
The NSynth can only send / receive MIDI over USB as a USB Host. It is less easy to send MIDI between two host computers. There are many ways to do what you want, but very few of them are easy to setup and none as easy as connecting the NSynth Super to your computer with a USB cable.
The easiest solution in this case is to use a USB to MIDI DIN Adapter.
from open-nsynth-super.
it's different, you have to put a usbmidi device in the raspberry pi. Like a akai or so.
If you wan't to use your pcb as usbmidi it's not possible like that because I think the usb connector on the pcb is only for power.
if you want use the touch/knobs as midi input and send it to a other machine there a 2 common ways to do it.
-
connect the rpi to your windows network
-
use either https://github.com/hiroyuki/ofxArtnet for Artnet or
osc depending what is supported py the program you try to use in windows.
https://github.com/openframeworks/openFrameworks/tree/patch-release/addons/ofxOsc https://www.youtube.com/watch?v=TczI-tSOIpY
from open-nsynth-super.
Okay! It would make the whole live setup a little more cumbersome, but fortunately my audio interface already has MIDI DIN in/out, so I'll just get a cable and be done with it. Thanks.
from open-nsynth-super.
I can expand the openframeworksapp to do that and it's only some 20 lines of code
from open-nsynth-super.
Has anyone done this and prepared a ready-to-go image file? I have no recent programming experience but I would very much like my Nsynth to speak USB. :-)
from open-nsynth-super.
@nanu-c thx for the code. there is a minor typo though. it should be "listInPorts()" instead of "listPorts" at least in the latest version of ofxMidi.
from open-nsynth-super.
@nanu-c seems not that easy. have you tested it yourself? im unable to list the port created with "loopMIDI" in Windows. i have connected the device via the pcb's USB port with the PC. should i use the USB port on the pi instead?
from open-nsynth-super.
ok. i get it. thx for clarification. btw. im from vienna, too. saw your homepage. nice projects ;)
from open-nsynth-super.
Related Issues (20)
- Can't get to terminal to install the firmware HOT 2
- Struggling to compile Pi3b+ HOT 4
- broken voltage regulators (U4-U5-U6) (bad Tindie batch) - FIXED HOT 2
- The following libraries were not found:
- Silkscreen for the GPIO Header is on top rather than the bottom
- MIDI notes issues
- Make install stm32x device protected error HOT 1
- nsynth_generate fails due to wrong shape - "Encoding file should have 2 dims [time, channels], not 3" HOT 4
- why the mp3 conversion? HOT 3
- all controller is ok , but no sound HOT 3
- Audio Pipeline Bazel Build HOT 1
- nice-to-have: 3D printable enclosure
- Contents of OLED too far left - first column of pixels missing
- Upgrading hardware to 1.2 - wire encoder switches HOT 3
- Raspberry Pi 3B image
- Black OLED screen and no sound
- Rasberry pi 4 HOT 1
- NSynth Samples lib HOT 3
- NSynth not receiving MIDI?? HOT 1
- where i cant find the version of the Nsynth with touchscreen
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open-nsynth-super.