Jump to content

Frequent sample rate conversion


Recommended Posts

I searched for answers online including this forum. It looks like no one asked this question before. 

Is it normal that while previewing samples in Cakewalk, every single file has to be converted to project's sample rate just to be played within the browser ? I mean situation where I don't import any data to tracks. I'm only listening to sounds clicking in the browser. 

Since I came here after using Reaper, I'm confused. In Reaper I never had to deal with multiple sample rate conversions while browsing sounds. Browsing samples didn't even involve creating peak files. I'm wondering if this is the only way Cakewalk can deal with samples having eg. 44.1 kHz rate when my project is in 48 kHz. 

It wouldn't bother me as much if it was single sample rate conversion for each file. It is not. I can click on three samples in a row and then click them again in the same or different order and every time they are converted to project's sample rate. Applied conversion is always indicated by message displayed for a second instead of "Current Now Time" at the top. Of course each time this happens, new file is being written to hard drive in main "Audio Data" folder. 

One more thing - when I close Cakewalk after multiple sample preview without saving a project, "Sample rate conversion" appears multiple times for a few seconds in the window mentioned above. Is this normal ? 

I'm aware that in Reaper sample rate conversion also may be taking place, behind the scenes. However it never involves constant writing and overwriting files on the hard drive. 

I'd appreciate some feedback on the subject. 

Link to comment
Share on other sites

There are some subtleties to the whole sample rate process. The interface, CbB preferences, and the project sample rate need to match. It may seem like this is happening, but isn't. Also note that different audio interfaces can interact differently with the system (I don't know if you're using ASIO or Windows drivers).

I'm not an expert about this, but it appears that logically enough, CbB always prioritizes the project sample rate. For example, if I set my UA Apollo to 48 kHz and CbB preferences to 48 kHz, but then open a 44.1 kHz project (and note that the projects in the Start Screen have a native sample rate - click on the little circle with the 3 dots in the upper right to see details about the project), CbB will force the interface to 44.1 kHz. 

When you start a project by going File > New, you can choose the sample rate. If I do that and choose 48 kHz, then the Apollo stays at 48 kHz.

As far as conversions are concerned, again, CbB can handle any sample rate, bit depth, or any supported format you throw at it, and it gets converted when brought into the project. If you're bringing in a sample from, for example, a sample library that's at a different sample rate, the original file is NOT overwritten. You can verify this by looking at the line at the bottom of the browser that shows the selected file's rate, bit depth and duration. 

However, if you save the audio with the project (which I would recommend), then because it's a 48 kHz project, CbB will save the file you imported into the project in the project folder, at the project's sample rate. 

38 minutes ago, Michal Ochedowski said:

It wouldn't bother me as much if it was single sample rate conversion for each file. It is not. I can click on three samples in a row and then click them again in the same or different order and every time they are converted to project's sample rate.

Because the file in the browser is not being overwritten, it will remain at its unconverted sample rate. So yes, whenever you bring it into a project or audition it at the project's sample rate, it will need to sample rate convert. If you want to audition files at the project sample rate, then choose "Project Audio Folder" from the browser's drop-down menu. This will show the files in the project that you saved, which will have been converted.

Of course, you can also drag these into the project if you want. Giving the example of drum loops, suppose you bring three loops in from the browser to test how they sound and you like them, so you want to drag them in for several other section. You can keep dragging them in from the browser if you want, and they will sample rate convert. But if you save the project with audio, then you bring them in from the project's audio folder, they will already have been sample rate converted.

Hope this helps...

  • Like 1
Link to comment
Share on other sites

Craig, thank you for your answer. You have confirmed that it's a proper way of sample preview and frequent sample rate conversion is a normal thing. 

To clarify, I'm using dedicated ASIO driver for my external soundcard. It's set to 48 kHz, my projects are always in 48 kHz. My settings in Reaper are exactly the same. That's why I compared sample browsing in both DAWs. 

My biggest issue with how Cakewalk handles sample preview is frequent sample rate conversion and multiple files being written to hard drive. I didn't mean overwriting original samples. I meant newly created files in "Audio Data" folder for each sample I click in the Media browser. Sometimes when I click the same sample three or four times, this file is overwritten in the same place - "Audio Data" folder. After each click it gets a new number in brackets right after sample's name. Bare in mind I'm still referring to new project without any saved data. Just sample browsing.

I forgot to mention earlier that my main drive is SSD. All data involved with Cakewalk is handled by that drive. Repeated writing to SSD isn't exactly something good. That was main reason why I wanted to get someone else's opinion. I guess one of the workarounds will be changing "Audio Data" folder to directory on external hdd (regular magnetic type). 

Link to comment
Share on other sites

I think the conversion happens once per file and then stays in a memory cache. I believe we cache upto 16 previews after which it will import again.
The files are created whenever the source format is not native such as a different sample rate or a non wav file such as MP3.
The temp files should be destroyed when the project is closed.

Regarding the sample rate conversion popups on closing, thats some unintended stuff happening when closing the preview files. We can look into preventing that.

Link to comment
Share on other sites

Correction to my last post: I've just previewed some samples after opening Cakewalk. The numbers in brackets to which I referred to previously, represent summed up consecutive clicks for all previewed samples during current session. So they don't represent number of previews for each sample. They are summed up. Right now I'm at number "(87)". This means that I clicked 87 times on different samples since I started Cakewalk. It doesn't mean that I clicked on the same sample 87 times. 

I invite forum users to test it. 

- With "Audio Data" folder completely empty, open empty project in Cakewalk. 

- Preview eg. 10 samples in a row.

- Then click on them again in random order previewing each sample one more time. So it should give 20 previews all together. 

- Without closing Cakewalk go to "Audio Data" folder. Are there any files present ? Do they have numbers in brackets ? 

7 hours ago, Noel Borthwick said:

I think the conversion happens once per file and then stays in a memory cache. I believe we cache upto 16 previews after which it will import again.
The files are created whenever the source format is not native such as a different sample rate or a non wav file such as MP3.

This would be good. It's different in my case. It looks like each click causes sample rate conversion. It doesn't matter if I've already previewed particular sample or not. Sure sometimes new file is not being written for a while (eg. 4 or 5 previews), but it certainly is less than 16 previews before new file is written again. 

6 hours ago, Noel Borthwick said:

The temp files should be destroyed when the project is closed.

I can confirm that temp files are discarded when I close Cakewalk. Then "Audio Data" folder is indeed empty. I'm curious though, why these temp files are not being loaded into RAM memory. Instead they are written to disk. Noel, perhaps there is a setting I'm not aware of that will chanage this behaviour ? I've already tried switching ON Preferences/Audio/Sync and Caching: "Enable Read Caching" and "Enable Write Caching". Haven't noticed any changes. I keep them turned OFF. 

I can also confirm that those temp files are constantly being exchanged. That's what I meant by using word "overwritten" in my last post. For instance number of newly created files in "Audio Data" folder doesn't seem to exceed 10 files at any given time. Sometimes it's 5, sometimes it's 7 etc. It's only the sample names that are changed and consecutive numbers are being displayed in brackets next to each file. 

6 hours ago, Noel Borthwick said:

Regarding the sample rate conversion popups on closing, thats some unintended stuff happening when closing the preview files. We can look into preventing that.

Perhaps this might help. After previewing a bunch of samples, before I closed Cakewalk I checked "Audio Data" folder. I had three files left. When I closed program I noticed "Sample rate conversion" message being displayed very briefly, three times. So it looks like Cakewalk is also performing sample rate conversion prior to closing. I have no idea why though. Temp files are going to be deleted anyway. Bare in mind, during my tests I didn't have any files imported into session. 

Link to comment
Share on other sites

Can someone check on their machine what I proposed in my last post ? 

On 4/28/2019 at 6:08 AM, Michal Ochedowski said:

I invite forum users to test it. 

- With "Audio Data" folder completely empty, open empty project in Cakewalk. 

- Preview eg. 10 samples in a row.

- Then click on them again in random order previewing each sample one more time. So it should give 20 previews all together. 

- Without closing Cakewalk go to "Audio Data" folder. Are there any files present ? Do they have numbers in brackets ? 

I'm still waiting for additional response. 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...