Easiest way to connect a MIDI keyboard to PD-l2ORK on Ubuntu 16.04
Pardon If I'm behind the curve here (I'm still using L2ork v1 most of the time) but last I checked Jack Midi was not an available option in any version of Pd. You can connect through the jack midi patcher in Qjackctl (the second tab in the connections dialogue box after audio) but only if you have the jack/alsa midi bridge running. That just lets you patch jack midi only apps through to alsa midi only apps and vise-versa. I personally always use the third tab (confusingly only labeled "alsa" when it should be "alsa midi") because jack midi presently has no way to handle the larger sysex messages I deal with and blocks them by default.
Anyway the point is that If you are using any Pd variant you are always using either Alsa midi or OSS midi (actually the OSS is just an alsa-based simulator now so you're really always using alsa, but I digress). There are a few other graphical audio/midi patcher programs such as Patchage or the similar Catia program from the KXStudio package but AFAIK they all require you to set up the connections manually at least once.
However, all of those programs allow you to save your patching setup for instant automatic recall the next time you need it. In Qjackctl this is done from the "Patchbay" dialogue box. I haven't used it in awhile but if you mess with it you'll find a way to save the current set of connections. Qjackctl is pretty messy and counter-intuitive thou so for beginners you might want to have a look at the other options mentioned above.
AFAIK there's no auto-midi patching options available. I know they tried implementing something like that in Pd some time ago but they disabled it because it ended up causing more problems than it solved. There's info about that buried in the Pd list somewhere....
IAC Driver
I'm going to have to plead myself stumped once more I'm afraid. I really like the concept of MIDI routing without using Audio/MIDI setup, and MidiPatchbay is easy enough to use, but the patch is still not connecting as I had expected it to (somebody only barely understands the basics of computer science if claiming so isn't hubris on my part). My process is as follows:
-
Start MIDIPatchbay, create a single universal MIDI strip with both input and output - name "PD-Input"/"PD-Output" for reference. Allows all notes, allows all messages, clocks in real-time.
-
The patch itself doesn't show up in Audio/MIDI setup. That's fine, as I understand it the MIDI signal is traveling through MIDIPatchbay anyways. IAC is turned off and no software instruments are installed. I can close down Audio/MIDI setup and ignore it.
-
Start Mainstage, make sure that the volume is up, a patch is readied, and that Mainstage recognizes that there is a MIDI input available. Mainstage recognizes "1 MIDI input available"
-
Start PD-Extended and open the Sequencer patch.
-
Go through the process of making sure all components of the patch are functioning (it has a sequence tempo set, all the notes are active, volume is up, all the usual goodies).
-
Check DSP to on (I don't think it's necessary, but I tend to idiot proof my processes).
-
Set MIDI output from PD-Extended to "PD-Input" from MIDIPatchbay.
At this point I have all three pieces of software running, I believe in the correct order, and connected to one another with the only glitch being that I don't get a lick of audio. I'll dump the patch here for reference:
I try to keep things fairly self-explanatory in terms of sends/receives and with comments within the object arrangement, but here's hoping it's legible. If the problem is in the coding of the patch I can take it across to that section of the forum. That said, even making a simple patch to create a note with set number, velocity, and duration on manual bang and send through the midiout doesn't seem to be arriving to Mainstage. I suppose I could use one of my other programs capable of MIDI synthesis, but that seems superfluous.
I really appreciate the help, I've worked with PD less frequently over the past five years or so than when I was first learning the ropes; it always seems like I have to re-learn a few things as well as double check on my knowledge of possible objects to use... Always something new.
Pure data Random endless list of errors?
Currenty outputs no sound?
input channels = 0, output channels = 0
input channels = 0, output channels = 0
tried /Applications/Pd-extended.app/Contents/Resources/extra/libdir/libdir.pd_darwin and succeeded
tried /Applications/Pd-extended.app/Contents/Resources/extra/vanilla/list.pd_darwin and succeeded
tried ./extra.pd_darwin and failed
tried /System/Library/Fonts/extra.pd_darwin and failed
tried /Library/Fonts/extra.pd_darwin and failed
tried /Users/joelnash/Library/Fonts/extra.pd_darwin and failed
tried /usr/X11R6/lib/X11/fonts/TTF/extra.pd_darwin and failed
tried /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/extra.pd_darwin and failed
tried /Users/joelnash/Library/Pd/extra.pd_darwin and failed
tried /Library/Pd/extra.pd_darwin and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/extra.pd_darwin and failed
tried ./extra/extra.pd_darwin and failed
tried /System/Library/Fonts/extra/extra.pd_darwin and failed
tried /Library/Fonts/extra/extra.pd_darwin and failed
tried /Users/joelnash/Library/Fonts/extra/extra.pd_darwin and failed
tried /usr/X11R6/lib/X11/fonts/TTF/extra/extra.pd_darwin and failed
tried /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/extra/extra.pd_darwin and failed
tried /Users/joelnash/Library/Pd/extra/extra.pd_darwin and failed
tried /Library/Pd/extra/extra.pd_darwin and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/extra/extra.pd_darwin and failed
tried ./extra/extra-meta.pd and failed
tried /System/Library/Fonts/extra/extra-meta.pd and failed
tried /Library/Fonts/extra/extra-meta.pd and failed
tried /Users/joelnash/Library/Fonts/extra/extra-meta.pd and failed
tried /usr/X11R6/lib/X11/fonts/TTF/extra/extra-meta.pd and failed
tried /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/extra/extra-meta.pd and failed
tried /Users/joelnash/Library/Pd/extra/extra-meta.pd and failed
tried /Library/Pd/extra/extra-meta.pd and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/extra/extra-meta.pd and succeeded
tried ./pdlua.pd_darwin and failed
tried /System/Library/Fonts/pdlua.pd_darwin and failed
tried /Library/Fonts/pdlua.pd_darwin and failed
tried /Users/joelnash/Library/Fonts/pdlua.pd_darwin and failed
tried /usr/X11R6/lib/X11/fonts/TTF/pdlua.pd_darwin and failed
tried /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/pdlua.pd_darwin and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/extra/pdlua.pd_darwin and failed
tried /Users/joelnash/Library/Pd/pdlua.pd_darwin and failed
tried /Library/Pd/pdlua.pd_darwin and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/pdlua.pd_darwin and failed
tried ./pdlua/pdlua.pd_darwin and failed
tried /System/Library/Fonts/pdlua/pdlua.pd_darwin and failed
tried /Library/Fonts/pdlua/pdlua.pd_darwin and failed
tried /Users/joelnash/Library/Fonts/pdlua/pdlua.pd_darwin and failed
tried /usr/X11R6/lib/X11/fonts/TTF/pdlua/pdlua.pd_darwin and failed
tried /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/pdlua/pdlua.pd_darwin and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/extra/pdlua/pdlua.pd_darwin and failed
tried /Users/joelnash/Library/Pd/pdlua/pdlua.pd_darwin and failed
tried /Library/Pd/pdlua/pdlua.pd_darwin and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/pdlua/pdlua.pd_darwin and succeeded
tried ./tclpd.pd_darwin and failed
tried /System/Library/Fonts/tclpd.pd_darwin and failed
tried /Library/Fonts/tclpd.pd_darwin and failed
tried /Users/joelnash/Library/Fonts/tclpd.pd_darwin and failed
tried /usr/X11R6/lib/X11/fonts/TTF/tclpd.pd_darwin and failed
tried /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/tclpd.pd_darwin and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/extra/tclpd.pd_darwin and failed
tried /Users/joelnash/Library/Pd/tclpd.pd_darwin and failed
tried /Library/Pd/tclpd.pd_darwin and failed
tried /Applications/Pd-extended.app/Contents/Resources/Scripts/../extra/tclpd.pd_darwin and failed
tried ./tclpd/tclpd.pd_darwin and failed
tried /System/Library/Fonts/tclpd/tclpd.pd_darwin and failed
tried /Library/Fonts/tclpd/tclpd.pd_darwin and failed
tried /Users/joelnash/Library/Fonts/tclpd/tclpd.pd_darwin and failed
tried /usr/X11R6/lib/X11/fonts/TTF/tclpd/tclpd.pd_darwin and failed
tried /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/fonts/tclpd/tclpd.pd_darwin and
markovGenerator: A music generator based on Markov chains with variable length
Edit: There is a general [markov] abstraction now at https://forum.pdpatchrepo.info/topic/12147/midi-into-seq-and-markov-chains/45
This is one of the early projects by @Jona and me. Happy to finally release it.
markovGenerator
Generates music from learned material using Markov chains. It is polyphonic, plays endlessly and supports Markov chains with variable length.
markovGenerator.zip (updated)
Usage:
- Record midi notes or load midi files
- Make Markov system
- Play
-
Record midi notes or load midi files
Until you reset the memory, each new recording will be added to the memory. The recorded material is seen as a loop, so that the last note is followed by the the first note, for endless play. markovGenerator handles recording midi and loading midi files differently: When you record midi, it will record notes according to the midi clock every sixth midi tick. This is defined in the counter in [pd midiclock]. So that way, breaks are being recorded and the rhythm is preserved. When loading midi files, no breaks are being recorded, the notes are just recorded in order, so the rhythm will be lost. In any case, simultaneous notes will be recorded as chords, so polyphony is preserved. -
Make Markov system
Set markovOrder to specify the length of the Markov chain. The higher the order, the more musical information will be kept, the lower the order, the more random it gets. You can use soundFilter and channelFilter to only use notes of the specified sound or channel. This is especially useful when working with midi files. Note that if there are no notes of the specified sound or channel, the Markov system will be empty and nothing will be played. Set the filters to zero to disable them. If you change the settings for the Markov system, click makeMarkov again for them to take effect. You can make new Markov systems with different settings out of the same recorded material over and over again, even when playing. If you record additional notes, click makeMarkov again to incorporate them into the Markov system. -
Play
While playing, you can change the note length, sound and midi out channel. Set soundOut and channelOut to zero to use the sound and channel information of the original material. Playing starts with the Markov chain of the last recorded notes, so the first note might be played first.
Use the markovAll section on the right to control all Markov channels at once. Here you can also set tempo, swing and midiSync, and you can save the project or load previous projects.
Have fun!
If it does not play, make sure that
- you recorded some notes,
- you hit the makeMarkov button,
- soundFilter and channelFilter are not set to values where there are no notes. Try setting the filters to zero and hit makeMarkov again.
About the Markov system:
You can see the Markov system of each Markov channel in [text define $0markov]. Notes are stored as symbols, where the values are joined by "?". A note might look like 42?69?35?10 (pitch?velocity?sound?channel). Chords are joined by "=". A chord of two notes might look like 40?113?35?10=42?49?35?10. Notes and chords are joined to Markov chains by "-". The velocity values are not included in the chains. Sound and midi channel values are only included, if soundFilter or channelFilter are off, respectively. Markov chains of order three may look like 42?35?10-36?35?10=42?35?10-60?35?2 with filters off and simply like 42-37-40 with both filters active, only using the pitch value.
Requires Pd 0.47.1 with the libraries cyclone, zexy and list-abs.
Fifo Overflow
Whoops! Missed this post, just found it by accident. Don't know if the OP gave up but might as well respond for the archive and mention that I finally filed a bug on this issue.
The known problem here -- as I have stated in other threads -- is probably not a midi clock issue but Active Sense messages (the Yamaha PSR-E323 midi implementation chart indicates that these are implemented in that device). Active Sense is part of the System Realtime group of commands in the midi spec (also includes clock, stop, start, and continue).
If configured correctly, Midi Patchbay on the MAC will stop these messages, but it can only be configured to block the entire System Realtime group. If the other messages are needed, a more selective option might be Midi Pipe, thou I have not yet tested this. It can be downloaded from here:
https://www.macupdate.com/app/mac/10541/description
See also these threads:
http://forum.pdpatchrepo.info/topic/9565/midi-issue
http://forum.pdpatchrepo.info/topic/9501/filter-out-midi-clock-information
http://forum.pdpatchrepo.info/topic/9635/does-midirealtimein-still-work
Pd quits when opening Midi settings
Which version of Pd and on which operating system?
Can't say for sure what's up, one long-standing issue with Mac and Windows PD is that PD has never had a proper software midi interface between the app and the system. What it does have is a hack-in that will connect PD midi to - at maximum - the first nine ports on the system's midi port list and nowhere else. ATM only ALSA MIDI on linux has anything close to a fully interfaced PD midi to system buss.
To get full access to the max available midi porting on Mac/Win you have to start with all midi ports on the system deactivated. You then have to use 3d party midi patching software such as Midi Patchbay on Mac (don't use IAC leave it deactivated) or an equivalent Windows program to create nine virtual midi ports to occupy those first eight slots on the system list. Start PD and connect it to the nine virtual ports. Activate all the other midi ports/devices that you need on the system, then use the patching software to do the actually midi routing to external software and devices.
If the above sounds ridiculous -- it is! Supposedly this is actually being worked on (finally) but it requires a major rewrite of badly botched coding. Most of the Pd coders don't really "get" midi and the few that do haven't been very active since they contributed the ALSA code. Take it from someone who has written multiple midi synth editors with Pd-- there's a reason I prefer PureData on linux.
libpd on mac: clarification requested on expected behavior of cpp sample
Hi! I am running Pd-0.47-1-64bit on Mac OS 10.11.6 and libpd 0.9.2. I am trying to work with the samples/cpp/pdtest. Here's the github repo. I currently have an app that takes video and spits out a 2D array of color values for regions of interest to file. I have a pd patch that then loads those into a table and plays the corresponding pitch. I need the two (patch, c++ app) to coordinate the IPC.
I compiled the cpp code in the samples directory however, when running pdtest executable there is no patch opened. Is this by design? I was not able to find a pd-vanilla to build from source so took the most recent (pd-0.47-1-64bit.mac.tar.gz). Does libpd need to have the pd built after libpd? If so, can anyone please point me to a src file?
Here is a truncated output from running the compiled pdtest. Could someone tell me if this is what is expected?
Thank you for your help.
BEGIN Patch Test
Patch: "pd/test.pd" $0: 1003 valid: 1
Patch: "pd/test.pd" $0: 0 valid: 0
Patch: "pd/test.pd" $0: 1005 valid: 1
PD: PATCH OPENED: 1003
print: 0
PD: PATCH OPENED: 1005
print: 0
FINISH Patch Test
BEGIN Message Test
FINISH Message Test
BEGIN MIDI Test
FINISH MIDI Test
BEGIN Array Test
array1 len: 10
array1 0.0857145 0.328572 0.500001 0.57143 0.514287 0.47143 0.357144 0.285715 0.057143 0
array1 0 1 2 3 4 5 6 7 8 9
array1 10 10 10 10 10 10 10 10 10 10
FINISH Array Test
BEGIN PD Test
FINISH PD Test
Processing PD
PD: bang
PD: 100
PD: symbol test string
PD: bang
PD: 100
PD: symbol test string
PD: 1.23 a symbol
PD dollar zero: 1.23 a symbol
PD: 1.23 sent from a List object
PD: msg 1.23 sent from a List object
PD: 1.23 sent from a streamed list
PD MIDI: notein 2 60 64
PD MIDI: ctlin 2 0 64
PD MIDI: pgm 2 101
PD MIDI: midiin 1 239
PD: symbol test
PD: START MSG TEST
CPP: bang toCPP
CPP: float toCPP: 100
CPP: symbol toCPP: kaaa
CPP: list toCPP: 100 2.3 test 1 2 3 ffsfff
CPP: message toCPP: kaa 1 2.3 test ffs
PD: MSG TEST FINISH
PD: START MIDI TEST
PD: MIDI TEST FINISHED
PD: START ARRAY TEST
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD: FINISH ARRAY TEST
PD: test_abs: Hello World!
CPP MIDI: note on: 0 0 127
CPP MIDI: note on: 0 0 127
CPP MIDI: note on: 0 60 64
CPP MIDI: control change: 0 64 100
CPP MIDI: program change: 0 99
CPP MIDI: pitch bend: 0 2000
CPP MIDI: aftertouch: 0 100
CPP MIDI: poly aftertouch: 0 64 100
CPP MIDI: midi byte: 0 239
CPP: float env: 75.5457
CPP: float env: 87.9506
CPP: float env: 93.5842
...
CPP: float env: 88.5503
CPP: float env: 87.7612
print: 1
CPP MIDI: note on: 0 0 0
CPP MIDI: note on: 0 1 127
CPP: float env: 86.8932
...
CPP: float env: 41.2584
CPP: float env: 0
print: 2
CPP MIDI: note on: 0 1 0
CPP MIDI: note on: 0 2 127
...
print: 20
CPP MIDI: note on: 0 19 0
CPP MIDI: note on: 0 20 127
Sending record/play/pause/stop etc. to a sequencer supporting mmc/cc
@RickyGWave Hello Ricky......
You will need a midi loopback program so that the midi output of Pd can be sent to the midi input of Propeller, unless you are using osx, in which case I think you can use the built-in midi-settings to loop the midi internally.
Try http://www.tobias-erichsen.de/software/loopmidi.html for windows.
Then you send a midi note from Pd to a named midi output.
You set the midi output in Pd under the Media tab.
In Reason (propeller?) you set the same name as a midi input, and then activate the learn function for the record button. When you send the note from Pd by clicking the message Reason will associate that note with the record button.
David.
PortMidi 'Invalid Device ID'
I have been having this issue (maybe non-issue) for some time.
Here is my set up:
Teensy 2.0 MIDI Device
Pd 0.46.7
Late 2013 Macbook Pro
I am using a Teensy MIDI device in Pd.
If I connect the Teensy device, then launch Pd, I get the following error message:
could not open midi input 0 (Teensy MIDI): PortMidi: 'Invalid device ID'
could not open midi output 1 (Teensy MIDI): PortMidi: 'Invalid device ID'
Under my MIDI settings I have "Teensy MIDI" selected both as my input and output.
If I re-select "Teensy MIDI" in both dialogs of the MIDI preferences menu, and hit OK the same error message will reappear in Pd's print window.
Though I get this error, it seems to not effect the use of the device in any way.
When I connect the device to a windows machine, I don't have this PortMidi error message.
I have also connected this device to my iPhone using MobMuPlat, no issues.
Any advice would be helpful.
MIDI Controller experiences/suggestions
@lovelovevideo Hello again.......... if your computer can talk to to the midi device then Pd will work fine. So the real question is "what usb midi devices will work with your computer".
The most future proof for you will be a usb soundcard with midi connectors, or just a usb midi card...... because then any and all midi devices will talk to it through standard 5-pin din connectors. But if a midi device will talk to your computer then it will talk to Pd.
That was a bit long winded... the question is...... "does my computer have the drivers available........ that work!........... for the device?....."
I don't use midi much nowadays as for control I use the "new midi" called osc. Pd works well with osc and you could try it if you have a tablet. I use this app http://hexler.net/software/touchosc which apart from being very reasonably priced and being available for ios and android (sounds like an advert!) will let you draw toggles buttons sliders and XY pads and more on your tablet.
Musicians still use midi for the notes (better timing) but are increasingly using osc for control....
It is far easier to understand than midi.
David.