Reverse Audio in Tables


#7

Its an interesting topic... keeping time when changing pitch (or lengthening sample without changing pitch)

I'll put this here for now ... time-scaling/pitch modification wikipedia - the link to Steven Bernsees work is particular useful.


#8

Nice, thanks :smile: Looks really good. will dive into it :smile:


#9

Regarding phasor+table/read usage for timestretching etc I guess you can find some solutions here:
https://sebiik.github.io/community.axoloti.com.backup/t/solved-pd-sampler-rockafella-example-on-axoloti/


#10

Thanks :smile: will look into it. Got a few other ideas i need to explore too regarding the time stretch :smile:


#11

Ok thanks for all the replies guys!

@kausto
I am going to check out your patches, looks interesting. But I personnaly don't need to have timestretching, I just want to record a sample, and retrigger a certain part of that sample that I can choose and independant from that have control over pitch and playdirection. So it's not about changing the lenght of the sample (timestretching) but ajdusting the window you play of that sample.

@jaffasplaffa
I think pitching down the sound into recognizable lenght is not possible for me since I want to record the samples live.
For me it would be great then to just fuse the table/read and table/play into one object that just does it all, with a reverse button :smile:


#12

Yes it is not a desirable effect :smile:

+10 :smile:


#13

You can do this with Pos dial


#14

Yes I am aware of that. My point was more that table read and table play are some how similiar but have different options and it would be great to have all the options in one object.


#15

Sorry for high jacking your thread and turn it into time stretch instead of reverse talk...Anyway, the stretching is important to be able to to what you want to do... You have to have independent control over pitch and time :smile:


#16

I can understand this desire, but much of axoloti is built on the idea that you are given lower level components so that you can build things in different ways. (and we also need to be careful not to duplicate code which causes maintenance nightmares long term)

combine such objects is probably best done using subpatches, of course, the 'issue' at the moment is all users have to do this, or find a patch on the forum that does it... this will cease to be a problem once we have the 'User Library', so these higher level objects can be shared betweens users. watch this space :wink:


#17

The reason to have them separate is numeric precision.
Using a "generic" audio-rate phasor oscillator to play a long wave will not have enough precision.

This is also an issue in pd and the 32bit version of max, if you address a table longer than 16777216 samples it can't be addressed at single sample-resolution...


#18

Yes that sounds pretty reasonable. But I would still be really happy for a reverse button, since it doesn't seem I could achieve this by patching other objects.

No problem, I think I have read about this problem while doing research in this forum.
Still I am not sure what timestretching would mean for me. I am quite happy the way the table/play object worked for me, since I could trigger it from a sequencer. The only thing I wanted to add is reverse. And I don't want the samples to be timestretched either.


#19

I am just telling you to do what you want to do, using regular tables as they are now, I think it is necessary to split pitch and time.... Caue you need to reverse the time.... and not the pitch... cause when you reverse both time and pitch(that is what happens when you invert the phasor) you end up with the low pitched grainy unrecognisable thingy we talked about being undesirable earlier.

The stretching would just be a fun biproduct of it :smile:

But I think what you want to do is possible... We just need to explore Axoloti more :smile:


#20

@jaffasplaffa
Ok I am getting closer to understand what you mean.
But I had this high pitched unrecognizable sounds also when not reversing the phasor. I was realising that I could get closer to the original pitch by turning the phasors frequency down, but finally it lacked the resolution to tune it to the original pitch.

But afterall exploring Axoloti sounds like a good Idea! I am amazed already about all the things you can do with it. Especially the fact that all the ingredients of modular synthesis are there makes it really nice to start with.


#21

Yeah me too. We will find out how to soon, I am sure :smile:


#22

Ok guys, I figured out how to reverse the playback but I am still having problems in driving the table input properly.

So first of all I want to summup what I want to achieve with this:
I want to create some kind of sampler/looper with live input. So I press a button, as long as the button is pressed live input ist being sampled and then retriggered by sequenced midi notes (or a sel sequ in axoloti).
I want to the playback of the samples to be either normal or in reverse. The recording and retriggering part was no problem so far.

I am struggling now with the phasor and reverse playback. So just to make sure I got it right:
The phasor reads through the table in audio samples (in samplerate), it should be a linear rising ramp that should go from 0 (start of the sample) to whatever value the samples ends.

With reverse playback it should start at the value the sample ends end go down all to zero.

Retriggering means retriggering this ramp.

Here are my two aproaches:

This is from Mood Organs looper. I realised that it reads length of the recording with a timer and then outputs a ramp between 0 and the end of the sample, just perfect for what I need. But how do I retrigger this?


SimpleLooperReverse.axp (8.5 KB)

This is a different aproach. Problem here is the lfo reads through the whole table instead of just the recorded part. For reverse this means it starts at the very end of the table rather then the end of the recording.
I would need to read the value where the recording stops (how long the sample is) and tell the lfo to just go to that value in forwards playback or to start at that value for reverse playback.


Reverse Try.axp (8.6 KB)


#23

Try by adding an offset for the inverted signal. Add a math/+ object, connect the inverter to math+ AND connect a dial with a value of 64. I think this might help. Like this:

Use the scope to see exactly where the lfo is positioned in the table.

Well, this is a bit a harder, since you dont know how long you exactly recorded. If yuo know how long you record, it shouldnt be a n issue.


#24

Thanks for the suggestions, I think JeromeB did something similiar in the Rockafella update he just posted.

I measured the recording time with a time and used this as offset. (I had to multiply it by two, no Idea why).

This seems to do the trick. The only thing I realized is that for my patch it is more musical if the starting point for the reverse sample somehow refers to the rhythm I'm sequencing with. So for example If the sequence input is a quarter note pulse, I want the reverse sound to start after one quarter note. So I need to measure the sequencer input rather then the recording input.


#25

would you mind sharing the code that you're using in your one_liner object?


#26

actually I just copied the code from Mood_Organ's looper patch in this thread;