Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / PitchShift dll - How can I just make a sample loop ?

Author
Message
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 31st Aug 2005 18:38
Hello everybody !
I'm programming a dll for dbpro to get advanced wav editing functions. I've made a pitch FX (applied to the wav datas, without changing speed), and I'm working on a pitch shift (wich can help me to get a time stretch too !).
But I have a problem: I need to make a sample of 100 milli-seconds (wich is not looping) to loop. (without changing it's length by using a crossfade loop based on zero points for example).
Is there a good way to do that ?
(fades kill the sample because it is too short)
Thanks

L'âme est cachée dans le monde complémentaire nommé le vide !
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 31st Aug 2005 20:44
Theorerically yes with the right tools (ie. a better wave editor). That depends on the sample, though.


Play Nice! Play Basic! Version 1.088
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 31st Aug 2005 21:14
The problem is that I must make my on C++ software to do this loop...
If someone know where I can find the theory or a source code... I'm ready to finish this dll !

L'âme est cachée dans le monde complémentaire nommé le vide !
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 31st Aug 2005 22:34
Ah, now I get it. You want to write a DLL for that. The easiest form of cross-fading is gradually levelling the amplitudes of the last samples towards the amplitude of the first sample.

Pseudo code:


This example shows a linear crossfading which is (most of the time) not the best solution. Proportional calculations may have better results.
Another approach is to take "both ends" and level them towards each other. While that may cause fewer audio artifacts (again that depends on the material), the first solution will sound better with sounds that have a dominant attack phase.


Play Nice! Play Basic! Version 1.088
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 31st Aug 2005 23:11
Mmmm, I've even tried that but the sample is too short (100ms) and crossfade make a noise. But I've found the solution : If I can't touch volumes, I touch frequency, so, I'm making a system to detect zero points and apply a pitch from an area starting to zero point, to the starting area. And I do the same thing to the end of the sample and I get 2 zero points à the left and right without killing the signal.
Thanks a lot

L'âme est cachée dans le monde complémentaire nommé le vide !
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 31st Aug 2005 23:20
Cool, sounds good.


Play Nice! Play Basic! Version 1.088
XANAX 2B
20
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 1st Sep 2005 13:08
I've done the program and it's a little better. (Look at the screen capture on this post)
I have now to "round" the pitched part of the sample. Is there a solution ?
I heard about interpolation, is it a possibility ?

L'âme est cachée dans le monde complémentaire nommé le vide !

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-05-06 02:22:58
Your offset time is: 2024-05-06 02:22:58