Login

Converting sample rate of program outside of NAT

Tips & tricks, working results, technical support

Converting sample rate of program outside of NAT

Postby Cupwise » Thu Jun 23, 2011 12:48 am

ok, so i was just asked about how i've done this, and i wondered if anyone else would find this useful, so i've decided to post a step by step of what i came up with to do this. maybe someone will even know of a way to make it less tedious.

To convert my sets of programs with SoX, the first roadblock I had to deal with is the fact that NAT makes different tone sweeps depending on which rate you select before generating the sweep. So say for example you sampled something in 96khz originally, and now want a 44.1k version. You can't just resample the tone sweep and change the NAT session to 44.1k, because it won't match up with what NAT will expect.

To get around this, I resampled all of the impulses generated by NAT (when you create the programs at 96k). This can be a lot of files, and they will be in more than one folder (if you have more kernels than just 1). So, now the problem is finding a quick way of dealing with a batrillion files (maybe thousands or tens of thousands).

IF you don't want to lose the originals for whatever reason, well your first step should be to create copies of all of the directories with all of these files in them, and all of this procedure can be performed on the copies.

In windows you can just use windows explorer's search function (make sure to check 'search in sub-directories'), search for *.wav starting in the root folder which all of your impulse folders exist inside of. Now you need foobar with the SoX sample rate plug-in (google search turns it up). Now you just drag and drop all of the found files into foobar. You might also snag your tone sweeps or other .wavs depending on where you are on your hard drive, when you did the search. If so, you could try re-organizing the found wavs by size or whatever way is best to let you grab all of the ones you need to drag to foobar.

Now with the files in foobar, you set up the conversion plug-in to desired settings, and run it. Now the problem I've had here is that SoX doesn't seem to let you overwrite the original file (which is probably for the better/safer), so when setting up the sox plug-in, in one section you have to set up the output name scheme. I just tack a couple characters to the end of the filename, like '77' for example. so now all the files are *77.wav.

Now the problem is renaming all of those files to remove the '77'. I've been using a program called 'bulk rename utility' which takes a second or two to figure out but is pretty cool. it has a search feature built in which can check sub-directories. before you can rename the files, you need to get rid of the originals. so if you still have your explorer search window open (the one you dragged the files from to go to sox), with the files still shown, just delete them (unless you want/need them for some reason and haven't backed them up!).

Now, in bulk renamer, navigate to the 'root' directory that all of the impulses are in, and search *77.wav (with search in sub-folders checked). then select all. then go to the 'remove' section and under 'words' enter '77'. then hit 'rename'.

That's it! now you can just use those impulses by placing the folders containing them in the 'vectors' folder Nebula checks, and the .xml files generated by NAT go in the 'programs' folder. In Nat you an 'crypt' those programs to turn into n2p/n2v. you can rename the .xml files first though, to determine the name of the n2p/n2v made (like adding '44' somewhere).

My testing hasn't turned up any issue with this so hopefully there isn't any. The programs seem very close to the 96k versions. I might have left a step or two out, or got something a little wrong because I'm going by memory here, but it should be close.

-tim
Cupwise
Expert
Expert
 
Posts: 773
Joined: Tue Nov 23, 2010 2:03 am

Re: Converting sample rate of program outside of NAT

Postby rhythminmind » Thu Jun 23, 2011 2:47 am

Thanks for detailed write-up of your method. Good info.
It's been awhile but I'm not sure people without access to natbeta get the impulse folder...?
One thing I do find easier, is to edit the file/path in the .xml rather then batch rename files. Just my preference.
"Any experiment of interest in life will be carried out at your own expense." http://rhythminmind.net - http://signaltonoize.com - http://popsound.com
User avatar
rhythminmind
Member
Member
 
Posts: 310
Joined: Sun May 16, 2010 10:12 pm
Location: New England Transplant to Los Angeles

Re: Converting sample rate of program outside of NAT

Postby giancarlo » Thu Jun 23, 2011 6:04 am

yes it's only for library developers, correct.They have the original uncrypted version
User avatar
giancarlo
Founder
Founder
 
Posts: 9160
Joined: Mon Sep 21, 2009 10:40 pm
Location: Italy

Re: Converting sample rate of program outside of NAT

Postby Cupwise » Thu Jun 23, 2011 6:48 am

aha. i considered putting this in the beta forum, maybe it would be better over there?
Cupwise
Expert
Expert
 
Posts: 773
Joined: Tue Nov 23, 2010 2:03 am


Return to Working with Nat

Who is online

Users browsing this forum: No registered users and 4 guests