Looking for info on the -midioutdev option
@jamcultur The command line flags set the devices to use when Pd is started. They can be used in Pd preferences to fix the devices without opening the midi dialog and saving the setup after starting Pd.
Not so useful in Pd preferences as they will always be the same, they are very useful if starting Pd from a batch file in windows, as you can have different setups for different hardware setups....... e.g. in the studio or out at a venue.
I am not sure how they could be used in Linux... maybe starting Pd from a shell script.
However, the order of devices almost definitely depends on the order in which they were plugged in before starting Pd so it needs some rigour to use -midioutdev. Using -midiaddindev and -midiaddoutdev rather than -midiindev and -midioutdev might solve that... ? I don't know the syntax..... but maybe a list of the devices by name and in the correct order after the flag...?
That could be problematic because of spaces in the device names.... see below.
I see elsewhere that you have a problem having to re-start Pd when plugging in more midi devices.
I wonder whether a request could be made to the Pd-list.
In Pd-extended devices were hot-connected when plugged in, but that is no longer the case in Vanilla. The midi-dialog.tcl file is completely different in the two versions and depends on other .tcl files and probably also on the Pd binary, so midi-dialog.tcl cannot be simply replaced.
There is also a fixed limit of 9 midi devices. I think windows has a limit of 10, and the registry needs to be edited by removing an old entry before adding a new one.
There are ways to set devices from within a patch using [midisettings]........ see set_midi-order.pd.... midisettings.zip
The idea is to reset the order of devices to what is required, by sending a list to Pd (a midi-dialog list).
It will need some work, using [midisettings] (part of the mediasettings external) as the names returned by the [listdevices( message are symbols with spaces inside. Since some version of vanilla the spaces can be escaped so the complete symbol can be used in the route object.... https://forum.pdpatchrepo.info/topic/13506/list-comparison/2
Otherwise, for older vanilla you will need [concat] which is in the thread.
So get the midi device names with their order numbers, and then re-order the numbers by device name according to what you require, and then send the re-ordered numbers back to Pd in a [midi-dialog( message.
When you implement that it will no longer matter in what order you plug the devices or in what order they appear in the midi settings menu when you start Pd.
Here is a quick re-write of set_midi-order.pd escaping spaces with a backslash for midi devices on my system....... set_midi-order.pd
The same can be achieved for audio devices using the [audio-dialog( message and [audiosettings].
David.
plugdata AU forgets patch
@jameslo said:
For instance, I just learned that the Mac version of REAPER runs AUs, so I tested in REAPER and there were no issues. So to me it's a tossup whether I should report it to the QLab group or the plugdata issue list.
Reaper gives some insight, because its file format is text.
I created a Reaper project with a single track, and two effects: plugdata and ReaEQ. I saved two versions of this product, with slightly different plugdata patch contents. Then I opened both files in Emacs and did ediff-buffers on them.
The main difference is that a whole long string of binary-encoded stuff (not human readable) changed... plugdata appears as:
<VST "VST3i: plugdata (plugdata) (32ch)" plugdata.vst3 0 "" 1821045374{ABCDEF019182FAEB506C44745064496E} ""
... a ton of encoded stuff... like 560 lines of it...
>
Since the encoded stuff changed, it means that plugdata renders the patch into the VST preset data. (Good point about this is that a DAW project using plugdata doesn't have to ship with a pd patch file.)
I guess then, for whatever reason, QLab and Audacity are not handling this, while Reaper does. One plausible guess might be that QLab and Audacity have a limit on the size of a plug-in's settings. Plugdata really spits out a lot. The ReaEQ settings are fully represented in 7-8 lines; plugdata, for a minimally simple adc~ --> dac~ patch, needs over 550. It wouldn't surprise me if some audio software assumed "nobody's going to make a plug-in that big."
Hm, here's a thought -- Cardinal synth (VCV Rack fork) should also save patches into plug-in settings, which could get arbitrarily large. Maybe try that in QLab, for differential testing. If they both fail, you would have more ammunition to go back to QLab. If QLab handles a large Cardinal patch but fails on plugdata, that seems more like a plugdata bug.
Audacity is open-source, so it may be possible to find a limit in the code.
Could be something else too (maybe plugdata's settings use some data types that certain software isn't prepared for). Or it could be too many parameters. Plugdata publishes 512 free parameters, plus 128*16 MIDI CCs, plus a few other odds and ends. Pretty sure even Vital isn't that big.
(I'm also certain that someone on the QLab group is going to respond "plugWHAT?!!!"
)
Yeah, tech support finger-pointing. When I worked in tech support, I saw that a lot of questions that really should have gone to partner companies ended up coming to us, because we were the smaller kid on the playground.
hjh
GEM replaced Ofelia in Plugdata
@Aliam.Sigsaly the maintainer of pdlua is Albert Gräf. The way open source software works is that one person can use the code from other projects (provided the licenses are compatible). This is called a 'fork' and it doesn't imply that the original project is being 'taken over' or 'annexed' by the fork.
Afaik there are feature request github and discord forums/channels for plug data if you want to discuss the direction of the project (though I suppose this could also be an appropriate venue).
Imo your expectations for an announcement on arbitrary channels for a certain library version not being supported anymore are slightly unreasonable.. I would say that if you want to be informed of plug data or development about a certain version of ophelia there are places to follow in order to do so.
I also don't think it's productive to talk about how superior m4L is unless you're making specific feature suggestions for the project you want to use in a productive and collaborative way.
edit: also, a great thing about open source is that if you don't like the direction of a project you are free to make your own fork and add or remove whatever aspects you wish. The maintainers have a right to include or omit features and library for whatever reason though you are of course free to make criticisms or suggestions (though I have to say your tone did come across as somewhat entitled, rather than collaborative.. for instance you could enquire why something might not be maintained anymore before catastrophizing). But if you want a certain feature without doing the work to implement it that can come across as expecting free labor or agreement on aesthetics.
edit2: personally I disagree with alexandre's "everything in 1 lib" philosophy for else (personally I like using many different established libraries that already have equivalent objects) but he does work hard on it and those aspects have driven its adoption in plug data and many other projects. Also he probably (would have been) open to improvements for it in general if you considered them to be lacking and had made pull requests to improve it or at least given suggestions or feature requests instead of/before complaining..
How to connect a mic and guitar on Pure Data?
@blurryface
Read the instructions for loading the USB drivers for the Behringer.
They might say..... load the driver for the Behringer onto your computer before plugging it in.... or just plug it in as a driver will be found on the internet when you do that.
Plug in the Mic (Mic input 1) and Guitar (Line input 2) and set line input 2 to INST (instrument).
Connect its USB to your computer.
Turn on the 48V switch on the back if you are using a condenser microphone.
Open Pd and in the Media tab select ASIO (for a PC)........ For other OS's I don't know.... google it.... you are looking for low latency drivers or the delay will be horrible.
Then in Media / Audio Settings select the Behringer with 2 inputs and 2 outputs.
[adc~ 1] will give you the microphone and [adc~ 2] will give you guitar.
[dac~] will return your stereo mix to the Behringer outputs.
David.
How to loop/reset an audio file to the beginning
@KMETE Requoting myself: "To crossfade properly, it needs to subtract 100 ms from the file's total duration."
Let's say you have 10 seconds of audio.
You want to loop it, with a 100 ms crossfade.
If you just use "all" then it will do this:
- Start at 0 and play to 10 sec.
- Loop back to 0.
- At this point, for a cross fade, the step 2 audio fades in, and the step 1 audio fades out. But step 1 has already run out of audio.
So at that point, you don't get a cross fade. You get an immediate jump to silence (maybe with a click), and then a fade in.
It "seems to work" in that there is no error, nothing crashes, no major audio glitches. But it isn't crossfade looping.
The solution here changes it to:
- Start at 0 and play to 9.9 sec.
- Loop back to 0.
- At this point, the step 2 audio fades in, and the step 1 audio fades out over the range 9.9 - 10 sec = clean crossfade.
But if you're happy without a proper crossfade, then by all means, do what you feel is best.
At this point, with apologies, I need to withdraw from the thread. I've already spent much more time on it than I expected, and the follow-up questions are becoming a bit like... not the best use of time. Like, I'm getting ready to shoot a YouTube tutorial on Pd external sync, and instead of working on those materials, I was explaining crossfading here. I think I need to strike a better balance.
hjh
How to loop/reset an audio file to the beginning
@KMETE said:
why did you add 100 at the sf-play2~ object right after the array name au ? to start the file from the 100ms time and not from 0ms? why is that?
The sfplay2~ help patch explains:
Arguments:;
1 Table name (should match a soundfiler2 instance) - recommended to use [monofile] or [stereofile];
2 Envelope A/R time, default is 10 ms
The second argument (the 100) is the envelope attack-release time, NOT the playback start time.
In sf-varispeed2~ it's a little different -- when looping, it's the crossfade time.
I just realized, there is one mistake in both of my patches. I'm specifying a loop crossfade = 100 ms. To crossfade properly, it needs to subtract 100 ms from the file's total duration.
So, where you see "all" in those patches, substitute like this:
(In your abstraction, you have "stereofile audio$0 $1" which is fine -- but you'd need "getvalue audio$0dur" then.
Should be the same for the varispeed version too.
hjh
No sound. Failed install?
@mario60 The reality of Linux audio at the moment is that, for real-time, low-latency audio creation tools (Pure Data, SuperCollider, VCV Rack, Ardour, Bitwig, Reaper, LMMS, Renoise, Qtractor, etc etc), it is not a plug-and-play experience. If you're looking for a plug-and-play experience, you won't find it in Linux. The choice for you, then, is either to accept Linux as it is, or switch to a different OS.
The recommended way forward for these apps is to set up JACK with PulseAudio integration -- which you do once, and then keep using it for the lifetime of that system.
The assertion that "nobody is using xxx" because there isn't a plug-and-play experience is not quite correct. People are doing this work in Linux -- they're just doing it through JACK.
(Incidentally, I recently installed the latest Ubuntu Studio -- 22.04 -- on a new system. It includes a new Studio Controls app which is almost plug-and-play. There are a couple of odd behaviors, with relatively easy workarounds, but it's pretty good. So that would be another alternative for you -- use a distribution like Ubuntu Studio that preinstalls the audio ecosystem.)
hjh
No sound. Failed install?
HI,
a newbie, I am trying to install and use Pd 0.53.0 on a Fedora 35 machine.
I think I installed (from source) fine, but I do not get any sound.
I am not sure what I am supposed to check and do.
Some info on my install below.
Thanks for your help.
Below, I doubt line audio APIs: PortAudio ALSA OSS
is how it should be, but I am not sure how to fix.
pd 0.53.0 is now configured
Platform: Linux
Debug build: no
Universal build: no
Localizations: yes
Source directory: .
Installation prefix: /usr/local
Compiler: gcc
CPPFLAGS: -DNDEBUG
CFLAGS: -ffast-math -fno-finite-math-only -funroll-loops -fomit-frame-pointer -O3 -g -O2
LDFLAGS:
INCLUDES:
LIBS: -lpthread -ldl
External extension: pd_linux
External CFLAGS: -fPIC
External LDFLAGS: -Wl,--export-dynamic -fPIC
fftw: no
wish(tcl/tk): wish
audio APIs: PortAudio ALSA OSS
midi APIs: ALSA OSS
libpd: no
$ ./pd -listdev
audio input devices:
0. USB Device 0x46d:0x825 (hardware)
1. USB Device 0x46d:0x825 (plug-in)
2. HDA Intel PCH (hardware)
3. HDA Intel PCH (plug-in)
4. HDA NVidia (hardware)
5. HDA NVidia (plug-in)
6. Trust PC Headset (hardware)
7. Trust PC Headset (plug-in)
audio output devices:
0. USB Device 0x46d:0x825 (hardware)
1. USB Device 0x46d:0x825 (plug-in)
2. HDA Intel PCH (hardware)
3. HDA Intel PCH (plug-in)
4. HDA NVidia (hardware)
5. HDA NVidia (plug-in)
6. Trust PC Headset (hardware)
7. Trust PC Headset (plug-in)
API number 1
MIDI input devices:
1. ALSA MIDI device #1
MIDI output devices:
1. ALSA MIDI device #1
priority 94 scheduling failed.```
If I try to set to something different from HDA Intel, I get
ALSA input error (snd_pcm_open): Device or resource busy
ALSA output error (snd_pcm_open): No such file or directory
`
GRM plug-in called “Shuffling” for the granulation for Max in Pd?
@raynovich said:
And yeah, I kind of want to know more how it works. . .
Hm, well, let me propose an analogy. Analog synthesis is fairly standard: bandlimited waveforms, there are x number of ways to generate those, y number of filter implementations etc. But many of the oscillators and filters in, say, VCV Rack have a distinctive sound, because of the specific analog-emulation techniques and nonlinearities used per module. You can understand analog synthesis but that isn't enough to emulate a specific Rack module in Pd.
Re: Shuffling, I finally found this one sentence description: "Shuffling takes random sample fragments of variable dimensions from the last three seconds of the incoming sound and modulates its playback density and pitch" -- that's a granular delay.
A granular delay is fairly straightforward to implement in Pd: [delwrite~] is the grain source. Each grain is generated from [delread4~] where you can randomly choose the delay time, or sweep the delay time linearly to change the pitch. That will take care of "random sample fragments," "last three seconds," and "modulates... pitch" (you modulates playback density by controlling the rate at which grains are produced vs the duration of each grain -- normally I set an overlap parameter and grains-per-second, so that grain dur = overlap / grain_freq).
"... of variable dimensions" doesn't provide any useful technical detail.
But what isn't covered in the overview description of a granular delay is the precise connection between the Shuffling plug-in parameters and the audio processing. Since GRM Tools are closed-source, you would have to get hold of the plug-in and do a lot of tests (but if you have the plug-in, then just [vstplugin~] and done), or guess and you would end up with an effect that's somewhat like Shuffling, but maybe not exactly what the composer specified.
I'll send a grain-delay template a bit later, hang on.
hjh
Pd as an accessible programming environment?
Hello @JoshuaACNewman ,
Yes, there's the autocompletion plug-in:
https://github.com/HenriAugusto/completion-plugin
And there's also a pd distribution used in the CEAMMC (Centre for Electroacoustic Music Moscow Conservatory) that comes with this feature as well as a toolbar and a big external library:
https://github.com/uliss/pure-data/releases
Even though it is still in beta, I would recommend Plug Data, it has auto-completion, has a dark theme, comes included with the else library and can be used as a DAW plug-in, although it uses different shortcuts than pd vanilla:
https://github.com/timothyschoen/PlugData
Two other projects I would recommend checking out:
https://www.automatonism.com/ - A modular synthesizer in Pd (you can actually click on buttons to create the modules instead of typing them)
http://malinette.info/en/? - programming interactivity toolkit.
I'm now curious about what software you could use to build this macro keyboard, let me know