Single cycle waveforms exported from serum don't import correctly in serum again?

Started by Projektor

Projektor

I'm working on a project where I need single cycle waveforms from a wavetable, serum has a handy feature where you can export single cycles of a wavetable under "Export" in the wavetable editor. However the cycles aren't the same if I import them again. each .wav file is exactly 2048 samples long so I assumed it would just take the waveform and use it as a single cycle but it seems to use the FFT256 import algorithm. I don't want this, the cycle that gets exported should also be imported in the same way.

What might I be doing wrong?

I have other single cycle waveforms also 2048 samples long .wav files and they import as expected (waveform from .wav becomes the single cycle table I want without changing shape at all)

steve_xfer

You can drag single-cycle waveforms to the thumbnail area in the WT editor to import them as single-cycle. Or you could type 2048 in the formula and drag it in to the main waveform area of the WT editor.

Projektor

Hello steve,

Thanks for the reply. I should have been a bit more specific maybe, I'm going to distribute these cycles to other people, kinda like a wavetable pack but as just single cycles. As I said I have other cycles too which were from my first pack I distributed and none of those had any issues importing normally (as in the waveform is transfered 1 to 1 from the cycle). I'd like to be able to import them in the standard way of having the pack in the tables folder and being able to browse them like any other wavetable pack. Surely there is some property or metadata for the files it imports to tell serum that it should just be imported 1 to 1 without any of the import algorithms being used, right?

I don't think there is a way for me to attach files here so I can't really send you the example of what is happening. Maybe there is a different way I can show what's going on?

Thanks

Projektor

I was able to fix the issue, the wav files are missing "clm 0���<!>2048 00000000 wavetable (www.xferrecords.com)" from the .wav file right before the data starts.

I wrote some C# code to fix that:

using System.Runtime.InteropServices;

String path = "ABSOLUTE_PATH_TO_FILES";

var files = Directory.EnumerateFiles(path);

foreach(var file in files ){ 
    byte[] data = File.ReadAllBytes(file);

    string hex = BitConverter.ToString(data).Replace("-", string.Empty);

    String hex1 = hex.Substring(0, 144);
    string insert = "636C6D20300000003C213E3230343820303030303030303020776176657461626C6520287777772E786665727265636F7264732E636F6D29";
    String hex2 = hex.Substring(144);

    byte[] dataFinal = StringToByteArray(hex1 + insert + hex2);
    Console.WriteLine("writing to: " + file);
    File.WriteAllBytes(file, dataFinal);
}


static byte[] StringToByteArray(string hex)
{
    return Enumerable.Range(0, hex.Length)
                     .Where(x => x % 2 == 0)
                     .Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
                     .ToArray();
}