alsa midi in a startup message...
@nicnut Found something.....
You can change midi driver with the message to Pd [midi-setapi x (..... where x is the index of the driver in the Media Settings list (ALSA-MIDI, OSS-MIDI or whatever) starting at 0 if there is actually a choice, ((or requiring 1 if there is not...???... but then we would not be using it)).
Unfortunately this opens the Midi setup menu.
You can then re-apply the Midi settings for that driver with a [midi-dialog 0 0 0 0 1 0 0 0 1 2( message....... with the correct data of course as collected from Pd like this......... get_set_midi.pd
It will be applied even though the Midi setup window will be left open showing the previous setup (which could be the same of course).
A bit of a messy explanation I'm afraid. I don't know how to close that window, but it shouldn't matter.
So something like......
[midi-setapi 1, midi-dialog 0 0 0 0 1 0 0 0 1 2(
sent to Pd.
David.
Getting chaos-0.2 to run in Purr Data
edit: solved
Midi controller not seen by Pd, but seen by system. Rpi3. Pd .49
Hi,
First of all I want to say thank you to this forum community. I have been doing Pd for a few years, so still total newbie, but I have made a lot of progress due to the immeasurable amount of knowledge and help from this community.
I got a disk image from this thread:
https://forum.pdpatchrepo.info/topic/11626/pd-48-on-raspberry-pi-3/14
I have a Raspberry Pi 3, running Pure Data .49.
In my previous disk image Pd automatically recognized my midi controller. But in this new one Pd does not see my controller at all. I saw another post detailing my exact problem, but it was not solved. I would guess that others that must be having this problem, or that it will be coming up going forward. I'll go into detail, but this thread details a very similar issue:
https://forum.pdpatchrepo.info/topic/11485/rpi-no-midi-input-or-output-found
Also, my disk image has Jack installed on it. After spending hours trying to figure out Jack, and qjackctlm (with zero success), I thought I would just ask here. I'd rather not use Jack if possible as everything was works fine without it on my other disk image.
When I launch Pd, with my midi controller plugged in, it does not recognize it. Either in OSS-Midi or ALSA.
In the terminal, if I run: amidi -l
I see my controller MIDI/MOCA for LUFA MIDI 1
So I think everything is fine with the Pi.
If I run: pd -listdev in terminal I see my midi controller being recognized as an audio input and output device, but it says:
no midi input devices found
no midi output devices found
so it does not see my interface as a midi device
Any suggestions at all on my to get Pd to see my midi controller? I'm kind of stuck and have tried everything I can think of.
Thank you again for any input.
[midiout] to send clock messages
I was just trying to use [midiout] to send clock messages (to test a MIDI sync clock in other software).
I've already verified that Pd's ALSA MIDI project is connected to SuperCollider's input port. I can send note messages out of Pd and SuperCollider receives them. So there is no communication problem. (Linux btw.)
The only documentation says that [midiout] sends raw MIDI. So I looked up the clock messages in the MIDI spec:
11111000 = 248 = tick
11111010 = 250 = start
11111100 = 252 = stop
I'm sending these numbers to the left inlet of [midiout] and exactly nothing is happening in SC.
- MIDI communication Pd --> SC is working.
- I already set up the
MIDIIn.sysrt
function in SC.
So I have to conclude that my input to [midiout] is wrong.
However, I can't possibly figure out what the input should look like based only on the phrase "raw MIDI."
Can anyone clarify?
rPi no midi input or output found
I've been doing a bunch of experiments with PD on a Raspberry Pi, with custom-built MIDI control via a Teensy microcontroller. I've been using Raspbian lite with no GUI. This was working really well until recently.
For various reasons I updated my Raspberry Pi to the latest Raspbian (Stretch) which also allowed me to get a slightly more decent build of PD, 0.47.1.
Since doing that I can't seem to get any MIDI input in PD, no matter what startup flags I use. Most tellingly, if I run pd -nogui -listdev
I get the following list:
audio input devices:
- bcm2835 ALSA (hardware)
- bcm2835 ALSA (plug-in)
- Teensy MIDI (hardware)
- Teensy MIDI (plug-in)
audio output devices: - bcm2835 ALSA (hardware)
- bcm2835 ALSA (plug-in)
- Teensy MIDI (hardware)
- Teensy MIDI (plug-in)
API number 1
no midi input devices found
no midi output devices found
--
I find it very odd that it lists my Teensy MIDI device as an audio input and output, and also says that no midi input or output devices have been found. It is somewhat understandable that my patches will not therefore recognise any midi activity, but I don't understand why PD isn't seeing the MIDI devices.
If I run aconnect -o
I can see that the Raspberry Pi recognises the device:
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 20: 'Teensy MIDI' [type=kernel,card=1]
0 'Teensy MIDI MIDI 1'
and if I run aseqdump -p 20
the MIDI data comes streaming through normally. I'm interpreting this to mean that the MIDI device is working, and the alsamidi system is working on the rPi. My only explanation is that something has changed in PD 0.47.1 to create this bug?
I am thinking about starting from scratch and installing Raspbian Jessie instead to test and see if this works, but I'd like to avoid that if possible! Any ideas?
configure pd to listen to my midi controller from the command line (rpi)
Some more details, in case anyone else is able to jump in on this...running PD 0.47.1 on my Raspberry Pi headless on the latest raspbian stretch lite.
similar to @francis666, if I run sudo pd -nogui -listdev
I get the following list:
audio input devices:
- bcm2835 ALSA (hardware)
- bcm2835 ALSA (plug-in)
- Teensy MIDI (hardware)
- Teensy MIDI (plug-in)
audio output devices: - bcm2835 ALSA (hardware)
- bcm2835 ALSA (plug-in)
- Teensy MIDI (hardware)
- Teensy MIDI (plug-in)
API number 1
no midi input devices found
no midi output devices found
I'm hoping to use Teensy MIDI as a USB midi device. If I run aconnect
I can see the MIDI input coming in so it's definitely working, it's just not getting recognised by PD. I've tried a number of different startup flag combinations, but there's something fishy about the "no midi input devices found" message that I'm getting there. What's going on? Any ideas? I've definitely done this a number of times in the past, just using the command sudo pd -nogui -midiindev 1 midwest.pd
but that now doesn't seem to work.
The main recent change has been updating to Stretch and PD .47 from .46, is there any way that could be causing the problem?
Audio Settings for multichannel with MOTU 828 mk3
Hi Matthieu,
I see your post is a little bit old but I'm experiencing the exact same problem now with my setup.
I'm using a Windows 7 machine with a MOTU 828x sound card connected via USB to the PC and Pd 0.48.1 vanilla.
Here what I've done:
- I've checked the "Use Stereo Pairs for Windows Audio" inside the "MOTU Audio Console";
- opened PD and selected "standard MMIO" as driver from the "Media" menù;
- now here's the list of outputs as it appears from the drop-down menu of "Media/Audio Setting.../Output device":
- MOTU Analog 3-4
- Loudspeakers (devide High ...
- MOTU Main-Out 1-2
- MOTU ADAT optical A 3-4
- Digital Output MOTU Audio
- MOTU ADAT optical A 1-2
- MOTU Analog 1-2
- MOTU ADAT optical A 7-8
- MOTU ADAT optical B 3-4
- MOTU Analog 7-8
- MOTU Analog 5-6
- Digital Output
- MOTU SPDIF 1-2
- MOTU ADAT optical B 1-2
- MOTU ADAT optical A 5-6
- MOTU Phones 1-2
As you see this list is pretty messed up and the names of logical consecutive output channels are not consequential. I would like to have 8 analog outputs from my MOTU so I selected the first item on the list (MOTU analog 3-4) then specified a total of 22 channels.
I'm obliged to set 22 as the total number of output channels because in my list MOTU Analog 5-6 are the last analog elements present. Because items in the list represent pairs of channels, this item corresponds to logical channel 21 and 22.
- Then I created the dac object this way:
[dac~ 13 14 1 2 21 22 19 20]
Here's an image
This way I'm able to hear sound on all analog outputs of the MOTU even if I'm experiencing variuous 'clicks' and a series of "resyncing audio" messages inside the PD console...
I confess, this method is the only way I'm able to make this setup work but it seems to me to be pretty messy and not intuitive at all.
What seems to be even worse is that analog audio outputs inside the device list seems to change their order at each computer restart, so every time I have to restart from scratch.
- Is there some easier solution to this problem?
- Maybe a preference file I can create for PD to load at each startup containing all these settings?
- or there may be a way to programmatically select correct "analog outputs" from the device list in my patch (even if string parsing doesn't seem to be so easy in PD to me).
- Would launching PD from console, maybe from an ad-hoc script, solve the problem?
Thank you so much for your support
M
Final Solution: Anyone looking to control Ableton Live...easily
Hi All
A little bit of work to set up but forget midi mapping...google it if you dont believe me.
After a lot of time spent trying to get a simple but sophisticated way (using a minimal 8 button floorboard) to control Live on w10, I thought I would share this particular solution to possibly help others (especially after the help offered here on this forum). I tried a number of scenarios, even buying Max 4 Live, but it turns out a lot simpler than that. It needs 3 main areas set
FOOT CONTROLLER BEHAVIOURS/GESTURES
Create pd patch that gives you 'behaviours' per switch. Ill be happy to share mine but Im just cleaning them up atm.
eg I have 4 standard behaviours that dont take too much time to master
- Action A: A quick click (less than 500ms) Always the primary action
- Action B: Long click ie 1 click down and pedal up after 500ms. I use this eg always as a negative ramp down for things like lowering volume but if its just held down and released in a natural way, it is the secondary action of the switch
- Action C: 3 Click ie 1 quick down, up and then hold down. I use this for a positive ramp eg as volume up
4 Actiion D: Double click, Always a cancel
These are all mapped to note/ctrl outs that match the 'Selected Track Control' below
PLUGIN
Use PD VST to create a plugin version of your patch. This is loaded into Live as a control track. Live manages the connection of your floor board etc into the actual track so you dont wrestle with the io. I always use track 1 for click (forget Live metronome, this is much more flexible and can have feel/swing etc) so I dedicate track 2 to control.
Use LoopMIDI to create a virtual midi cable that will go from this track and be fed into the remote script.
REMOTE SCRIPT: 'Selected Track Control'
Download latest from http://stc.wiffbi.com/
Install to live and make sure your notes/control conform.
Enable this as a control surface in live and connect midi in from the plugin. Think about giving the guy a donation...massive amount of work and he deserves it!
I use it to control 8 tracks x 8 scenes and is controlled by 3 switches
- Scene control up and down (A = down, B = up)
- Track control same as scene
- Rec/Fire/Undo Volume up and down (A = fire/rec, B = Volume Down, C = Volume Up, D (Dbl Click) = Undo
The scenes and tracks wrap so there isnt too much foot tapping
There is quite a bit more to it of course...its and maybe no one else needs this but it would have saved me a couple of weeks of time so Im happy to help anyone wanting to achieve gigging without a massive floor rig and an easy way to map and remember.
HTH someone
Cheers
mark
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.