Audio Ideas (AI) Collection (placeholder, currently only links)-effects, controllers, mmp, etc.
Audio Ideas (AI) Collection (placeholder) currently only links
per @LiamG 's kind suggestion I have begun the process of consolidating my abs and patches, etc. into a single location/zip file or for possible upload to github.
Just to get the ball/me rolling and scope the work I got the links for my shares into a single location to later be consolidated into the single AI Collection.
For now at least, please, bare with me (and the links below) as ideas I am more passionate about currently are demanding my attention. (Which funnily enough will probably also be included in the set, where ever they are shared.)
Thanks, for your patience and all you do for the Pure Data Family.
Maximo (Guitar Rack) - 6 slots with 1 of 60 effects per slot (using "abs_effects_router" + an OSC controller (MobMuPlat)
Maximo (Guitar Rack) - 6 slots with 1 of 60 effects per slot (using "abs_effects_router" + an OSC controller (MobMuPlat)
The app is "maximo-help.pd".
maximo is an effects-chain giving the user 6 slots each one of which may be used to select from 1 of 60 effects (the first being "unchanged").
Check her for details about how to use the "abs_effects_router", http://forum.pdpatchrepo.info/topic/10693/abs_effects_router-60-effects-in-one-abstraction-router-from-diy2-stamp-album-my-abs/1 .
It also includes
- a "maximo/admin.pd" abstraction to control:
dsp, bypass (all), reset (to set all effects to "unchanged"), and 9 presets (0 reserved for program usage) and both save-to-file and load-from-file preset buttons
- an Open Sound Control (OSC) mapper ("maximo/osc_control.pd") for sending values (0 thru 1) to controls /cc/1 thru /cc/34 (see the patch for details).
- an example OSC (MobMuPlat) controller at "./maximo-osc.mmp" and "./maximo-osc-mmp.pd"
All of this was contingent on the foundation and resources laid out in the DIY2 and Stamp Album collections and actually this was largely an example of persistence not any real insight and the largest percentage of the success goes to their creators for being so diligent about standardizing their abstractions.
I DO however hope you find it useful.
My GOAL was to eliminate what is often the case with effect stacks (I have seen) of having to connect all the effects. This eliminates that and makes it much cleaner: only having to select from the (tof/pmenu POPUP_LIST button) or navigate to the desired effect with the standard "first, previous, next, last" controls.
I hope you find the work useful and capable of helping you to manifest all those wonderful sounds you have in your head.
Peace and only Love,
The List of Effects per slot is:
abs_effects_router (60 effects in one abstraction router) (from DIY2, Stamp Album, my abs)
to as simply and cleanly as possble allow for the selection of an effect from a large-ish set of effects (currently it contains 60 effects (from the DIY2, Stamp Album, and my own collections (in that order on the lists))).
There are four creation arguments which identically align with the four messages you can send to the right inlet.
Left inlet is audio signal
Left outlet is audio signal
Middle outlet is effect-name
Right outlet is effect-index (0-indexed).
The four messages/arguments are
$1: index (0-59);
$2: bypass (0-no bypass, 1-bypassed);
$3: param (as a 2 float list, (0-7(int), 0-1 (float)) to set the value for the chosen parameter for the chosen effect;
$4: command either first, previous, next, or last (0, 1, 2, 3) which actually only trigger those identical buttons on the interface.
Optionally effects may be chosen from the POPUP_LIST button(as a pmenu) if you have the "tof" external library loaded which can be found in Deken.
All of the effects abs are actually loaded when it starts. However each has a [switch~] which is only activated if that index is selected.
They are all housed in "res/abs_PATCHES~_sv.pd" and what is visible is achieved by moving the namedwindow over (a Very carefully) aligned and standardized subwindow for each effect.
The main issue was really standardizing everything, aka. grunt work. Which at the time I desparately needed as my main patch had become sooo abstract it was starting to effect my contentment level ).
I am currently (and have been) buiding a more complex example of this abs in practice as a 4 stack with RaspPi+Arduino controller (along with HID-keyboard, MIDI, and OSC) to be used as a "Meta" guitar pedal.
However I currently am not yet ready to release that work.
Wanna give a special thanks, to @whale-av for putting me onto the idea about namedwindows which is actually the backbone of this work.
Peace. Let me know if you need anything or have questions and I will do the best I can to answer them.
p.s. as I foresee it, what this abs should mean is users can readily drop in not only a single effect abs, but 60 abs all at once, which they can then choose and cross-relate/stack to their hearts content.
p.s.s. I am aware of yet could not resolve the r~/vector size errors which are carry overs from the sympathetic string patch. I have read they do not impact anything, but would like to resolve them if someone can see how. Thanks, in advance.
Thanks, again, everyone who added ideas and moral support.
As I just told my brother the other day: One of the reasons pure data users are so kind is they GET that all mathematics can be mapped on to audio.
I'm not sure what onepole~ is so I didn't look @ the patch too much, but I believe a doppler effect could be achieved simply by calculating the distance of the sound source from the listening location and then putting the amount of time that it would take sound to travel that far into vd~. So, if sound travels 343 m/s on average and your sound source is 343 meters away you would put 1 second into vd~ and update vd~ with line~ whenever the sound source's position changes. That should create a pitch shift effect automatically
However the situation becomes more complicated with multiple sound sources as you'll need multiple delay lines. At that point memory usage would be something to consider, and perhaps the possibility of using a single delay line for all sound sources
Opening a PD patch as a subpatch using [openpanel]
@reverbanime Ok.... I think I understand.
What you are missing is an identifier for each effect loader...... a number (0 - n) (or 1 - n) that keeps them unique, and that can be passed to the effect that is opened by each loader so that messages can be passed (using that unique identifier) to and from the effect and the loader (that contains the effect).
Because the effects are abstractions $0 will not work.
The effect can be given it's identifier here.......
It needs to be initiated at the creation of the loader, so it would be good if it were $1.
I have built you a system that will work, using an extra blank abstraction "[rack]" to hold the effects.
The effects inherit $1 from each [effectloader] so that the audio is kept separate.
You will need to check your parameter saving as I have stolen $1 for the new numbering system.
Please BACK UP your current folder before playing with this!
Hmm..... I can never leave it alone......
The delete (old effect) is not working as I expected. I think the effects in the rack will need "place-holders" (sub-patches) so that a [clear( message can be sent instead of using [iemguts/canvasdelete]
Otherwise it is not possible to keep track of the order in which effects are created...........
I will post a new version of the test soon.
sampling rate impacting sound
I'm on Linux and using JACK too and changing the settings SHOULDN'T haven't an effect on audible frequency, particularly with the oscillators. In fact, it seems like Pd ignores any sample rate I try to set and just takes JACK's sample rate (but perhaps this is changeable with command line parameters). Anyways, I'm not hearing any difference in audible frequency from my own tests, as should be the case.
Anyways, [osc~] uses a lookup table for the sinusoid, meaning there's a cosine wave that's precalculated in Pd's guts and [osc~] searches for the value of cosine it needs with this table (with some interpolation as needed if it wants something in between stored values). A higher sampling rate just means that [osc~] looks up values more often, 48k times a second versus 44.1k times a second. [osc~ 440] in 44.1k and 48k is still going to be 440 Hz, no matter what the sampling rate. Now if you try to play a sound file encoded at 44.1k at 48k, well, that's going to sound different because it's not meant to be read through that fast so everything is going to sound higher-pitched than normal. It's exactly like playing a 33 1/3 RPM at 45 RPM.
You don't really need to worry about different sample rates when using stuff like [osc~] or even [readsf~] at least in terms of audible frequencies, Pd takes care of that. Now when you're indexing into an array with [tabread4~] to play sounds, well, then you need to take sample rates into consideration.
Noob Trying to Create a MIDI Chorder/Harmonizer
Yet more progress!
But still stuck on sending noteoff messages to a note after its number has changed. Maybe there’s something to do with a cold inlet, working as memory? Wait! Might have found part of the solution…
Followed the first two parts on the synth creation tutorial on Libre Music Production,
(The third and last part of the LMP tutorial has to do with filters and UI, so it shouldn’t have an answer to my noteoff issue.)
Through that tutorial, was able to make a simple polyphonic synth which takes MIDI in and outputs ADSR-enveloped notes to the DAC. So far, so good.
Added a fifth to the mix. Still works. No stuck note.
Then tried adding a third note which progressively goes up with a counter… Boom, noteoff problem again. It does make some sense: need to trigger a velocity of zero to the previous note, But this is where memory would come in handy.
Found part of a solution in using the right inlet of a [
Now, the synth produces the correct effect, even with multiple incoming notes.
In fact, doing this with [
poly] may bring us closer to the original effect created by Robby Kilgore on the Oberheim Xpander! Adding more polyphony than the notes which are produced internally, getting a rotation of notes… and a comeback of the noteoff problem.
So, getting closer, but my learning path is still winding around. Will search for known solutions, as it’s surely a common problem. Don’t necessarily want to go all the way to a minimal sequencer with [
tabwrite] and [
tabread], but it could be a solution and would have the added advantage of leaving a trace on which notes have been generated.
Will get it eventually!
Noob Trying to Create a MIDI Chorder/Harmonizer
Newbie alert! Been interested in Pd for quite a while, though long after hearing a lot about Max in college (ca. 1990). But my attempts to do anything in it were thwarted by many factors, including the lack of a clear plan. As is often the case, the most appropriate approach to learning a new language is to find a use for it.
Now got what sounds to me like the ideal project: should be simple enough but it teaches me important lessons about Pure data.
Been trying to create a basic chorder/harmonizer taking input from a MIDI keyboard or wind controller and outputting multiple notes to an external synth connected via MIDI as well. Later on, this project might end up with Pd-synthesized sounds, but my first need is for a simple tool which generates different chords based on incoming MIDI notes.
More specifically, the idea is to create something like the “Michael Brecker Effect”, based on something the sax player would do with his Akai EWI and Oberheim Xpander. Brecker would play melodic lines on his (monophonic) EWI and the Xpander would generate random chords under that. There are tools out there which do this but it’s probably best for me to create my own. Been using a tool which does something a bit different (using the incoming MIDI notes as chord roots instead of top notes) and it’s just too much fun. Creating my own chorder/harmonizer would allow me to appropriate the whole thing to my own context.
My sense is that much of this is really trivial, by Pd standards. Even surprised not to readily find multiple examples of just this thing. Maybe my search skills are off. But my understanding of Pure data is so fragmentary that it quickly gets me stuck.
Here’s where things stand at this point. Can easily generate a given chord type (say, a major chord) under any incoming note. Offset the [notein] MIDI note number by a certain amount does create an interval, obviously. And sending multiple numbers to [noteout] actually works. Quite neat. It even deals correctly with note off messages, which was somewhat surprising to me. So far, so good. Can play major chords on any note, which is already a fun effect for a monodic instrument (but something which is already possible for me to easily do).
Where things get really tricky really quickly is in generating different chord types for each incoming note. For instance, in a C major context, would like an incoming C or G to produce major chords, but an incoming D or E should produce minor chords. A non-scale incoming note could work as a passing tone (not producing a chord). Basically, each of the 12 notes in the 12TET octave would trigger a different set of notes.
Therein lies the rub. Triggering different events based on different notes is easy enough with [mod] and [select]. But, for some unobvious-to-me reason, sending those “mixed messages” breaks the whole thing. This is when note off messages stop being interpreted correctly (so: stuck notes). It’s also been impossible to produce passing tones (an offset of 0 for each voice doesn’t appear to have an effect).
It’s fairly clear to me that there’s a basic misunderstanding on my part. About many things. Like which inlet produces which results and how/when messages are interpreted. To my surprise, it sounds like Pd objects have memory, which is reset by closing the patch and opening it again.
Lots to learn!
At any rate, here’s my current attempt at making a chorder/harmonizer patch. Tried many different things leading to different problems. This version gives me stuck notes. Which is what got me stuck.
Any help would be greatly appreciated!
Playing sound files based on numbers/sets of numbers?
@whale-av Hello again, thank you very much for replying so quickly!
Ok so, the computer will always be a PC and will always have Pd installed so that makes things a lot easier I suppose (not sure what version it will be though, but since all those computers have only recently been equipped with Pd I'm assuming it's either vanilla or extended so it should be ok).
I just put my 17 sound files in the same folder and named them 1.wav ...... 17.wav. They are in the same folder as your patch now too.
Well, the numbers are not exactly "set", in fact, each sound file corresponds to a certain range of numbers. Ugh, I did it again, forgot to mention the range... Sorry..... I'd probably need a different object for a range... It's still kinda difficult for me to think in "computer" language about things related to music so that's why I'm forgetting to mention tons of stuff, but I'll try to fix that in this reply, sorry again!
I will just post the table to make it easier for you to understand.
But first, I would just like to explain how the table works. First I need to ask if it's possible to attribute the same numbers/range to different sound files, depending on the number's "place" within the combination? (You'll understand once you see the table.) Maybe it isn't and in that case I should think of a way to change the table according to what can be done?
So, there should be 13 numbers in total within the combination (13 numbers to type, like 13 empty slots waiting to be filled with numbers), but I said there are five sub-combinations. The first, second and fourth are 2 digit numbers, the third is a 3 digit number and the fifth is a 4 digit number. Obviously, three of these are 2 digit numbers, but the thing is I can't really choose the ranges (I have a set range for each sub-combination and can only try to figure out the easiest way to work with them) and the ranges are actually intertwined, So some numbers can be repeated, that's why I'm asking if the same numbers can be attributed to different sound files based on whether it's the first, second or fourth sub-combination. If that's too complicated or even impossible, I can only think of sacrificing a couple of sound files and just let the program play the same file twice instead.
Also important: is it possible to "condition" to program into playing a sound file based on the first combination, the first 2 digit number? Simply put through simple chords, say in the first combination you can type either 01 or 02, where 01 is A major and 02 is B major. Next, you can type in either 02 or 03, where 03 is E major (irrelevant right now), but 02 can be either D major or F sharp major (not A major like in the first combination), based on what the previous number was. If it was 01 (A major), then this time 02 will be D major, but if the first number was 02 (B major) then the 02 in the second combination should be F sharp major. IS something like this even possible, or do I need to figure out a way to go around this and alter my table? I CAN alter the table, but I can't work with the ranges of the combinations, or the number of the combinations, it must be 5.
Lastly, can different numbers be attributed to the same sound file based on their position within the combination?
Ok so finally here's the table, and I will just give you my current table so you can tell me if it's possible to do. I understand if it's too complicated and I need to change it! Maybe you can give me some tips on how to change it to make it the easiest to do in Pd.
01-19 - 1.wav
20-22 - 2.wav
23-31 - 3.wav
01-03 - 4.wav (if the first was 01-19 or 20-22; or shorter, 01-22)
01-03 - 5.wav (if the first was 23-31)
04-06 - 6.wav
07-09 - 7.wav (if the first was 01-19)
07-09 - 8.wav (if the first was 20-31)
10-12 - 9.wav (if the first was 01-19)
10-12 - 10.wav (if the first was 20-22)
10-22 - 11.wav (if the first was 23-31)
900-975 - 4.wav (if the first was 01-19)
900-975 - 2.wav (if the first was 20-22)
900-975 - 12.wav (if the first was 23-31)
976-999 and 000-020 - 1.wav (if the first was 10-22)
976-999 and 000-020 - 13.wav (if the first was 23-31)
01-09 - 7.wav (if the first was 01-19)
01-09 - 8.wav (if the first was 20-31)
10-69 - 14.wav (if the first was 01-19)
10-69 - 3.wav (if the first was 20-31)
70-99 - 6.wav (if the first was 01-22)
70-99 - 11.wav (if the first was 23-31)
(this one is arbitrary so no matter what the last 4 numbers are, the sound file that is triggered should be based on the first combination, or something like that, so...)
xxxx - 15.wav (if the first was 01-19)
xxxx - 16.wav (if the first was 20-22)
xxxx - 17.wav (if the first was 23-31)
Now, I need to thank you if you had the patience to actually read all that and think about it..... I can only hope you could understand the idea, but please, if this is just too complicated, do tell me to change the table. Maybe, if you can or think I will understand, try to explain how the ranges work when playing sound files and how I can use that to my advantage to still keep all the sound files (or as many as possible) but make the thing easier to program.
Now I know I had a few more questions but I can't remember right now and I don't want to bombard you with everything all at once, I realize even this is way more than I could have asked for, you have been a huge help, really! Even if I don't entirely understand every single element of your patches, I did study them and used the help option like you advised me to, so I really am trying to get the hang of this. I completely understand if you just want to take a break from this if it's too complicated and time-consuming, I just ask that you give me some kind of feedback so I know what to expect!
Anyway, thank you for all your help and guidance until now, and for the guidance you'll provide in the future if you so choose!
Idea for Effects Stack(ing) Technique/Control ("Mother")
To begin, I apologize in advance for this Not being a complete abstraction, so please forgive me for that.
As apology, I offer my humility: 10 hours-straight work later, I know some of what i thought of is beyond my knowledge limit and capacity to continue working on.
That all being said,...
My idea (which I thought would be Very simple, yet learned that PD, no matter how sweet She is, does not behave like the linux shell) was simple:
Make a rack of a set of vradios (i chose 8 due to the cpu limit on my laptop, but more could easily be added) which each denote a set of effects;
Send the results to a shell control along with the "slot" in the stack;
Have it copy that effect into an eff(ects)/tmp folder (mapping over the dummy files that were there),
so when the adc~ > eff1 > eff2, etc., chain runs they would be loaded as copies of the desired effects abstractions.
My intention was to empower the usage of multiple instances of the same effects abstractions as well as cut the wiring required in many/my pedal rack/s I have seen to almost nil.
That Was accomplished.
And I DO like the "idea".
On the other hand, I learned, to my chagrin, 2 VERY important lessons:
- pd loads all subpatches on startup
- there is no (this is were I bow to higher minds than myself) way to "refresh" the patch, shy of closing and reopening it (because while you can do this sort of thing in linux, you can not in pd "underwrite" a subpatch and presume it will know the change has been made).
I Did pursue trying to load via "cat" the effect file-contents into a pd (sub)patch object, but could not figure out how to make that work, even with subtracting the file accouterments, i.e.#X, #N.
In closing I will say that the goal, though only partially achieved, IS one worth pursuing if it is a domain you are more knowledgeable about than myself.
I have attached a zip of my work.
a shell script to start extended (it must be started this way, if the shell object is to know where the resource folder is located;
a folder, "res", which includes: /effs (where you put your effects abstractions), /effs_tmp (with 8 dummy files, where your effs get copied to), and /helper (where Mother is located)
a Mother_effsmap.txt file, where you list your effects, by filename (including the ".pd" extension", which it cross-references the vradio index to the line number on the file to know which file to copy.
I have found that it does copy correctly, but then you are left with the stack of controls to contend with. But I have yet to figure that out and think it better to go ahead and share it.
-peace, thanks for listening, and I hope it gives you some new ideas to work with.