Page 1 of 1

Proposal for AudioFileProcessor

Posted: Fri Mar 21, 2014 7:47 am
by simple_impulse
Currently, if you load a sample to AudioFileProcessor, you can "play" it in different pitches. However, this changes the speed of playback, making it less useful. If it would maintain speed/tempo/(whatever is the right term?), it would give very effective new instrument to LMMS!

Currently AudioFileProcessor plugin or to sample_buffer.cpp have the code which could be changed. In SOX (another free, open tool) there is a file, bend.c which implements this kind of pitch shift, if I understand correctly. How this is best applied to LMMS, I don't know.

This would make sampling with LMMS *really* powerful and would give a cool new plaything. Any coders with couple of nights with nothing to do? :D

Re: Proposal for AudioFileProcessor

Posted: Mon Mar 24, 2014 7:31 pm
by zonkmachine
The way more advanced samplers work is by sampling multiple times so that the pitch is only shifted a couple of tones up/down. This is also the way SF2 works but you need a sample editor that can save in the .sf2 file format in order to create sounds as SF2 doesn't have an editor built in.

Re: Proposal for AudioFileProcessor

Posted: Mon Mar 24, 2014 8:12 pm
by simple_impulse
Because we don't have convenient SF2 editor available in Linux I suggest this could be still a worthwhile functionality with relatively small effort.

I tried some SF2 editors and they're very cumbersome. Also, often you have only one sample; then the end result is the same.

But this would make AudioFileProcessor very interesting. I'm not the only one with this idea, Musikbear kind of wanted this too in one of his videos...

I can assure that this would be popular among us novices, it would be so easy to use with current UI. :D

Re: Proposal for AudioFileProcessor

Posted: Mon Mar 24, 2014 8:35 pm
by zonkmachine
simple_impulse wrote:I tried some SF2 editors and they're very cumbersome. Also, often you have only one sample; then the end result is the same.
And that's my experience with hardware samplers too. If you want to make a good keyboard sample then prepare to record that keyboard, key for key, over and over again in different velocities.
Also, often you have only one sample; then the end result is the same.
Then you could generate a selection of new samples from the first sample with the help of that pitch shifter you're suggesting and use that as a base for the .sf2 .
I don't think the more advanced pitch shifting software/algorithms are for real time use so you would have to generate a multiple sample in the end and that still brings us back to a sample format like .sf2 .

Re: Proposal for AudioFileProcessor

Posted: Mon Mar 24, 2014 8:53 pm
by simple_impulse
If the way you suggest is to make SF2, then I definitely hope there would be command line tool for quickly generating a SF2 from one sample or small set of samples. With Swami or Polyphone it takes ages.

But how about if AudioFileProcessor would do it, say, three octaves, when you load the sample? I didn't think it was performance problem since it already *does* pitch shifting. But if it *is* performance problem, how about generating some sounds when the file is loaded? Memory consumption would be larger but would it be problematic?

I really think pitch shifting with C or C++ could be possible in real time but without proper test this is only assumption...

Well, this is only proposal, there *are* workarounds like automatically generating samples with SOX. But this could be elegant solution... :D