Commit 27ed02a1 authored by ericlyon's avatar ericlyon

Update files

parent 529ee797
This distribution comes with binaries for both OSX (10.9) and Linux (Ubuntu 64-bit). To install, move folders “lyonpotpourri-externals” and “lyonpotpourri-helpfiles” to a location within your Pd search path. If the shipped externals work with your computer hardware, you are good to go. Otherwise, you will need to recompile the externals by typing “make” in a Terminal window. If on OSX, you need to have the developer tools installed in order to run Make.
LyonPotpourri for Pd
Copyright (c) 2007-2012 Eric Lyon
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <strings.h>
#include <string.h>
#define LYONPOTPOURRI_MSG "-<LyonPotpourri 3.0>-"
#define NO_FREE_FUNCTION 0
/* because Max and Pd have different ideas of what A_FLOAT is, use t_floatarg
to force consistency. Otherwise functions that look good will fail on some
hardware. Also note that Pd messages cannot accept arguments of type A_LONG. */
#include "m_pd.h"
#define t_floatarg float
#define t_double double
#define atom_getsymarg atom_getsymbolarg
#ifndef PIOVERTWO
#define PIOVERTWO 1.5707963268
#endif
#ifndef TWOPI
#define TWOPI 6.2831853072
#endif
#ifndef PI
#define PI 3.14159265358979
#endif
/*** MSP helper functions **/
void atom_arg_getfloat(float *c, long idx, long ac, t_atom *av);
void atom_arg_getsym(t_symbol **c, long idx, long ac, t_atom *av);
// #define potpourri_announce(objname) post("( %s )\t%s",objname,LYONPOTPOURRI_MSG)
#define potpourri_announce(objname) post("%s ( %s )",LYONPOTPOURRI_MSG,objname)
\ No newline at end of file
This diff is collapsed.
float frequencyToIncrement( float samplingRate, float frequency,
int bufferLength );
void makeSineBuffer( float *buffer, int bufferLength );
float bufferOscil( float *phase, float increment, float *buffer,
int bufferLength );
float rrand(int *seed);
float prand(int *seed);
Updates to LyonPotpourri 3.0
12.22.2013
Nothing yet!
\ No newline at end of file
#include "MSPd.h"
#include "ugens.h"
#include <string.h>
/* calling codes for DSP modules */
#define TRANSPOSE 0
#define RINGMOD 1
#define FLANGE 2
#define BUTTER 3
#define TRUNCATE 4
#define SWEEPRESON 5
#define COMB 6
#define SLIDECOMB 7
#define REVERB1 8
#define ELLIPSE 9
#define COMPDIST 10
#define FEED1 11
#define RETRO 12
#define FLAM1 13
#define FLAM2 14
#define EXPFLAM 15
#define COMB4 16
#define RINGFEED 17
#define RESONADSR 18
#define STV 19
//////
#define ROOT2 (1.4142135623730950488)
#define PI2 (6.2831853071795862319959)
// #define BUFFER_SIZE (1<<15)
#define LOPASS 0
#define HIPASS 1
#define BANDPASS 2
#define COMBFADE (.04 )
#define MAXFILTER 12 /*must be at least as big as see below */
#define ELLIPSE_FILTER_COUNT 11 /*actual number of filters*/
#define MAX_COEF 48
#define MY_MAX 2147483647.0 /* for rand() */
/*data types */
typedef struct
{
float *data;//contains cycle data
int len;//length of array
int p;//position pointer
} t_cycle;
typedef struct
{
long phase; // current phase in frames
double phasef; // current phase in frames
float gain; // gain for this note
float gainL;// left gain
float gainR;// right gain
short status;// status of this event slot
float *workbuffer;//sample processing space (both input and output)
float *inbuf;//pointer to input part of workbuffer
float *outbuf;//pointer to output part of workbuffer
int in_start;// location in workbuffer to read from input
int out_start;// location in workbuffer to write output
int sample_frames;//actual size in frames of sample, which changes if it gets bigger
int countdown;//latency counter before we actually start sending out samples
int out_channels; //number of channels per frame of output
short completed;//did the defer call do its thing?
} t_event;
typedef struct _bashfest
{
t_object x_obj;
float x_f;
float sr; // sampling rate
t_symbol *wavename; // name of waveform buffer
short hosed; // buffers are bad
float fadeout; // fadeout time in sample frames (if truncation)
float sync; // input from groove sync signal
float increment; // read increment
int most_recent_event; // position in array where last note was initiated
long b_nchans; // channels of buffer
long b_valid; // state of buffer
long b_frames; // number of frames in sample buffer
float *b_samples; // pointer samples in buffer
int overlap_max; // max number of simultaneous plays
t_event *events; //note attacks
int active_events; // how many currently activated notes?
int buf_samps;//total samples in workbuffer
int halfbuffer;//buf_samps / 2
int buf_frames;// number of sample frames in workbuffer
int latency_samples;// amount of samples to count down before playing sample
float *params; // parameter list
float *odds;// odds for each process happening
int max_process_per_note;//what it says
int min_process_per_note;//ditto
int new_slot;//position for newest note
float new_gain;//recently assigned gain
short verbose;//toggle Max window error reporting
float work_buffer_size;// size in ms of work buffers
t_cycle tcycle;//contains an optional transposition cycle
short block_dsp;//flag to turn off all dsp and play straight from MSP buffer
short sound_lock;//keep current processed sound in buffer
short grab;//flag to copy immediate processed buffer into MSP buffer
char sound_name[256];
float *trigger_vec;//stores incoming trigger vectors
// int tb_inpt;//where we put the incoming trigger vector
// int tb_outpt;//where we read the outgoing trigger vector
int vs;//Max/MSP vector size
/* stuff for bashfest DSP */
float *sinewave;
int sinelen;
short mute;
float maxdelay;
float *delayline1;
float *delayline2;
LSTRUCT *eel; // for ellipse processor
float *mini_delay[4]; // small delay lines for allpass filter
float max_mini_delay ;
float *transfer_function;
int tf_len; // length of transfer function
float *feedfunc1;
float *feedfunc2;
float *feedfunc3;
float *feedfunc4;
int feedfunclen;
int flamfunc1len;
float *flamfunc1;
CMIXCOMB *combies;
CMIXADSR *adsr;
float max_comb_lpt;
float *reverb_ellipse_data;
float **ellipse_data;
float *dcflt;
CMIXOSC oscar;
CMIXRESON resies[2];
} t_bashfest;
/*function prototypes*/
void putsine (float *arr, int len);
float boundrand(float min, float max);
void mycombset(float loopt,float rvt,int init,float *a,float srate);
float mycomb(float samp,float *a);
void setweights(float *a, int len);
void delset2(float *a,int *l,float xmax, float srate);
void delput2(float x,float *a,int *l);
float dliget2(float *a,float dwait,int *l,float srate);
void butterLopass( float *in, float *out, float cutoff, int frames, int channels, float srate);
void butterBandpass(float *in, float *out, float center, float bandwidth, int frames,int channels, float srate);
void butterHipass(float *in, float *out, float cutoff, int frames,int channels, float srate);
void butset(float *a);
void lobut(float *a, float cutoff,float SR);
void hibut(float *a, float cutoff, float SR);
void bpbut(float *a, float formant, float bandwidth, float SR);
void butter_filter(float *in,float *out,float *a, int frames, int channels, int channel);
void rsnset2(float cf,float bw,float scl,float xinit,float *a,float srate);
float reson(float x,float *a);
void ellipset(float *list, LSTRUCT *eel, int *nsects, float *xnorm);
float ellipse(float x, LSTRUCT *eel, int nsects, float xnorm);
float allpass(float samp,float *a);
void init_reverb_data(float *a);
void init_ellipse_data(float **a);
void setExpFlamFunc(float *arr, int flen, float v1,float v2,float alpha);
void setflamfunc1(float *arr, int flen);
void funcgen1(float *outArray, int outlen, float duration, float outMin, float outMax,
float speed1, float speed2, float gain1, float gain2, float *phs1, float *phs2,
float *sine, int sinelen);
void normtab(float *inarr,float *outarr, float min, float max, int len);
float mapp(float in,float imin,float imax,float omin,float omax);
float oscil(float amp,float si,float *farray,int len,float *phs);
void set_dcflt(float *a);
void set_distortion_table(float *arr, float cut, float max, int len);
float dlookup(float samp,float *arr,int len);
void do_compdist(float *in,float *out,int sampFrames,int nchans,int channel,
float cutoff,float maxmult,int lookupflag,float *table,int range,float bufMaxamp);
float getmaxamp(float *arr, int len);
void buildadsr(CMIXADSR *a);
/*bashfest dsp functions */
void feed1(float *inbuf, float *outbuf, int in_frames, int out_frames,int channels, float *functab1,
float *functab2,float *functab3,float *functab4,int funclen,
float duration, float maxDelay, t_bashfest *x);
void reverb1me(float *in, float *out, int inFrames, int out_frames, int nchans,
int channel, float revtime, float dry, t_bashfest *x);
void killdc( float *inbuf, int in_frames, int channels, t_bashfest *x);
while(<*>){
chomp;
if(/darwin$/ | /liblyonpotpourri.dylib/){
`mv $_ darwin_bin`;
}
}
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
/*
The new improved fftease.h
*/
#define getbytes t_getbytes
#define freebytes t_freebytes
#define resizebytes t_resizebytes
#define FFTEASE_ANNOUNCEMENT "- a member of FFTease 2.52"
#ifndef PI
#define PI 3.141592653589793115997963468544185161590576171875
#endif
#ifndef TWOPI
#define TWOPI 6.28318530717958623199592693708837032318115234375
#endif
#define MAX_N (16384)
#define MAX_N2 (MAX_N/2)
#define MAX_Nw (MAX_N * 4)
void convert(float *S, float *C, int N2, float *lastphase, float fundamental, float factor );
void unconvert( float *C, float *S, int N2, float *lastphase, float fundamental, float factor );
void rfft( float *x, int N, int forward );
void cfft( float *x, int NC, int forward );
void bitreverse( float *x, int N );
void fold( float *I, float *W, int Nw, float *O, int N, int n );
void init_rdft(int n, int *ip, float *w);
void rdft(int n, int isgn, float *a, int *ip, float *w);
void bitrv2(int n, int *ip, float *a);
void cftsub(int n, float *a, float *w);
void rftsub(int n, float *a, int nc, float *c);
void makewt(int nw, int *ip, float *w);
void makect(int nc, int *ip, float *c);
void leanconvert( float *S, float *C, int N2 );
void leanunconvert( float *C, float *S, int N2 );
void makewindows( float *H, float *A, float *S, int Nw, int N, int I );
void makehamming( float *H, float *A, float *S, int Nw, int N, int I,int odd );
void makehanning( float *H, float *A, float *S, int Nw, int N, int I,int odd );
void overlapadd( float *I, int N, float *W, float *O, int Nw, int n );
void bloscbank( float *S, float *O, int D, float iD, float *lf, float *la,
float *bindex, float *tab, int len, float synt, int lo, int hi );
float randf( float min, float max );
int randi( int min, int max );
int power_of_two(int test);
void freebytes2(void *fatso, size_t nbytes);
void *getbytes2(size_t nbytes);
void *resizebytes2(void *old, size_t oldsize, size_t newsize);
void limit_fftsize(int *N, int *Nw, char *OBJECT_NAME);
/* THE FUNCTIONS */
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
/*
The new improved fftease.h
*/
#define FFTEASE_ANNOUNCEMENT "- a member of FFTease 2.52"
#ifndef PI
#define PI 3.141592653589793115997963468544185161590576171875
#endif
#ifndef TWOPI
#define TWOPI 6.28318530717958623199592693708837032318115234375
#endif
#define MAX_N (16384)
#define MAX_N2 (MAX_N/2)
#define MAX_Nw (MAX_N * 4)
void convert(float *S, float *C, int N2, float *lastphase, float fundamental, float factor );
void unconvert( float *C, float *S, int N2, float *lastphase, float fundamental, float factor );
void rfft( float *x, int N, int forward );
void cfft( float *x, int NC, int forward );
void bitreverse( float *x, int N );
void fold( float *I, float *W, int Nw, float *O, int N, int n );
void init_rdft(int n, int *ip, float *w);
void rdft(int n, int isgn, float *a, int *ip, float *w);
void bitrv2(int n, int *ip, float *a);
void cftsub(int n, float *a, float *w);
void rftsub(int n, float *a, int nc, float *c);
void makewt(int nw, int *ip, float *w);
void makect(int nc, int *ip, float *c);
void leanconvert( float *S, float *C, int N2 );
void leanunconvert( float *C, float *S, int N2 );
void makewindows( float *H, float *A, float *S, int Nw, int N, int I );
void makehamming( float *H, float *A, float *S, int Nw, int N, int I,int odd );
void makehanning( float *H, float *A, float *S, int Nw, int N, int I,int odd );
void overlapadd( float *I, int N, float *W, float *O, int Nw, int n );
void bloscbank( float *S, float *O, int D, float iD, float *lf, float *la,
float *bindex, float *tab, int len, float synt, int lo, int hi );
float randf( float min, float max );
int randi( int min, int max );
int power_of_two(int test);
void freebytes2(void *fatso, size_t nbytes);
void *getbytes2(size_t nbytes);
void *resizebytes2(void *old, size_t oldsize, size_t newsize);
void limit_fftsize(int *N, int *Nw, char *OBJECT_NAME);
/* THE FUNCTIONS */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#define LYONPOTPOURRI_MSG "-[LyonPotpourri 3.0]-"
#define LYONPOTPOURRI_VERSION "3.0 (pre-release 3.1)"
#define LPP_COMPILE_DATE "12 May 2010"
#define lpp_version(objectname) post("%s: version %s compiled %s",objectname,LYONPOTPOURRI_VERSION,LPP_COMPILE_DATE);
// #define potpourri_announce(objname) post("%s\t ( %s )",LYONPOTPOURRI_MSG,objname)
#define NO_FREE_FUNCTION 0
#ifndef PI
#define PI 3.1415926535898
#endif
#ifndef PIOVERTWO
#define PIOVERTWO 1.5707963268
#endif
#ifndef TWOPI
#define TWOPI 6.2831853072
#endif
// budget version of Max/MSP denorm function
#define FIX_DENORM_FLOAT(v) (v=(fabs(v) < 0.000001 ? 0.f : (v)))
/*** MSP helper functions, thanks JKC! ***/
void atom_arg_getfloat(float *c, long idx, long ac, t_atom *av);
void atom_arg_getsym(t_symbol **c, long idx, long ac, t_atom *av);
void atom_arg_getfloat(float *c, long idx, long ac, t_atom *av)
{
if (c&&ac&&av&&(idx<ac)) {
*c = atom_getfloat(av+idx);
}
}
void atom_arg_getsym(t_symbol **c, long idx, long ac, t_atom *av)
{
if (c&&ac&&av&&(idx<ac)) {
*c = atom_getsymbol(av+idx);
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.