scalar knob
a scalar knob for pd with following features:
- value inlet and outlet
- set parameters on the fly:
- size
- color theme
- mouse sensitivity
- background visisbility
- value range (min, max, exponent for nonlinear course of values)
- reset value
- reset on doubleclick
- save state with patch (via connected numberbox2)
here's a simple example how to use with default settings:
and here the zip file:
t_knob.zip
this knob abstraction is based on a patch, i found here in the forum - for some reason i can't find the thread anymore.... i believe it was a patch by @Balwyn, but not 100% sure - could you confirm?
in this knob abstraction, i use a numberbox2 instead of a slider, which is not part of the abstraction itself for two reasons: the numberbox2 can be used to save the state of the knob and reinitialize by loadbang and it avoids graphical issues, if it's not incorporated within the abstraction. the numberbox2 receives parameter adjustments by the abstraction (like size, range (for mouse response), and init option). you can set the color theme, the output range (with exponent for nonlinear values), a reset value (to reset on doubleclick), the size and the mouse response. have a look at the help patch included in the zip file for further informations.
How to change startpoint of array playback?
@esaruoho said:
@bocanegra said:
@esaruoho Yup. That should do the trick.
i must still be doing something wrong. i start twisting a knob, and i hear a kind of bitcrushing effect...
if i get to 0 with the knob, then the sound is okay. if i get to 1 with the knob (0...1
[* 65536]
and then[+~]
before[wrap~]
- the sound is hyper-bitcrushed..
Leave out the multiplier on the offset. The ramp goes from 0 to 1. The wrap module wraps around 1.
But you will hear clicks and stuff changing the offset realtime regardless, unless you do the ducking whale suggests
Stomp-board my current project
@Jona I've started looking at ofelia and came up with this for a knob radial-knob.zip but that was long after I started stompboard. I have a lite version of stompboard using canvases and vslider for the knobs but it has some (a lot of) errors popping up and looks a bit odd Pd-effects - lite.zip
and here is link to some recordings using the grater effect
MobMuPlat OSC-to-MIDI Remote Control, spec. for PD, Guitarix, and Rakarrack and other guitar effects apps
It's always funny to me how working on one PD project results in fruit that might also prove useful.
Currently, working on a broader project, but this part (at least) (I think) is ready for distribution.
Background: I Really hate leaving the side of my guitar (for example to click a mouse or tweak a setting) when I am playing. So designed this mmp app so that I can attach (with funtack, ex.) my handheld to my guitar and control my settings from there or perhaps even as I play. Like so:
[Aside: the broader project also includes (on the front-side of the app) controls driven by the handheld's tilt, as well as, the adc~ pitch, env~, and distance of the pitch from a "center". But that part has to wait (though the code is all inside the mmp_osc2midi_rc.pd patch just disconnected/does not use the cpu).]
SETUP (linux is what I know, so other OSes may work just can't/haven't tested them):
JACK
Pure Data
a2jmidid - JACK MIDI daemon for ALSA MIDI (in the Ubuntu at least repos)
guitarix a/o rakarrack, or other midi-driven effects apps (such as the included set of 30 pd effects(see below))
PIECES:
The mmp_osc2midi_rc.zip (extract(android)/install(ios) to MobMuPlat directory)
The osc2midi_bridge.zip (to be run on the "pd receiver") and includes the osc2midi_bridge.pd, help file, and a set of 30 mmp-ready-(mono) effects (in the ./effs directory) that can be used if PD is to be used as the receiver. (They are standardized to include 3 inlets: left=inlet~, center=[0 $1(, [1 $1(, [2 $1( messages sent to 3 parameters on the effect, and right=[switch~] and 1 outlet~ and a demo guitarix "bank" file called "MIDITEST.gx" (which includes 2 presets/programs and set midi values (0-8) to test. Just add the file to the guitarix config "banks" folder).
Instructions:
- Start Jack;
- In Pure Data, open the osc2midi_bridge-help.pd file; toggle "listen" on; and set MEDIA to "ALSA-MIDI" (the additional pieces are just examples of receiving the midi values);
- In Jack>ALSA: Connect Read:MIDI to Write:PD & Read:PD to Write:Midi;
- From the command line execute "a2j_control start" (no quotes);
- Start (ex.) guitarix;
- In Jack>Midi connect a2j:Pure Data(capture) to (ex) gx_head_amp:midi_in_1.
Note/Alert/etc. For a machine to receive OSC messages the recipient-computer's firewall must (I believe) be turned off.
GUI:
The GUI has 3 pages that look (basically) as follows (with the subsequent 2 pages having only the 3 knobs and 3 buttons).
The buttons trigger text entry boxes which allow you to enter numbers (0-127) representing:
PGM: the number sent to (midi) [pgm]
and
(the buttons beside the knobs) the midi value, i.e [ctrl] (0-127), each knob is to be sent to (all on channel=0). (The resulting number of which are all written to the label to the left.)
For example:
Results in:
You can now to do 1 of 2 things:
Set the mmp-knobs to whatever midi values you have set in guitarix
or
Set the guitarix midi values (mousewheel click on a control) to one of the mmp preset 0-8 midi values.
WOW!!!
That took a helluva a lot of writing (and reading) but I hope you can both see the value and make use of this bit of technology.
As I said before,
I look forward to being able to fine tune my sound ALL while my hands and I are BOTH still at my guitar and not bend over, move, etc. etc. etc. to get the sound I want.
Peace, Love, and Ever-Lasting Good Cheer.
If you made it this far , Thanks for Listening.
Sincerely and Optimistically,
Scott
p.s. ask whatever you want regarding setup, how to use, points-of-clarification, etc. I am more than happy to help.
"Out of Love comes Joy"
Converting 0-127 CC Knob Into "Endless" Encoder
Whew... that's a tricky one that I myself have attempted before. There are a few ways to potentially do this, but it depends on some things... Like nodsp said, the range is an important factor as well as the behavior of how it handles jumping between maximum and minimum values... and also the knob that is being used along with how the device handles sending the values received for that knob. If it spins endlessly, but stops sending values after after the knob turns past the minimum or maximum, thats a problem. If the knob reaches the min or max, and continues to send the min or max value each time the knob is turned past the value, then i'd do an endless encoder like this... endless-encoder.pd
To make a range constraint, just throw a modulo ( [%] ) object at the output, or something like [cyclone/wrap]
If the device being input does not send values once the knob goes past the limit, it becomes a bit more complicated. Youd have to take the expr object and set it so that when it receives a 0, it outputs 1 and if it receives a 127, it outputs 126, then route that back into the device to set the value so that you will get an output from the device on the next turn of the knob. does that make sense?
New knob GUI object
Hi Pd
Here is a higher precision & functions knob GUI object [abcknob], as a replacement for [knob].
Main features (advantages over the wellknown [knob]) :
- A variable gauge startpoint, not only leftmost but also any point you can set
- Available a numerical meter at the center area of the knob
- Accurately showing knob direction when its degree is 90, 180 or 270
- Downward compatibility for [knob]; Your patch will work well if you replace [knob] with [abcknob] by any text editor
I made this object when the pd-extended was on-going.
Recently I found that the pd-extended is now outdated and the current pd-vanilla does not supply the [knob] object. So I updated my own object and would like to share it to help your patching life.
abcknob - Mac, Win and Linux binaries archive for Pd 0.47
Yoichi
1-knob tone_control~: which ramps an EQ3's hi and los in 2 different ways
1-knob tone_control~: which ramps an EQ3's hi and los in 2 different ways
abs_1knob-tone_control~-help.pd
abs_1knob-tone_control~.pd
I figured out the math for this the other day, so thought to package it now and share it.
It uses [knob] so of course any control sending in the right inlet 0-1 will do.
What it does is with the knob less than 0.5 the lo and hi ramp up together to about 0.67 with the differential being made up in the total gain.
Yet, above 0.5 it then changes them in opposite directions via x and [- 1][abs] so the ramp is in different directions yet also covers 0-1 for both hi and lo.
Perhaps, one of you may find it useful.
It's helping me out to consolidate my controls on my arduino guitar app by minizing how many sends I need to send.
To try it just turn the knobs and you'll see what I mean because the sliders will change accordingly {Note: the sliders are only for visuals and do not send anything. And the EQ3 is from the DIY2 library.}
Ciao for now.
Happy PD-ing.
-Scott
Dynamic Effect/Plugin Loader esp. For Rapsberry PI (DIY2 and Stamp Album effects/plugins)
Dynamic Effect Plugin Loader esp. For Rapsberry PI (DIY2 and Stamp Album effects/plugins)
DynamicEffectPluginLoaderForPI.zip
Background:
In the last couple of days I finally built something I have needed and wanted for a while (which later on I will discuss in more detail under a separate thread): an Arduino electric guitar.
In other words, I took the connections off the 5-way and knobs (internally connected to the pickups and line out) and rerouted the switch and knobs to an arduino. The reasoning being I can control Way more with pd and those knobs than what they were originally intended to do if I capture their output using Arduino.
However, the patch I had built for it was clocking in at about 275-300% of the pi's cpu. And while I could have gone back and added switches (which I took out a while back, to replace with fade-mixers for when I change an effect) throughout, the thought of doing that was more daunting than (considering how elaborate the patch is) I wanted to undertake.
Enter: Dynamic Patching.
I found that with just 3 straight-chained effects the pi ran at only about 10%.
So...here's what I built and am sharing now (before tying it into the arduino guitar, because I think others might want to go ahead and learn from it, extend it, expand upon it, use it, etc. etc.).
The patch(es, there are two, one laid out for the DIY2 plugins and one laid out for the Stamp Album ones, will probably consolidate them later, but other things are demanding my attention) is pretty straight forward:
(Dependency on the tof/menubutton, tof can be found via deken)
Click on the menus at the top to select an effect for each of the 5 slots or select the "unchanged" effect to leave that slot open.
Then click the BUILD bang or the CLEAR bang (to start over).
The selected effects will load into the PALLETTE subpatch already connected to adc~ and dac~.
That's really about all there is to it. Very straight-forward, clean, and very cpu light-weight. The racks of all 5 slots I tested ran at about 10-12% on my PI 3r2.
Hope you can make use of it. And would love to hear feedback.
For the future:
Add a hid-stomp controller to load preset racks (which you can send in via the tof/menubotton) to load racks on the fly;
Add a meta-level to send either hid, osc, or arduino commands to each of the loaded effects.
Merry Music to us, one and all.
Peace,
Scott
p.s. Oh! The arduino guitar: though it has no connected pickups it gets its audio signal from an (about) 1" piezo mic fun-tacked to the knob-well inside the guitar. Sounds great. Just pure guitar. The tone, texture, etc. come after the fact via the pd-side.
Ciao for now.
Wanna say: the real genius lies not in what I cobbled together, but the strength of will and purpose it took for the two original developers to make abstractions so completely consistent and thoroughly aligned. My highest regards to you both. Thank you, both, so very much, for helping to make my "job" so easy.
No mouse external - some success
here is a bit of an update of the knob widget, which is not yet a fully working widget, but does input and output 0-100 so could be used in a sub-patch with messages as properties and math for range. Its not the prettiest circle but colour and thickness help.
gridknob-wip.pd
g-knob-help.pd
Then getting even more sidetracked I realised concentric circles of polygons offered the same mouse events as the grid and in fact would only need as many as the radius/10 would require. But pushing the limits I offer this. Warning it does get quite loud, and has visual hints of Daleks
radiant-knob.pd
radiant-knob-dance.pd
Andúril (MobMuPlat app): fwd/bwd looper + 14 effects + elven cloak (control parameters via env~ and pitch as you play)
Andúril (MobMuPlat app): fwd/bwd looper + 14 effects + elven cloak (control parameters via env~ and pitch as you play)
UPDATED VERSION (corrected MobMuPlat system crash problem):
anduril.zip
This has been long in coming and I am very glad to finally release it (even tho my handheld hardware is not up to the job of running the elven cloak feature).
First a demo video and some screenshots, , and then the instructions.
DEMO VIDEO
SCREENSHOTS
Intention(s):
The app is designed to give (specifically a guitarist) tho really any input (even prerecorded as is the case in the demo (from: "Laura DeNardis Performing Pachabels Canon" from https://archive.org/details/LauraDenardisPerformingPachabelsCanon, specifically the wave file at: https://archive.org/download/LauraDenardisPerformingPachabelsCanon/PachabelsCanon.wav, Attribution-Noncommercial-Share Alike 3.0) FULL Control over the "voice" of their output-sound.
It includes:
a 5-band EQ (on page 2 of the app) (upfront that is applied to all incoming sounds);
a looper: with record, forward, backward, speed, and bypass controls (that runs via a throw along with the effects channel)
14 effects each with 3 controllable parameters (via the xy-slider+centered knob) including: chorus, distortion, delay, reverb, flanger, tremolo, vibrato, vcf, pitchshifter, pitchdelay, 12string, stepvibrato, pushdelay (delayfb driven by magnitude of the env~), and stagdelay (2 out-of-sync delay lines which can be driven in and out of phase by the sum of their delwrite+vd's so what goes in first may come out last)
elven_cloak: which drives the 3 parameter controls via the peak bands amplitude and proximity to a set pitch (midi note) and whose window can be broadened or shrunk and shifted within that window, i.e. the three effect parameters are changed automatically according to what and how you play
and
a tester synth: that randomly sends midi pitches between 20-108, velocities between 20-127, and durations between 250-500ms.
CONTROLS (from top-left to bottom-right):
PAGE 1:
Effect: effects menu where the you choose an effect;
>>>,<<<: page navigation buttons;
IN,OUT: gains (IN is the preamp on the EQ5, and OUT is applied to total output);
REC,FWD,BWD,speed,normspd: the looper toggles and on speed, higher is faster and mid normal and normspd resets to mid;
xy-slider+centered knob: the 3 parameter controls + their labels (the bottom is x, top y and above the knob for the third one), the name of the selected effect and its parameters load each time you choose from the Effects menu, bottom left is lowest, top-right highest;
ByLp,ByEff: bypasses for the looper and effects "channel" (the outputs are summed);
EC-on: elven cloak toggle (default=off);
PAGE 2:
the EQ5 controls;
synthtest: off|on, default is off;
PAGE 3: elven cloak controls
reset: sets shift, metro, mid, and radius to 0, 500(ms),64,100% respectively (i.e. the entire midispectrum, 0-127) respectively;
mini-xyz, test: if test is on, you see a miniature representation of the xyz controls on the first page, so you can calibrate the cloak to your desired values;
shift: throws the center of the range to either the left or right(+/-1);
metro: how frequently in milliseconds to take env~ readings;
mid: the center in midipitch, i.e. 0-127, of the "watched" bands
radius(%): the width of the total bands to watch as a percentage of whichever is lower 1-mid or mid
END CONTROLS
Basic Logic:
There are 4 modes according to the bypass state of the looper and effects.
A throw catch and gain/sum/divide is applied accordingly.
End:
As I mentioned at the first, my handheld(s) are not good enough to let me use this but it runs great on my laptop.
So...
I would love to hear if this Does or Does Not work for others and even better any output others might make using it. I am enormously curious to hear what is "possible" with it.
Presets have not (yet been included as I see it, esp. with the cloak as a tool to be used for improv and less set work. Tho I think it will work nicely for that too if you just turn the cloak off.
hmmm, hmmm,...
I think that's about it.
Let me know if you need any help, suggestions, ideas, explanations, etc. etc. etc. regarding the tool. I would be more than happy to share what I learned.
Peace, Love, and Ever-Lasting Music.
Sincerely,
Scott
p.s. please let me know if I did not handle the "attribution" part of "Laura DeNardis Performing Pachabels Canon" License correctly and I will correct it immediately.
Ciao, for now. Happy PD-ing!