[Audio] New! Time-stretching and sample-stretching

MusE is a MIDI/Audio sequencer with recording and editing capabilities, aiming to be a complete multitrack virtual studio for Linux. https://muse-sequencer.org/

Moderators: khz, MattKingUSA, spamatica

Tim E. Real
Established Member
Posts: 325
Joined: Sat Sep 15, 2012 12:36 am

[Audio] New! Time-stretching and sample-stretching

Postby Tim E. Real » Wed Jan 01, 2020 11:07 am

Happy new year everyone. I've merged my time-stretching branch into git master, after a very long wait.

It automatically installs live sample rate converters when importing audio files at any sample rate.
It automatically works when loading a project with a sample rate different than the system sample rate.
It allows you to further modify the samplerate map, per wave, using special markers.
It allows you to also stretch or squish the audio without changing pitch, using special markers.

There is much more to be done. Pitch. Part stretching. Tempo etc. Ultimately Wave Parts would be allowed to be in
units of BBTs instead of frames. That means the wave parts would stay where they are just like midi parts, when tempo is changed.

I needed to get this out of the eight-year-old branch and into master. Merging from master all the time was a nightmare.
Anyway try 'er out. I'm sure there will be questions and possible angry pitchfork and torch waving mobs. Cheers.

Here you see the two types of 'stretch' markers along with two new tool buttons :
wave ed audio convert 1.jpg


Here you see the default global settings. Note that each wave has it's own local override settings,
accessible via right-click context menu in the Wave Editor:
wave ed audio convert settings 1.jpg
You do not have the required permissions to view the files attached to this post.

Tim E. Real
Established Member
Posts: 325
Joined: Sat Sep 15, 2012 12:36 am

Re: [Audio] New! Time-stretching and sample-stretching

Postby Tim E. Real » Wed Jan 01, 2020 11:33 am

Some further info:
Install RubberBand developer packages or build it, of course.

My system uses a custom streaming 'plugin' system.
Each of the SRC, RubberBand, and Zita converters you see in the list above is an actual plugin dynamic .so library.
The ones shown need not be the only ones listed. More can be made.
Plugins are 'discoverable' by MusE at startup.

My goal with that was to be ready to relatively easily support other types of conversion libraries.
Especially high-quality commercial libraries. I have been looking a few for some time.
I made a well-defined framework and API and completely isolated and separate dynamic library system,
rather than directly embedding support for each library right into the core code.

Tim E. Real
Established Member
Posts: 325
Joined: Sat Sep 15, 2012 12:36 am

Re: [Audio] New! Time-stretching and sample-stretching

Postby Tim E. Real » Wed Jan 01, 2020 5:47 pm

Did you know:

Before these fixes, if you run the audio system at a sample rate other than 44100Hz,
the metronome's fixed 44100Hz audio samples are not correct ! Try it, at say 96000Hz and see for yourself.

With these fixes, the metronome samples are automatically converted once at startup, or when changing the sample sounds,
and they sound correct at any system sample rate.

Tim E. Real
Established Member
Posts: 325
Joined: Sat Sep 15, 2012 12:36 am

Re: [Audio] New! Time-stretching and sample-stretching

Postby Tim E. Real » Wed Jan 01, 2020 10:58 pm

How to use the new markers:

The two types of markers are placed and manipulated by selecting one of the two new tool buttons: Time-stretch and samplerate-stretch.
One stretches the audio without changing pitch, and the other alters samplerate which stretches AND changes pitch.
(A separate pitch-shift control which does not stretch is coming...)
Both types of markers are allowed at once on the canvas. To manipulate (select, move, del etc) each marker type,
the corresponding tool button for that marker type must be engaged.

To delete a marker select it and press the Del key.

You can place one marker and move it around, but you'll notice that all the content to the left and right
of the marker squishes or stretches.
So usually, to repair or work with a small portion of the audio for example, you'll want three stretch markers.
First, place a stretch marker to the left and the right of the desired portion, and don't touch them - don't move them,
otherwise content to the left and right of these two markers will change and you don't want that.
Then, place a third stretch marker somewhere between the two left and right markers.
You will manipulate and move this third marker left or right so that only audio between the left and right markers changes.

It offers a way to correct mis-timed passages smoothly instead of cut-and-paste which could cause a 'click' in the sound.

oscillator
Established Member
Posts: 73
Joined: Sat Jan 17, 2015 6:07 pm

Re: [Audio] New! Time-stretching and sample-stretching

Postby oscillator » Thu Jan 02, 2020 12:48 am

Cool! Thanks a lot Tim!


Return to “MusE Sequencer”

Who is online

Users browsing this forum: No registered users and 1 guest