Spaghettis: Yet another fork of Pure Data
@Nicolas-Danet said:
QWERTY keyboard! Does it works if you add following code?
event add <<NewObject>> <$mod-Key-1> event add <<NewMessage>> <$mod-Key-2> event add <<NewAtom>> <$mod-Key-3> event add <<NewSymbol>> <$mod-Key-4> event add <<NewComment>> <$mod-Key-5> event add <<NewBang>> <$mod-Key-6> event add <<NewToggle>> <$mod-Key-7> event add <<NewDial>> <$mod-Key-8> event add <<NewArray>> <$mod-Key-9>
There < https://github.com/Spaghettis/Spaghettis/blob/master/tcl/ui_bind.tcl#L106 >.
Yes, that worked.
Spaghettis: Yet another fork of Pure Data
QWERTY keyboard! Does it works if you add following code?
event add <<NewObject>> <$mod-Key-1>
event add <<NewMessage>> <$mod-Key-2>
event add <<NewAtom>> <$mod-Key-3>
event add <<NewSymbol>> <$mod-Key-4>
event add <<NewComment>> <$mod-Key-5>
event add <<NewBang>> <$mod-Key-6>
event add <<NewToggle>> <$mod-Key-7>
event add <<NewDial>> <$mod-Key-8>
event add <<NewArray>> <$mod-Key-9>
First bootup problems
Hey guys,
A quick search on the forums did not reveal a straightforward answer for how to deal with my bootup problem. I'm a big noob, with no programming experience, and I'm trying to get Purr Data to bootup on my busted old Linux Mint laptop. I'm using pd 2.8.1, and Mint 18. I have JACK on my computer, but I'm pretty sure everything is running through ALSA. Anyway, first bootup of PD looked like this:
Welcome to Purr Data
warning: your system's font stack is not optimal
Pd has started the GUI
canvasinfo: v0.1
stable canvasinfo methods: args dir dirty editmode vis
pdinfo: v.0.1
stable pdinfo methods: dir dsp version
classinfo: v.0.1
stable classinfo methods: size
objectinfo: v.0.1
stable objectinfo methods: class
[import] $Revision: 1.2 $
[import] is still in development, the interface could change!
compiled against Pd-l2ork version 2.8.1 (20190207-rev.e216f5a)
PD_FLOATSIZE = 32 bits
sys_nmidiin 1, nmidiindev 0
working directory is /home/jjwitte
Opened Alsa Client 128 in:1 out:1
libdir loader 1.10
compiled on Feb 7 2019 at 19:29:50
compiled against Pd version 0.48.0.
GEM: Graphics Environment for Multimedia
verbose( -1):GEM: ver: 0.93.git 438dab3
verbose( -1):GEM: compiled: Feb 7 2019
verbose( -1):GEM: maintained by IOhannes m zmoelnig
verbose( -1):GEM: Authors : Mark Danks (original version)
verbose( -1):GEM: Chris Clepper
verbose( -1):GEM: Cyrille Henry
verbose( -1):GEM: IOhannes m zmoelnig
verbose( -1):GEM: with help by Guenter Geiger, Daniel Heckenberg, James Tittle, Hans-Christoph Steiner, et al.
verbose( -1):GEM: found a bug? miss a feature? please report it:
verbose( -1):GEM: homepage http://gem.iem.at/
verbose( -1):GEM: bug-tracker http://sourceforge.net/projects/pd-gem/
verbose( -1):GEM: mailing-list http://lists.puredata.info/listinfo/gem-dev/
verbose( -1):GEM: compiled for MMX/SSE2 architecture
verbose( -1):GEM: using SSE2 optimization
verbose( -1):GEM: detected 4 CPUs
GEM: image loading support: magick SGI jpeg tiff
GEM: image saving support: jpeg magick tiff
libdir_loader: added 'cyclone' to the global objectclass path
libdir_loader: added 'zexy' to the global objectclass path
libdir_loader: added 'creb' to the global objectclass path
libdir_loader: added 'cxc' to the global objectclass path
libdir_loader: added 'iemlib' to the global objectclass path
libdir_loader: added 'mapping' to the global objectclass path
libdir_loader: added 'markex' to the global objectclass path
libdir_loader: added 'maxlib' to the global objectclass path
libdir_loader: added 'memento' to the global objectclass path
libdir_loader: added 'mjlib' to the global objectclass path
libdir_loader: added 'motex' to the global objectclass path
libdir_loader: added 'oscx' to the global objectclass path
libdir_loader: added 'pddp' to the global objectclass path
libdir_loader: added 'pdogg' to the global objectclass path
libdir_loader: added 'pixeltango' to the global objectclass path
libdir_loader: added 'rradical' to the global objectclass path
libdir_loader: added 'sigpack' to the global objectclass path
libdir_loader: added 'smlib' to the global objectclass path
libdir_loader: added 'unauthorized' to the global objectclass path
vbap - v1.1 - 14 Aug. 2014 - (c) Ville Pulkki 1999-2006 (Pd port by HCS)
libdir_loader: added 'pan' to the global objectclass path
freeverb~ v1.2
libdir_loader: added 'hcs' to the global objectclass path
libdir_loader: added 'jmmmp' to the global objectclass path
libdir_loader: added 'ext13' to the global objectclass path
libdir_loader: added 'ggee' to the global objectclass path
libdir_loader: added 'ekext' to the global objectclass path
libdir_loader: added 'disis' to the global objectclass path
libdir_loader: added 'lyonpotpourri' to the global objectclass path
pdlua 0.9 (GPL) 2014-2018 Martin Peach et al., based on
lua 0.6~svn (GPL) 2008 Claude Heiland-Allen claude@mathr.co.uk
pdlua: compiled for pd-0.48 on Feb 7 2019 19:31:25
Using lua version 5.3
pdlua: using JavaScript interface (Pd-l2ork nw.js version)
[14] error: audio I/O dropout
So, I get the impression that these audio I/O dropout issues happen quite a bit. But does anyone have any ideas for what I can try next? Also, I apologize if this is the wrong forum this question. If someone could just point me in the right direction, that would be awesome.
warning: D: multiply defined
warning: D: multiply defined
warning: D: multiply defined
warning: C: multiply defined
warning: C: multiply defined
warning: B: multiply defined
warning: B: multiply defined
warning: A: multiply defined
warning: A: multiply defined
warning: D: multiply defined
warning: D: multiply defined
warning: C: multiply defined
warning: C: multiply defined
warning: B: multiply defined
warning: B: multiply defined
warning: A: multiply defined
warning: A: multiply defined
I was not troubled by this so far operating the patch of this, but still wondering what this is? Can this be resolved? Could this be causing a problem in the future?
[small job offer] porting max external to pd
Edit 1: Took a shot porting it in this little textarea. Probably doesn't compile yet...
Edit 2: Ok, this should compile now. I haven't actually tried to instantiate it yet, though. It's possible I set it up with the wrong number of xlets.
Edit 3: Seems to instantiate ok. It appears it doesn't take signal input so the CLASS_MAINSIGNALIN macro is neccessary. Just comment that part out to make it a control signal.
Note-- in my port it's called [vb_fourses~]
for the reason noted below.
I have no idea if the algorithm behaves correctly, but it does output sound.
Btw-- AFAICT you should be able to compile this external for the 64-bit version of Purr Data and it should work properly. It doesn't require a special 64-bit codepath in Pd so I commented that part out.
Btw 2-- there should probably be a "best practices" rule that states you can only name your class something that is a legal C function name. Because this class doesn't follow that practice I made a mistake in the port. Further, the user will make a mistake because I had to change the class name. If I had instead made the setup function a different name than the creator I would create an additional problem that would force users to declare the lib before using it. Bad all around, and not worth whatever benefit there is to naming a class "foo.bar" instead of "foo_bar"
/*
#include "ext.h"
#include "ext_obex.h"
#include "z_dsp.h"
#include "ext_common.h"
*/
#include "m_pd.h"
#include "math.h"
/*
a chaotic oscillator network
based on descriptions of the 'fourses system' by ciat-lonbarde
www.ciat-lonbarde.net
07.april 2013, volker b?hm
*/
#define NUMFOURSES 4
static void *myObj_class;
typedef struct {
// this is a horse... basically a ramp generator
double val;
double inc;
double dec;
double adder;
double incy, incym1; // used for smoothing
double decy, decym1; // used for smoothing
} t_horse;
typedef struct {
t_object x_obj;
double r_sr;
t_horse fourses[NUMFOURSES+2]; // four horses make a fourse...
double smoother;
t_sample x_f;
} t_myObj;
// absolute limits
static void myObj_hilim(t_myObj *x, t_floatarg input);
static void myObj_lolim(t_myObj *x, t_floatarg input);
// up and down freqs for all oscillators
static void myObj_upfreq(t_myObj *x, t_floatarg freq1, t_floatarg freq2, t_floatarg freq3, t_floatarg freq4);
static void myObj_downfreq(t_myObj *x, t_floatarg freq1, t_floatarg freq2, t_floatarg freq3, t_floatarg freq4);
static void myObj_smooth(t_myObj *x, t_floatarg input);
static void myObj_info(t_myObj *x);
// DSP methods
static void myObj_dsp(t_myObj *x, t_signal **sp);
static t_int *myObj_perform(t_int *w);
//void myObj_dsp64(t_myObj *x, t_object *dsp64, short *count, double samplerate,
// long maxvectorsize, long flags);
//void myObj_perform64(t_myObj *x, t_object *dsp64, double **ins, long numins,
// double **outs, long numouts, long sampleframes, long flags, void *userparam);
//
static void *myObj_new( t_symbol *s, int argc, t_atom *argv);
//void myObj_assist(t_myObj *x, void *b, long m, long a, char *s);
void vb_fourses_tilde_setup(void) {
t_class *c;
myObj_class = class_new(gensym("vb_fourses~"), (t_newmethod)myObj_new, 0, sizeof(t_myObj),
0, A_GIMME, NULL);
c = myObj_class;
class_addmethod(c, (t_method)myObj_dsp, gensym("dsp"), A_CANT, 0);
// class_addmethod(c, (t_method)myObj_dsp64, gensym("dsp64"), A_CANT, 0);
class_addmethod(c, (t_method)myObj_smooth, gensym("smooth"), A_FLOAT, 0);
class_addmethod(c, (t_method)myObj_hilim, gensym("hilim"), A_FLOAT, 0);
class_addmethod(c, (t_method)myObj_lolim, gensym("lolim"), A_FLOAT, 0);
class_addmethod(c, (t_method)myObj_upfreq, gensym("upfreq"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
class_addmethod(c, (t_method)myObj_downfreq, gensym("downfreq"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
class_addmethod(c, (t_method)myObj_info, gensym("info"), 0);
//class_addmethod(c, (t_method)myObj_assist, "assist", A_CANT,0);
CLASS_MAINSIGNALIN(myObj_class, t_myObj, x_f);
// class_dspinit(c);
// class_register(CLASS_BOX, c);
post("vb_fourses~ by volker b?hm\n");
// return 0;
}
static void myObj_smooth(t_myObj *x, t_floatarg input) {
// input = CLAMP(input, 0., 1.);
if (input < 0.) input = 0;
if (input > 1.) input = 1;
x->smoother = 0.01 - pow(input,0.2)*0.01;
}
static void myObj_hilim(t_myObj *x, t_floatarg input) {
x->fourses[0].val = input; // store global high limit in fourses[0]
}
static void myObj_lolim(t_myObj *x, t_floatarg input) {
x->fourses[5].val = input; // store global low limit in fourses[5]
}
static void myObj_upfreq(t_myObj *x, t_floatarg freq1, t_floatarg freq2, t_floatarg freq3, t_floatarg freq4) {
x->fourses[1].inc = fabs(freq1)*4*x->r_sr;
x->fourses[2].inc = fabs(freq2)*4*x->r_sr;
x->fourses[3].inc = fabs(freq3)*4*x->r_sr;
x->fourses[4].inc = fabs(freq4)*4*x->r_sr;
}
static void myObj_downfreq(t_myObj *x, t_floatarg freq1, t_floatarg freq2, t_floatarg freq3, t_floatarg freq4) {
x->fourses[1].dec = fabs(freq1)*-4*x->r_sr;
x->fourses[2].dec = fabs(freq2)*-4*x->r_sr;
x->fourses[3].dec = fabs(freq3)*-4*x->r_sr;
x->fourses[4].dec = fabs(freq4)*-4*x->r_sr;
}
//#pragma mark 64bit dsp-loop ------------------
//void myObj_dsp64(t_myObj *x, t_object *dsp64, short *count, double samplerate,
// long maxvectorsize, long flags) {
// object_method(dsp64, gensym("dsp_add64"), x, myObj_perform64, 0, NULL);
//
// if(samplerate<=0) x->r_sr = 1.0/44100.0;
// else x->r_sr = 1.0/samplerate;
//
//
//}
//static void myObj_perform64(t_myObj *x, t_object *dsp64, double **ins, long numins,
// double **outs, long numouts, long sampleframes, long flags, void *userparam){
//
// t_double **output = outs;
// int vs = sampleframes;
// t_horse *fourses = x->fourses;
// double val, c, hilim, lolim;
// int i, n;
//
// if (x->x_obj.z_disabled)
// return;
//
// c = x->smoother;
// hilim = fourses[0].val;
// lolim = fourses[5].val;
//
// for(i=0; i<vs; i++)
// {
// for(n=1; n<=NUMFOURSES; n++) {
// // smoother
// fourses[n].incy = fourses[n].inc*c + fourses[n].incym1*(1-c);
// fourses[n].incym1 = fourses[n].incy;
//
// fourses[n].decy = fourses[n].dec*c + fourses[n].decym1*(1-c);
// fourses[n].decym1 = fourses[n].decy;
//
// val = fourses[n].val;
// val += fourses[n].adder;
//
// if(val <= fourses[n+1].val || val <= lolim ) {
// fourses[n].adder = fourses[n].incy;
// }
// else if( val >= fourses[n-1].val || val >= hilim ) {
// fourses[n].adder = fourses[n].decy;
// }
//
// output[n-1][i] = val;
//
// fourses[n].val = val;
// }
// }
//
// return;
//
//}
//#pragma mark 32bit dsp-loop ------------------
static void myObj_dsp(t_myObj *x, t_signal **sp)
{
dsp_add(myObj_perform, 6, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[0]->s_n);
if(sp[0]->s_sr<=0)
x->r_sr = 1.0/44100.0;
else x->r_sr = 1.0/sp[0]->s_sr;
}
static t_int *myObj_perform(t_int *w)
{
t_myObj *x = (t_myObj*)(w[1]);
t_float *out1 = (float *)(w[2]);
t_float *out2 = (float *)(w[3]);
t_float *out3 = (float *)(w[4]);
t_float *out4 = (float *)(w[5]);
int vs = (int)(w[6]);
// Hm... not sure about this member. I don't think we can disable individual
// objects in Pd...
// if (x->x_obj.z_disabled)
// goto out;
t_horse *fourses = x->fourses;
double val, c, hilim, lolim;
int i, n;
c = x->smoother;
hilim = fourses[0].val;
lolim = fourses[5].val;
for(i=0; i<vs; i++)
{
for(n=1; n<=NUMFOURSES; n++) {
// smoother
fourses[n].incy = fourses[n].inc*c + fourses[n].incym1*(1-c);
fourses[n].incym1 = fourses[n].incy;
fourses[n].decy = fourses[n].dec*c + fourses[n].decym1*(1-c);
fourses[n].decym1 = fourses[n].decy;
val = fourses[n].val;
val += fourses[n].adder;
if(val <= fourses[n+1].val || val <= lolim ) {
fourses[n].adder = fourses[n].incy;
}
else if( val >= fourses[n-1].val || val >= hilim ) {
fourses[n].adder = fourses[n].decy;
}
fourses[n].val = val;
}
out1[i] = fourses[1].val;
out2[i] = fourses[2].val;
out3[i] = fourses[3].val;
out4[i] = fourses[4].val;
}
//out:
return w+7;
}
static void myObj_info(t_myObj *x) {
int i;
// only fourses 1 to 4 are used
post("----- fourses.info -------");
for(i=1; i<=NUMFOURSES; i++) {
post("fourses[%ld].val = %f", i, x->fourses[i].val);
post("fourses[%ld].inc = %f", i, x->fourses[i].inc);
post("fourses[%ld].dec = %f", i, x->fourses[i].dec);
post("fourses[%ld].adder = %f", i, x->fourses[i].adder);
}
post("------ end -------");
}
void *myObj_new(t_symbol *s, int argc, t_atom *argv)
{
t_myObj *x = (t_myObj *)pd_new(myObj_class);
// dsp_setup((t_pxobject*)x, 0);
outlet_new((t_object *)x, &s_signal);
outlet_new((t_object *)x, &s_signal);
outlet_new((t_object *)x, &s_signal);
outlet_new((t_object *)x, &s_signal);
x->r_sr = 1.0/sys_getsr();
if(sys_getsr() <= 0)
x->r_sr = 1.0/44100.f;
int i;
for(i=1; i<=NUMFOURSES; i++) {
x->fourses[i].val = 0.;
x->fourses[i].inc = 0.01;
x->fourses[i].dec = -0.01;
x->fourses[i].adder = x->fourses[i].inc;
}
x->fourses[0].val = 1.; // dummy 'horse' only used as high limit for fourses[1]
x->fourses[5].val = -1.; // dummy 'horse' only used as low limit for fourses[4]
x->smoother = 0.01;
return x;
}
//void myObj_assist(t_myObj *x, void *b, long m, long a, char *s) {
// if (m==1) {
// switch(a) {
// case 0: sprintf (s,"message inlet"); break;
// }
// }
// else {
// switch(a) {
// case 0: sprintf (s,"(signal) signal out osc1"); break;
// case 1: sprintf(s, "(signal) signal out osc2"); break;
// case 2: sprintf(s, "(signal) signal out osc3"); break;
// case 3: sprintf(s, "(signal) signal out osc4"); break;
// }
//
// }
//}
Reverberation
Ok, so, I've cleaned up both the verbs abstractions. And fixed a bunch of errors I wasnt aware about. Took going through the guts of all to discover all my sloppyness.
jVerb1.2 changelog:
- Added one preset
- Fixed delay time calculation in the [delay~] abstraction
- Reduced sends and throws etc (see later discussion)
- Changed [vline~] to [line~]
- Fixed a bug with the control subpatch not sending correct gain messages for the APNs
- Changed se S control from binary to "analogue"
- Added pseudorandom seeding (using $0) for all delay modulation
Schroom1.2 changelog:
- Using the a lot of the same abstractions, a lot of the same changes apply. Basicially the APNs and below.
- added a missing abstraction which rendered the patch useless. The [xfade~] providing crossfade between natural verb and beefcake. I'm sure the smart ones of you made one up on the fly.
Now, about reducing sends/receives or throw/catches. The signal flow in jVerbs matrix go like this: https://imgur.com/a/cE3b0gi
If I substitute the receives and throws for direct lines I get "DSP loop detected" error messages. I suspect I can do away with that by putting the delreads at the junction outputs outside their abstractions, but I'm too tired to try now.
Oh, and I get this error message whenever I open the jverbdemo patch: "$2: argument number out of range". I've not been able to locate the error...
For those interested in the jVerb algortihm, I'll try to elaborate on the design. First of all you need to wrap your head around the idea of the Kelly-Lochbaum scattering junction. I think there's even an object in extended modelling it. My own version is highly modified, but I'll get to that later. Here's the primer on KL-junctions: https://ccrma.stanford.edu/~jos/pasp/Kelly_Lochbaum_Scattering_Junctions.html
As you can see from my flow diagram above, that is the primary building block in jVerb. The second one is Schroeder allpass nests, which also form the essential guts of Schroom.. Neat diagram + discussion can be found here: https://valhalladsp.com/2009/05/30/schroeder-reverbs-the-forgotten-algorithm/
The things not explained in my ms-paint flow chart are the stuff I added to jVerb in order to get rid of metallic ringing and out of control feedback. You can still tweak the patch to do both if that's your thing.
First of all, each allpass nest has a slowmo random modulator on the outer delay loop, with a low amplitude (300 ms, 11 samples).
Second all junctions are provided with a fixed delay plus a randomly modulated delay on each output.
This is all to avoid metallic ringing.
Third, there is a gain control on the inlet of each junction. This is pretty essential in preventing nasty build ups. If you play around with it you'll see that the junction gain is what saves your headphones (and ears).
Finally, there's a cross fade function between the two inlets of each junction. This pretty much destroys the original equation, but can produce some very interesting results.
The latter two are controllable.
You might wanna try adding some filters to the chain or constructing your very own matrix of junctions and nests.
If I spend more time on jVerb, it will be adding delay tuning like Schroom has and maybe optional individual controls for each junction... Dunno.
Post your own mods if you like
ofelia v1.0.8 released
Hi, ofelia v1.0.8 is now available.
You can use GEM with ofelia thanks to Arnaud Courcelle who created [ofGemwin] and [ofGemhead] abstractions.
Please try out "ofelia/examples/gem/main.pd" to learn how to use GEM with ofelia. I've only tested this on macOS by the way.
Also, I added some utility objects for creating message and file opening/saving dialogs.
You can find these objects inside [pd system] subpatch in UTILS section of "ofelia/help-intro.pd".
Changes:
- added [ofGetFboTexID] and [ofGetImageTexID]
- added GEM abstractions and example to the "examples/gem" directory
- added ofRectangle related objects and help files
- renamed [ofGetDollarArgs] to [ofGetCanvasArgs]
- added [ofSetCanvasArgs], [ofRemoveCanvas], [ofGetCanvasIndex]
- added [ofKeyCodeListener]
- added ofSystemUtils objects and help files
Upcoming features:
- Video player and grabber
- SVG loader
- GUI abstractions
- Raspberry Pi support
More info about ofelia: https://github.com/cuinjune/ofxOfelia
Cheers!
Camomile v1.0.1 - An audio plugin with Pure Data embedded
New release available:
v1.0.4
- Add label support for GUI objects (#95)
- Add graphical array support for GUI array objects (graph) (#93)
- Add window array support for array define objects (#93)
- Add steady/jump mode for IEM's GUI slider
- Add log scale for IEM's GUI slider (#96)
- Add instructions for contributions
- Add the facultative flag "-s" to openpanel/savepanel methods to suspend processing
- Add warning if no audio bus is defined
- Fix the width of the comment
- Fix the incrementation of the number box and the atom number
- Add support to change dynamically the graphical interface (#99)
- Add support to change dynamically the latency (#62)
- Fix variable block size support (#100)
- Improve MIDI In/Out time precision
- Add support for manually and automatic dynamic reload of the patch (#101)
- Add support for abstractions/sub-patches GraphOnParent (#102)
- Fix midi pitch bend offset due to +8192 from libpd (#104)
- Remove libpd.dll dependency to the Windows versions (#94)
Camomile v1.0.1 - An audio plugin with Pure Data embedded
New release available:
v1.0.2
- Fix DSP off message to Pd
- Prepare the DSP before opening the patch (#83)
- Initialize parameters and programs before opening the patch (#82)
- Use libpd_process_raw in the DSP perform method for optimization
- Add support for MIDI In SysEx, SysRealTime & Byte
- Add support for MIDI Out Byte
- Add full support for keys objects [key], [keyup] (#80)
- Add partial support for key objects[keyname] (perhaps some names are still missing names are missing)
- Improve the console (resizable)
- Improve prints for lists (remove line breaks)
- Floating Window always on top
- Floating Window with tabs (Console/Patch/Camomile)
- Display patch description
- Add support for compatibility versions (plugin's version of the patch <= plugin's version used)
- Add support for block size inferior to 64 samples (implies delay)
- Add support for non-real time processing
- Improve name of the UI Window
- Fix the FFT objects for multithreading support
exponential ADSR envelope using LP filter
Hi. I've played with this method before a bit. A real 1-pole lowpass filter with an impulse passed in is equivalent to multiplying every previous sample by a constant factor to get the next sample, which is also equivalent to an exponential envelope. But you can also add a constant factor for every sample in order to make a linear envelope. So it turns out you can make a variable-slope filter by combining: multiply and add on the previous sample by 2 different factors. If you are interested I have further details in this blog post:
https://sshader.wordpress.com/2014/09/05/programming-an-adsr-envelope/?iframe=true&theme_preview=true
It's not that cpu friendly when you change the settings because you have to take the sample-length-of-the-stageth root or something like that, I haven't looked into it in a while though. However, afterward it simplifies to an add and multiply at every sample
here are the codes: http://forum.pdpatchrepo.info/topic/8490/examp-exponential-envelopes-with-exponential-linear-curve-control