I have a huge project. So, I begin with the kick.
You don't need [t3_bpe] or [t3_line~] anymore. That article and those externals were written before [vline~], which now comes with Pd-vanilla and is much more widely used. You should definitely use [vline~] for percussion sounds whenever possible because the timing is more accurate and you can get finer control of attacks.
A couple of envelope tips:
1. Squaring the output of the envelope will give you an exponential decay, which is much more natural sounding.
[vline~]
| \
[*~ ]
2. Squaring the output also gives you an exponential attack, which may not be so natural sounding and actually kind of sucks for percussion. However, I've been using a nice little trick to get better attacks from this. You can use a low-pass filter to smooth out the envelope (or any signal). By giving the envelope an instant attack and sending it through a [lop~], you can use the cut-off frequency to define you a short, quick attack that has a more natural rise while keeping the exponential decay:
[1 0, 0 100 0( <--instantly jump to one, go back to zero after 100 ms
|
[vline~]
| \
[*~]
|
[lop~ 100]
Emulating this sound
@mmb
nice patch
I know fm/pm has some variations but it seems unintentional that your phasemodulation runs out off indicies.
So... I know you know put a [wrap~] between the [+~ ] and the [tabread4~] or use [cos~] where the input is wrapped.
attached is my variation
btw a great resource on this subject
Music: a Mathematical Offering
get it here http://www.maths.abdn.ac.uk/~bensondj/html/maths-music.html
Continuous (dynamic?) updating buffer
Good stuff everyone,
In toxonic's patch you can scrub back and forth through the input (that was the goal I was aiming for) by playing with the phase of the Phasor~ however the clicking that is incurred by changing phase sounds like an artifact, and not simply a click of an non-smooth waveform. Could the hamming window help here? (i wouldn't know how to implement it). Also the index position changes over time. Could that defeated by some kind of maths between phase of player and a phasor~ going in reverse, then subtracting the two, or something?
Speaking of poor maths,
last night I managed to get a buffer to read in continuously, like a delay line, and without the index changing (the big goal I was hoping for!) In this patch however, I've set it to a second's length, so that playback can be nearly instant and check-able. it doesn't sound good. like there's downsampling going on. you can see in the table that there are chunks of samples simply missing, but evenly spaced!
the buffer is at 44, so that one block gets processed exactly every millisecond, meaning i can use a [metro 1] to jump through the table and write, every individual block. but perhaps my maths is wrong somewhere. and it no work ((
If any genius can help me figure it out, let's do it!!
either way, playing with the values makes some fantastic sounds!
Math intro
As Hardoff says, you can get a long way without needing any math at all. Maths is just a helper, a language to visualise other complicated ideas with.
I suggest Steven E Smiths "Scientist and Engineers guide to DSP"
The (almost complete) PDF is avilable free online, but I'm sure after reading it you'l want to get the paperback version. It's nicely written, introduces concepts in the right order and doesn't really use much math.
Level 1 study also includes:
- Dodge and Jerse "Computer Music" - expensive hardback but fundamental
- Miranda "Computer Sound Design" - easy going and general
- Roads "The Computer Music Tutorial" - extensive
Level 2 study is
- Miller Puckettes book "Theory and techniques"
- Julius Smiths pages on filters, waveguides and modelling
- Dave Benson "Music, a mathematical offering"
- Perry Cook "Real time sound synthesis"
Midi routing
Thanks for your help! Now I can get the IAC bus to select in the preferences, but I am still not getting any midi output to the app I am sending to. I am jsut creating a test patch so I have some random numbers feeding into the noteout object. Midi out is going to IAC and in my other app IAC is goign into midi in. I am gettign the following messages in the parent window:
error: midiin: works under Linux only
... you might be able to track this down from the Find menu.
error: sysexin: works under Linux only
error: midiin: works under Linux only
error: sysexin: works under Linux only
chord v0.2, written by Olaf Matthes <olaf.matthes@gmx.de>
load_object: Symbol "borax_setup" not found
borax
... couldn't create
score v0.1, score follower written by Olaf Matthes <olaf.matthes@gmx.de>
score: no array "o" (error 0)
score: skipindex set to 2, skiptime set to 300 milliseconds
pitch v0.1b, written by Olaf Matthes <olaf.matthes@gmx.de>
xeq
... couldn't create
PD Math
Hello, I'd like to rescale my output. If I have say min 0, full 360, I'd like to rescale it to min -1, full 1. I would think the first step would be to / 360? that would result in min 0, full 1, but does not go negative.
Help!
4-Point Polynomial Interpolation.. care to explain?
With tabread4~ what's happening is that a sliding window of 4 samples is moving forwards and the instantaneous output is a function of those four values. It's done to smooth the curve of the data when the sampling points might not be accurate (because of say quantisation errors), and also to provide access to values in between the real stored values. This happens when you want to read the sample of looping oscillator back at a frequency that isn't an integer factor of the original sample rate - common for most oscillators. Imagine you had a table of just 2 samples. 2 point linear interpolation would say - if value 0 is 10 and value 1 is 20 then the value that *would* be at index 0.5 (if it existed) is 15 (the simple average) That's interpolation. Theres many takes on it, which fall under the numerical methods field of "curve fitting" you might find better examples searching on that term. Polynomials are cool because they are infinitely differentiable, you can pick any in between value and it will fit smoothly into the curve with the others and won't suddenly freak out to infinity or zero.
Basically -
Linear, we just take two points and assume a line runs between them to find an inbetween value.
Polynomial (2nd order) We use an equivillence like Legrange (turns a sequence to sum of products) which are coefficients of a polynomial (eg S = 1x + 3y + 16z^2)
That gives us a curve that can fit to three points.
There's cubic (spline) and other interpolation functions you can use. Basically the higher the order of powers the more smoothness and accuracy you will get, but you will need to process more samples for each table read .
http://www.efunda.com/math/num_interpolation/num_interpolation.cfm
Miller Puckette's book The Theory and Technique of Electronic Music
It's going to be an essential reference work, up there with Dodge and Jerse and Roads,
and I can't wait to hold a real copy.
But this is the one I'm really waiting for....
http://www.maths.abdn.ac.uk/~bensondj/html/maths-music.html
Any slicers or offset samplers in PD?
I was thinking dismissively about this today, "Crazy kids and their beat slicers..."
Then I remembered it's actualy non-trivial, in fact it can be a pig of problem to do properly.
May a suggest that it be split up into sensible software components.
The first two parts are easy really, the table manager for storing samples in arrays, flatfiles or whatever, and the resequencer or slice dumper that can nicely envelope each chunk and play it or write them all as incrementally named files somewhere.
The third part is the bitch. We need a beat detector that can find startpoints. Easy with a nice clean recording, but with the Amen beat for jungle - that's the trick. Some kind of spectral differential is called for hooked to a look-ahead and look-back inteligent zero detector. (want to catch them on a positive going phase) Crack this and you've basically done the hard work.
The sub-unit should take an arbitary sized file and return a list of indexes that correspond to the start of an event according to three or four spectral thresholds, one for high, mid and low events (hihat, snare and kick)
As an aside, I used Recycle way back, I don't know if they improved the algorithm significantly since but honestly I found it a piece of crap, really sloppy at false positives caused by clicks or dicsontinuities, really naive algorithm which always went for the minima before a beat even if it was obviously way too early. I had a production job for a band which involved a lot of beat cutting and in the end I ditched recycle and went for cutting them by hand in cool edit, much faster. Steinbergs programmers aren't idiots, which leads to me to think there's a lot to doing this well.
How hard is pd to learn? and is it worth it?
>the possibilities of pd seem huge and exciting.
this is true..in answer to your question "is it worth it?" ...well of course
>i spent a couple of hours messing about with pd the other night, just with the examples in the help files, seeing what it can do to sound and it is very exciting.
ok...good start ali. the way i learnt was to make a few projects for myself, for audio devices which i wanted to make. ...then just went through the help files and whatnot to find bits which i needed to make these devices.
my first project was a sequencer that would sync up 8 different soundfiles and play bits of each sample in order...ie 1 beat from the 1st sample, followed by 1 beat from the 2nd sample, then a beat from the 3rd,,,,,etc
it took about 1 month to learn enough pd to get that far. maybe 100 hours.
as far as the coolest things i have done...pd lets me actually play live now...live imprrovised jams based on sample loops which i can manipulate in realtime. i use inputs from my computer's keyboard to trigger effects and change sequences and pitch and whatever. even the guys using ableton "live" or whatever aren't really doing much live improvisation like that, so that's pretty exciting i guess. there are some examples of my tracks in older threads on this board...might not be your cup of tea exactly, but they're all recorded dirtectly out of pd, with no further editing or sequencing or anything.
:::
about the maths: it depends on what you want to do really....with the stuff i do, sample sequencing and resequencign and stuff, the maths is pretty simple...dividing a loop into 32 parts, multiplying sample frequencies by time...etc. it's pretty basic primary school maths for that, which is the way i like it, cos i'd rather be making rock n roll than sitting down and doing my maths homework.
however, i still haven't got far with doign actual synthesis from sine waves and stuff, cos that does involve some higher maths. i'll leave that stuff to the people who are interested in it i reckon. there's also lots of amazing stuff with fourier analysis that i'd love to understand, but it's a bit hard for me.
so basically, there are lots of things you can do without too much math, but i'm sure that the people who understand it are gonna have an advantage.
anyway nice to meet you...any more questions, this is your place. good to see a few more people here lately too, it was a bit quiet for a while.