that worked like a charm, thank you Jerome! I feel a less more noob and learned something.
[solved] Pd sampler.rockafella example on axoloti
Hello Jerome
I am trying to reverse the audio in a table and I've been pointed to your thread here because of your rockafella adaption.
From Jaffasplaffas suggestion in this thread I understand that you would have to invert the phasor reading through the sample so that it would play back in reverse. Unfortunately this didn't work when we tried out because speed and pitch are connected with table read.
As I understand what you achieved with your rockafella is to have speed and pitch independant.
So I tried to invert the output of the main phasor in your patch but didn't have any luck achieving reverse playback. To be honest I don't really understand how your patch exactly works, so I was just going try and error and inserting math/inv at different points asuming "main phasor" woul be a good starting point.
Could you maybe help me out here?
Thanks for the great work btw, although I didn't succed in my reverse playback, sampling little bits of guitar and stretching it is great fun!
Help needed: Clicks in granular patch
hm. A lot os going on in this picture.
Havent tested it, but try inverting STRAIGHT after the saw lfo. Before sample and hold and interp object. You dont need all those audio rate inverters, You just need to get the saw lfo inverted at the right place. Anyway, I would suggest to make a simple test patch and see how it works with just a saw lfo and an inverter running through a table(and something to trigger the table like a square lfo). Just to undestand how it works before implementing into a complicated patch like this.
EDIT: Or maybe even simpler way to get and idea how it works: change the saw lfo to saw down lfo. That should also do the trick. For testing this you dont need any inverters.
Straight after the Lfo didn't work either. Also the saw down showed no results.
But I made a simple test patch as you suggested and finally got my reverse audio! Thank you! I did this also a month ago but it didnt work. I think using a Saw lfo instead phasor somehow did the trick. The only problem I need to solve is to tell the lfo to start at that point in the table where
recording stopped but this is something for my original thread I guess.
Anyways great patch here, love playing around with the rockafella!
Not sure I understand this; You want the reverse to start from the same point as the the forward is located at? So you can scan forth and back over the same snippet pf sound for example?
I want to reverse from the end of the sample, so just straight playback either forwards or backwards. The problem is I don't know how to set up the phasor probably, I tune it by ear at the moment. This works for forward playback because I retrigger the sample all the time by using the reset inlet of the lfo. But with backwards playback it starts playing out the whole table, instead of start at the point where the sample ends.
I think I need to look into look into the compensation value in on of Jerome's calculations. The problem Is that this value in my case is not fixed, because it changes each time I record a sample.
But maybe it's a good Idea to move this here, I don't want to hijack this thread I will post some examples there.
Sorry, I had not seen yours replies.
Just start from "length" to zero, then take a reset.
I have change the lfo, in order to have a frequency of 0 if, you want "freeze" the sample. Then, freeze inlet is deprecated.
rockafella.axh (10.4 KB)
rockafella.axs (16.5 KB)
Hanning Window Object
I guess you are using lfo saw lin for this, right? Was wondering if you've figured out what values and data type you need to feed into the freq input? To be able to set a specific frequency?
Thanks
Ha, good question !
First, I don't understand the relation between frequency input of "lfo/saw lin" object and frequency output. I would in this case responded to your question in this discussion !
Then, I trig on reset input of the "lfo/saw lin" object if output exceed the threshold "length". For this reason, the table is read with a different frequency as output frequency of the "lfo/saw lin" object... Sorry.
But I think, it's possible to understand relation between frequency input and frequency of output signal of "lfo/saw lin" object reading the code. I investigates.
Cool. Neither do I. Thanks though. Maybe you hadnt seen the post
dont know much about the coding side of it, so cant help there. But interested in what you find out
For k-rate, a 1hz saw signal must have a 64/3000 = 0,021333 increment (for each step of 3KHz).
In lfo/saw lin object, freq input is divided by 128 :
">> 2 then >> 5 " <=> ">> 7 " <=> " div by 2^7 (== 128)"
If you multiplie your increment (0,021333...) by 128, you have your "freq input" = 2.73.
In fact, 2.73 in freq input means 1Hz signal...
Test.axp (3.6 KB)
Yeah I managed to find out that 1hz is 2.73 by adjusting according to the regular saw lfo.
And by multiplying 2.73 with and ctrl/i with a value of one, you can adjust the frequency by 1 hz at a time. See you have set it up in another way. But this can only go faster that one hz, not slower. Need to sort this out in some way, so we can go slower too.
WOuld also be really nice to have a second value for finetuning hz in less increments than one . So we could adjust to 1.15 hz or 4.45 hz for example and not only whole frequencies like 1, 2, 5, 6etc.. This I havent figured out yet either.
Are you sure ? I think frequency input is a linear input.
Then, if you multiply by 0.273 (instead of 2.73), your "dial p" value means tenth of Hz, no ?
I am at work, I can't try this, sorry.
I think I only said the same as you did; that 1 hz is 2.73.
How can you set 0.273? Or even better, how can you set 0.0273?
A divide by 10 or divide by 100 would be a nice object to have I missed them a few times
what version are you using this with? currently trying to compile under OS X in 1.0.8 and am unable to use this.
pastebin: http://pastebin.com/g0NzfHPQ
@workerparasite303, I use a from source compiled version. "About" popup says : 1.0.6-2-g1d64bdc
I compiled this version in order to use "ubpatchname/tablename" syntax in another patch. But I don't use this syntax here...
Can you try this :
rockafella.axh (10.0 KB)
rockafella.axs (17.3 KB)
@jaffasplaffa, for 0.0273, I can't with "dial p" object or "*c" object. But it's possible to obtain good result with an increment of 0.027.
Test_2.axp (12.8 KB)
@JeromeB
Thanks for implementing the reverse into your patch and thanks for your effort explaining how to calculate all these values, it is really helpful!
I am able to calculate the LFO Frequency values that I need now thanks to this thread but I come to the same conclusion as Jaffasplaffa: I need to set the LFO more fine, otherwise my Sampleplayack is not in tune
Edit:
Just saw the Test_2 0.027 is not exact enough, my sample playback is slightly out of tune
Is there no way to calculate this properly?
1Hz corresponds to 2.730666 units for "lfo/saw lin"
You can actually type the value when a parameter knob is focused, just start typing the value and press enter to accept. The extra digits will not be shown but they will be used and saved.
Resolution vs. Specific Frequency