Create standalone application
pd extended offered this functionality as a built in feature from what I hear. Unfortunately, pd-extended is a bit dated and no longer maintained... that said, if your patch does not require features from the latest releases of puredata, you could build it in extended and use it's make-app function. If that won't work for you, then making a standalone app from a puredata patch is still possible, but not exactly a simple task. There are actually several ways that you could do this, all of which will likely require some knowledge of coding in other languages like C, java, python etc. If you were looking to make something for mobile devices, there are apps available that can wrap your patch to run in it's own app container type of thing in android and ios. For that, check out pddroidparty, libpd and mobmuplat. If you want to run a patch as a vst type plugin within a DAW, check out pdpulp, chamomile and the one that is i think windows only, pdvst.
If your only need to make a standalone app is to cater to people who are less computer savvy, then I would say that the amount of effort it would take to make a truly standalone app from a pd patch is probably overkill and then some. You could much more easily make a patch that functions somewhat like a standalone app, in that you click an icon and the patch opens up and runs, by creating a launch script. How you would go about doing this would depend on what OS you are using. OSX and linux both run on unix, so a bash script that launches pd and opens the patch with all the desired settings could be written, marked executable (sudo chmod +x <filename>) and assigned an icon. A script could even be made to automate the installation of puredata to go with it.
If you want to be really thorough, you could compile/build a version of puredata from source, making sure all the needed dependencies are contained within the source directory and linked accordingly, and house it in a bundled folder (something like all applications and .kext files on OSX operate,) But once again, this would have some caveats, has it's own learning curve and is generally no simple task for someone who isn't already well versed in these types of things. The easiest thing would probably be to just install pd for your clients manually or via script and make a launch script that they can just click on and have it automatically open pd and the patch of choice.
Hope that helps
Easiest way to connect a MIDI keyboard to PD-l2ORK on Ubuntu 16.04
@NoDSP Yea, you are right, actually. The a2j bridge is what enables jack patching for midi in most programs. I suppose that's an important detail that I overlooked. Once a2j is up and running, it feels like part of jack, but yea technically it is alsa. Your also right in that Ive noticed mixing internal and external patching of inputs and outputs to be problematic. I think it's some kind of permissions conflict... Like each program wants to take ownership of the patching privelages and they block eachother out. Im still looking for a way to resolve that...
@casper I was thinking a bit about it, and you might check out the jackx library of externals. There is an object in there that lets you manipulate jack patching from within PD. for instance, my sound card is a bit weird, as the main outputs read as output 3 and 4 instead of 1 and 2. When pulseaudio connects to 1 and 2 on startup, theres no sound. So each time i'd restart, I would have to manually open some patching program (I prefer carla from kxstudio,) and route everything correctly. Eventually, I made a patch that uses jack-connect from jackx to automatically route everything properly via loadbang. I made another version of it that starts, connects everything and then closes itself. I put that in my startup applications, so now every time I reboot, everything is automatically routed properly. You could make an object like that for your colleagues so when they open up pd, the midi routing is right there for them. I'll let you take a look at the patch I made to do this. (note, open pd with the -noloadbang flag or the patch will open and close all instances of pd-l2ork in 10 seconds.) also, the ports that you will be connecting will likely have different names then the ones here, so adjust them accordingly, and finally make sure the jackx externals are loaded and working properly to make this work. jackconnect.pd
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.
Pitch-shift and normalization object for Ohm-Choir/innerDialogue-exposure.
we are working on an interactive sound-installation. It is a wooden bell that opens vertically by sliding up it´s segments to make space for one person that sits down to listen to a guided meditation after the bell closes again. It´s all about the perception of one self and how it changes when one isolates from society and vision. The people will hear themselves over headphones and be instructed by a voice to make an "Ohm" and say several things that are secretly recorded and played back later in a way to expose the inner dialogue.
... using a timer*, I time-trigger recordings, playback of those, and sound-effects (reverberation, pitch-shift). In the end the participants will hear their own voice talking to them, but in two different pitches, one voice a little lower pitched talking as the inner-enemy and then a higher pitched voice commenting on this, creating a dialogue, giving the participants the chance to observe that theatre-play inside of their head.
To close the session, they will be asked to make another Ohm...and as background they will hear the recorded Ohm they made when they started plus the recorded and looped Ohms of all the participants who were under the bell before them (if possible, first one om...then the next joins and another...and then maybe fading it to three or more other Oms, before the whole choir joines the megaOm).
*! I want to modify this patch to use it´s timer, recorder and playback- features. The karaoke-text-display is not needed, cause everything will be instructed by a backgroud-voice (lostintro.wav).
To test the patch simply click on start, to open the patch right-click in the window, then open the object pd audio, where the recorders and playbk objects are hiding.
I can´t find a pitch-shift object except one in an old RjDj library called e_pitchshift.pd, but I didn´t yet managed to make it work in the patch. Any suggestions of an object that shifts the pitch by two semitones up/down? ...also I wonder how to implement this to make the workflow as easy as possible, because there will be a lot of samples. I guess it is the easiest to include it in playbk.pd, and use two different ones, one with playing back the samples with a higher pitch and one with a lower pitch. (?)
To combine and loop all recorded "ohms" into one file, i will need sth like a looper-object/patch, I am sure there are plenty out there. My biggest concern is, the different volumes of peoples voices, thats why I am wondering if there is a normalization-object?
I once found a trigger for recordings in an RjDj patch (that I can´t find anymore), that checked the db of the incoming signal and only when detecting a sound it started to record - I was wondering if I could use it to control, if people really say/sing things and if not repeat the question (or give more time to record? ...maybe substitute that even with the timer-triggered recordings?)
well, not really top priority, but I would love to make the whole patch run on a raspi. I already struggeled with the raspi for a while - who knows...maybe there is someone in Berlin who could help me to set this up during the next weeks?
I want to timetrigger a change of the reverberation of the live-signal at the beginning ...the great @whale-av helped me once to optimize this patch (lostgeneration) and deactivated the reverb (found in the down-left corner of the pd audio -object) ..unfortunately I can´t figure out how to reactivate it. Where do i have to connect the "r revtime"? right to/between the "dac~" object???
last but not least a little stupid question, but as i don´t even know the name of this "~" symbol it is hard to google. How to make the keyboardshortcut for this little ~er ? tired of having to copy paste it each time ?
Bämgreetings and thanks for any help or suggestion!
PD cleared out two patches
I've been working all day on a pair of patches, and I've been saving their contents regularly. Several minutes ago, PD crashed. When I reopened the only patch that was open when PD crashed, almost everything had been deleted, including things that were in the patch before I even opened PD today. I then opened the second patch, which was an earlier version of the one I had open when PD crashed, and that too had been almost completely cleared out. I tried opening these two patches in a text editor, and found that almost all of the data was missing--the text files had been whittled down to 1-point-something KB in size. So what I'm wondering is what happened, is there some way to recover my work, and how can I avoid this happening in the future (if PD just does this kind of thing at random, I may have to stop using it, because I can't risk losing saved files with lots of time and effort behind them)?
Reduce latency when tabplay~ right after tabwrite~
Hi, I'm pretty new to pd, and there is the thing:
I'm trying to create some dynamic looper that loops a recording over and over and having some trouble with latency/delay between tabwrite~ and tabplay~.
- I prepare the table in advance with dynamic resizing and naming so it will be ready to record when i tell it to.
- I have in the background some sort of metronome patch (for tempo) that bangs to the track patch when to start the recording (the "track" patch is ready in advance and waits to a bang to start the record), metronome still plays.
- The metronome bangs in the right time to the track patch
- I am recording with tabwrite~ the number of samples that is pre-calculated in step 1. (I am recording the beats from the metronome to hear it play back without delay)
- the tabwrite~ ends the recording when the number of samples are all full and bangs right away to tabplay~.
here is the problem. when it plays the recording it can be noticed that there is a delay between the record playback and the metronome patch that ticks. this delay stays with the same margin over the loop.
I want to know how you handle this issue? or what can be the issue?
what cam to my mind is few options:
- start playing tabplay~ before (with offset of the latency) tabwrite~ finishes (is it even possible?)
- hang (make some delay) the metronome patch with the latency offset (seems like not right thing to do)
- I read about something with buffers that must be divided by 64 samples to be precise, do you have any information about it?
I can provide my patchs but they are a little bit messy because I use them in IOS application.
thanks so much!
Polyphonic voice management using \[poly\]
@Fauveboy Whatever works for you. The more advanced approach is to put $0 to every send, receive, array, text and struct object so every patch and abstraction is always separated and will never interfere when you for example open the same patch twice. So with this approach everything is separated, because you use the $0 of each abstraction inside the abstraction, which is great.
But than how can the abstraction communicate with the main patch? The solution is to give the $0 via creation argument down to the abstraction. Than inside the abstraction you know the $0 of the abstraction and the $0 of the main patch.
For example when you have an array in the main patch which has $0 in its name, you can not access it from within the abstraction because $0 of the main patch is unknown. But you can give the $0 of the main patch as creation argument to the abstraction, so now you can access the array via $1 (if its the first argument) and everything is perfect.
Here is an example: dollar-zero.zip
Permutations, second part, can anybody get this patch to work?
@whale-av ok, so a few things, whenever I open "mix mod" there is this:error: receive~ mixer_in-$1: no matching send.
For "part timbre" there is this:throw~ voice_out$1: no matching catch
For "part voice": throw~ voice_out$1: no matching catch
and for "voice gen": throw~ voice_out0: no matching catch, I dont understand why there are several "timbre_gen" sub patches(or what are the subcurves?), other than that Im kind of understanding what i have to do to make new voices and timbres for the voices, but on the graphs when ever i need to add one, i cant change its number above the graph, I click on the graph, then properties, and there isnt a window to change the number, Ive seen the window before, but now it just doesnt appear...(this on extended), I had to open timbre-gen to change the numbers on vanilla and then re open it on extended, because on vanilla this happens in the console :
... couldn't create
... couldn't create
... couldn't create
... couldn't create
... couldn't create
here are some pictures:
Several PD-Windows --> How to bring one to the front?
I am working on a modular project, - different GUIs for different tasks, those I want to use live on stage.
Think several interfaces.
Now I want to be able to switch between them dynamically without having to use the menubar or the OS.
I already found how to open and close pd-files within a patch:
but I don't want audio-dropouts due loading a new patch.
(This I can achieve by separating the GUIs from the audio-processing and keeping this running in the background)
And the closing-thing seems to be unstable here, sometimes it works and other times pd crashes, I don't know why ...
Is there a way to switch between opened windows within pd?
Can I address the "Windows"-Menu from the inside of a patch, to bring a window to the front?
PDL2-Ork Ubuntu here.
Playing sound files based on numbers/sets of numbers?
@whale-av Hello, first I just want to say thank you very much for your help and sorry for not replying sooner, I read all the messages, I just didn't want to bother people before I had an actual issue or a question that I understood enough to know how to ask what to do next. So that's why I'm only replying now. And you're totally right, I have suffered and learned in the past day so my brain's kind of all over the place right now, I'm still struggling to get the hang of this and really understand the patches you sent me (thank you so much for taking the time to make them for me!).
To answer your questions, I will not be assessed for this part of the project, it doesn't matter much how I do it as long as it works because no one will look at the project anyway, the end result is what matters in this case. The only "limitation" is that it has to be done in Pd. Also, my version of Pd is Vanilla (I'm assuming that doesn't change your patch much since you said it'd work in that version), and actually no, there's not really a next stage to this project; all I'm supposed to do is get my sound files to play in a loop when I press Enter (after I've typed all my numbers) and to be able to stop the loop again with Enter. I probably should have mentioned that oops, does that mean I need another keyup object or would the one in the patch work for both starting and stopping the sound?
I actually had a patch of my own but it was very simple and mostly improvised based on what I managed to learn (like I said, completely new to this) and nothing like yours so it probably wouldn't have worked anyway... Is it ok if I use your patch as a starting point? If it is, I'm assuming the next step would be the abstractions. From what I understand, abstractions are used for referencing and reusing old patches in order to keep the new patch clean and not messy. I do need something like that, as I have 17 wav files ready to use. But not all 17 should be used in one loop. I actually only need 5 sound files per loop (like in your patch), but the total number of files I can choose from is 17. To be able to tell the program which file to play based on its corresponding number I probably need the select object, right? Would I need it within the calling patch or the patch being called, a.k.a. abstraction (if my thinking is right, it's probably the calling patch)? There's probably an easier way to do this than an x number of select objects but I'm just not familiar enough with the program, sorry... Also, what difference does it make if it's not 1-digit numbers, but 2-digit, 3-digit and 4-digit combinations? To be more precise, the first, second and fourth sound file should correspond to a 2-digit number, the third to a 3-digit number, and the fifth to a 4-digit number (and I can't change this unfortunately, it's part of the task).
Oh, and is there a way I can make this work on any computer, for example if I copy my files onto a flash drive? Or if I can't, would it drastically affect my main patch if I changed the sound file destinations later, once I know what computer is going to be doing all this? Would I need to change the file destinations in all the patches or would it be possible to do so automatically via abstractions, by changing them in the main patch only (probably not but eh I asked...)?
This is all probably waaay too advanced for a beginner (and I have no idea why they'd give me this task without any prior preparation.......) so I realize I might be asking for too much here, and maybe I'm getting ahead of myself, but I still hope you could give some advice on what to do from here, what's the next step, the elements I need to get this done etc. I'm not in too much hurry, I have time until the 5th of February, so it's ok if you don't have the time for me right now, I can wait a bit!
Thank you so so so much, even just sending me the first patch was such a huge help, thank you! And I hope you can guide me through this for a bit longer!