Kyma Forum
  Tips & Techniques
  batch process waveforms (Page 1)

Post New Topic  Post A Reply
profile | register | preferences | faq | search


This topic is 2 pages long:   1  2 
next newest topic | next oldest topic
Author Topic:   batch process waveforms
keph
Member
posted 20 October 2010 22:38         Edit/Delete Message   Reply w/Quote

Is there a way to batch process files with the Kyma sound editor?

I have several thousand single cycle waveforms that I'd like to convert to the kyma standard of 4096 samples in length. The interpolation feature of the sound editor is very helpful for this but I'd rather not do them one at a time.

If not in Kyma, any tips on another application? I have DSP Quattro and Soundtrack Pro but using the normal time stretch algorithms do not product desirable results (no surprise there).

IP: Logged

robertjarvis
Member
posted 21 October 2010 04:36         Edit/Delete Message   Reply w/Quote
http://www.symbolicsound.com/cgi-bin/bin/view/Share/Sounds#Batch_Processing


IP: Logged

keph
Member
posted 21 October 2010 08:42         Edit/Delete Message   Reply w/Quote
thanks!

this works with kyma sounds, but it doesn't look like it works with the sound editor.

looks like i'll be building a kyma sound involving the waveshaper to turn one set of short waveforms into 4096 sample length waveforms. i may be returning here for some help on that since my scripting skills are limited (at best).

IP: Logged

keph
Member
posted 21 October 2010 10:53         Edit/Delete Message   Reply w/Quote

wavetable_builder.kym

 
The attached file works pretty well but I am running into a little discontinuity at tail end of the file. Looks like the last 6-8 samples.

The problem, I think, is the resolution of the fullramp wavetable @ 4096 samples loop driving the oscillator, perhaps also combined with the overall short file size we are going for. If you look at the fullramp wavetable, it seems to get to zero at around 12 samples left.

What is interesting is that this seems to provides less artifacts in the waveform than using the sample editor interpolation on the default settings, though the sample editor handles the end of the files better.

Any tips on modifying the sound help deal with the tail end of the file. What I'd really like to use is a sample accurate full ramp (like 1 fullRamp: 4096 samp) but that isn't possible it seems.

Feature request there: sample accurate capytalk especially for the ramp / function of time messages. Perhaps done with a modifier so you can opt in when you want to use the higher processing rate.

If the discontinuities at the end are unavoidable, then I can just do a fade batch process post kyma processing.


[This message has been edited by keph (edited 21 October 2010).]

IP: Logged

SSC
Administrator
posted 21 October 2010 19:19         Edit/Delete Message   Reply w/Quote
That sounds pretty useful; I'm going to try to write a Tool to do this and will post it if it seems to work well.

IP: Logged

keph
Member
posted 27 October 2010 10:27         Edit/Delete Message   Reply w/Quote

A tool would be fantastic. I promise to use it for good and not for evil. I'll post up a new and improved version of my wavetable library along with a few wavetable synth examples.

The script example works 98% (4088 of 4096 samples) well but I'd really love to sort out the issues I described above.

IP: Logged

CharlieNorton
Member
posted 12 November 2010 09:53         Edit/Delete Message   Reply w/Quote
I am currently recording the wavetables from an Ensoniq Fizmo.
It has been off and on for a week or two now.
It is quite time consuming. (inspired by the analogue waveforms on the Tweaky)

When I eventually complete this task, (hopefully before the chap demands I return his instrument) I will post the result for you to add to your libraries.

Would we prefer a whole directory of single cycles, or should I do them in blocks of Ten for easy traversal?

I do like the 'Surbiton' technique, however I have not needed PWM yet. Did no one try a reduced buffer size to reduce this problem yet? (If I have understood the concepts along the way there)

IP: Logged

keph
Member
posted 12 November 2010 12:15         Edit/Delete Message   Reply w/Quote

I'd be interested in the results Charlie. I tend to keep a folder with all of the individual samples + one combined sample so that it can more easily used as a wavetable when desired.

Not sure I understood your suggestion. The issue isn't really around the 'Surbiton' technique but how to take samples that are 600 samples long (for example) can convert them to 4096 in length. Along the way, I ran into the limitations of wavetable resolution, interpolation, and capytalk only running at 1000 hz. The one thing I didn't try yet is creating a fullramp wavetable that has a higher resolution, I started down that path and then stopped for some reason. It may have been because I couldn't figure out how to make a perfect fullramp wavetable 65536 samples long, for example, with the tools at the time.

IP: Logged

CharlieNorton
Member
posted 13 November 2010 11:28         Edit/Delete Message   Reply w/Quote
Ahh Yes you see, I have been soaking the information up on this topic from a variety of sources.

I thought there where limitations within the Surbiton Technique, one of which effectively reduces the ability to create PWM due to the size of each buffer/chunk, I thought I had read somewhere (a Pete post possibly ) that a theoretical fix to this issue would be to use a smaller chunk size to reduce this problem. (stepping across the width/harmonics I assume)

However I could be making it all up/ fused bits of random information together.

(I think I have started to dream about kyma sounds, not sure if this is a good or bad thing ;D)

On the actual wavetable topic, I also have access to a Dave Smith Evolver, Waldorf: Q + Microwave. (What am I getting myself into here?) Dammit.

Does it matter which sample rate they are at? ( the ones I have are 22, yet I am doing them at 44.1, if I want to use these oscillators in a high SR Sound do i need to re-encode them?

I am sure I could work that out, yet it seems to be hurting my brain to think about it. I guess my thinking says that they potentially could play at the wrong rate, but then I am conflicted by the concept that one cycle is 4096 samples, and therefore is a known quantity thus one cycle is the same length no matter what the sample rate.

Ok I just went full circle. Lol


IP: Logged

keph
Member
posted 14 November 2010 11:36         Edit/Delete Message   Reply w/Quote

Ah, yeah, you couldn't do PWM in the source wavetable well with that technique, however, that never really occurred to me to need since the pulse generator prototype already is bandlimited.

For the wavetables, I don't think it matter what the sample rate is. I think the files are used as shaping function against and index that sets the frequency. If you look, you'll see that standard ones in Kyma have the header of 22.5k @ 24-bit. Mine are either 22.5k or 44.1k, 16-bit.

IP: Logged

pete
Member
posted 14 November 2010 14:10         Edit/Delete Message   Reply w/Quote
Hi Charlie

Yes your memory serves you correct.

With the Surbiton there are two rates involved. The rate the buffer is filled (every 4096 samples) and the rate it is read (the output frequency of the Oscillator. If you have wave tables that are not 4096 sample you can adjust the rate of the first player (the Osc/SamplePlayer playing into the buffer) so that it exactly produces a repeating wave for with a period of 4096 samples (using interpolate). This will still be alias free as the first oscillator or looped sample player will repeat at an exact sub devision of the sample rate.


The problem with the PWM was that the buffer input was only being updated once every 4096 samples and the PWM you was generating mathematically was only getting changed at that rate, hence steps. This is what could be improved by using a shorted buffer size as the update would happen more often.

The problem you have now is more fundamental as you are using samples and not calculated wave forms. As PWM is a changing waveform you cannot record it as a single cycle. You need to first decide how to get round this problem,

1) Record a series of cycles (how many are needed?)
2) Record one cycle (squarish) and deform that cycle in time,
3) Use a recorded sawtooth and do the invert delay trick to derive the PWM.

Then you can see if the Surbiton could be changed to accommodate the PWM generator.

Hope this makes sense.

Pete

IP: Logged

pete
Member
posted 14 November 2010 15:51         Edit/Delete Message   Reply w/Quote
Hi Charlie

Yes your memory serves you correct.

With the Surbiton there are two rates involved. The rate the buffer is filled (every 4096 samples) and the rate it is read (the output frequency of the Oscillator. If you have wave tables that are not 4096 sample you can adjust the rate of the first player (the Osc/SamplePlayer playing into the buffer) so that it exactly produces a repeating wave for with a period of 4096 samples (using interpolate). This will still be alias free as the first oscillator or looped sample player will repeat at an exact sub devision of the sample rate.


The problem with the PWM was that the buffer input was only being updated once every 4096 samples and the PWM you was generating mathematically was only getting changed at that rate, hence steps. This is what could be improved by using a shorted buffer size as the update would happen more often.

The problem you have now is more fundamental as you are using samples and not calculated wave forms. As PWM is a changing waveform you cannot record it as a single cycle. You need to first decide how to get round this problem,

1) Record a series of cycles (how many are needed?)
2) Record one cycle (squarish) and deform that cycle in time,
3) Use a recorded sawtooth and do the invert delay trick to derive the PWM.

Then you can see if the Surbiton could be changed to accommodate the PWM generator.

Hope this makes sense.

Pete

IP: Logged

SamuelSacher
Member
posted 29 February 2012 10:00         Edit/Delete Message   Reply w/Quote
Hi!

when I use "4096 Wavetable Builder" Kyma declares the resulting files as damaged ...
I open them in a external wave editor, re-save, and then they are o.k., 4096 samp long and all ...
of course, to much work for each sample ...
I'm considering to buy Galbanum's "Architecture Waveforms 2010" with around 25.000 waveforms, so batch processor would be essential ..
thnx

s

IP: Logged

cristian_vogel
Member
posted 29 February 2012 10:14         Edit/Delete Message   Reply w/Quote
I was checking that Architecture Waveforms 2010 .. interesting for Kyma certainly.

So their demo waveforms are 2048 samples long, rather than the Kyma favoured 4096 samples. Is that the problem?


IP: Logged

SSC
Administrator
posted 29 February 2012 10:48         Edit/Delete Message   Reply w/Quote
Remember that SpectrumFromSingleCycle can take any length waveform as its cycle input. Then you could use additive synthesis to recreate the signal.

IP: Logged

SamuelSacher
Member
posted 29 February 2012 11:25         Edit/Delete Message   Reply w/Quote
o.k. I tried "Broken Chi" from Architecture Waveforms 2010 demo, both original and converted to 4096, and I don't hear any differences (in CloudBank ..)
+ what SSC have suggested
I guess I have all available answers...

thnx you for help!

s

IP: Logged

cristian_vogel
Member
posted 01 March 2012 06:39         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by SSC:
Remember that SpectrumFromSingleCycle can take any length waveform as its cycle input. Then you could use additive synthesis to recreate the signal.

Aliasing and Quantising problems taken care of that way, I believe? Even better!


I was testing the demo waveforms from that pack in SpectrumFromSingleCycle, and seems that they need to be 16bit to work?

You can use Max to batch convert to 16 bit PCM (or anything else!)
http://sbooth.org/Max/

[This message has been edited by cristian_vogel (edited 01 March 2012).]

IP: Logged

SamuelSacher
Member
posted 01 March 2012 10:18         Edit/Delete Message   Reply w/Quote
thnx for suggestions!
any ideas what's wrong with "4096 Wavetable Builder"?
s

IP: Logged

SSC
Administrator
posted 01 March 2012 10:47         Edit/Delete Message   Reply w/Quote
I just tested SpectrumFromSingleCycle with a 24-bit waveform and it seems that 24-bit files work. What formats were you trying to use?

(And yes, by using SpectrumFromSingleCycle-->OscillatorBank you automatically avoid aliasing! Plus you can use the spectrum as an input to any of the other AggregateSynthesis banks such as FormantBank, CloudBank, FilterBank, for some new kinds of synthesis!)

[This message has been edited by SSC (edited 01 March 2012).]

IP: Logged

cristian_vogel
Member
posted 01 March 2012 12:32         Edit/Delete Message   Reply w/Quote

BrokenChi.wav

 
This is one of the waveforms I was testing it with... looks like a PCM24 wav. I get an error about a block closure or some such...

IP: Logged

ChristianSchloesser
Member
posted 03 March 2012 12:02         Edit/Delete Message   Reply w/Quote

___SingleCycleWaveBuilder.kym

 
quote:
Originally posted by keph:

A tool would be fantastic. I promise to use it for good and not for evil. I'll post up a new and improved version of my wavetable library along with a few wavetable synth examples.

The script example works 98% (4088 of 4096 samples) well but I'd really love to sort out the issues I described above.


Here comes a new version which does the job of creating the 4096 cyles upto 100% ;-)
It seams that the interpolation of the Waveshaper towards the end of the wavecycle does not work like we both thought it would.

Anyway this version has a bug in disk I/O ...i could not fix.

If i convert more then 8-10 singleCycle waveforms... the files get currupted ... maybe SSC has an idea for a better "recording to disk script".

Anyway... it works now if you just use a bunch of files ... and the resulting waveforms does look much better then with any other tool i tried.

If we could only solve the disk input output problem!?
Maybe it is possible to use recursion in smalltalk to go through a hierarchy of sub-directories and convert them one file by file?

Maybe SSC knows..

Have a nice day
Chris

p.s: i posted a solution with the use of the command line tool "sox" today in the morning. It turns out that sox had a similar problem then any other tools i used to convert the waveforms (including kymas own sample editor).
But the "kyma sound way" is the most successful and promising yet and i deleted my previous posts.

[This message has been edited by ChristianSchloesser (edited 03 March 2012).]

IP: Logged

ChristianSchloesser
Member
posted 03 March 2012 12:35         Edit/Delete Message   Reply w/Quote

Waveform_Images.zip

 
To show the problem of artifacts(pre/post impulse responses) introduced by interpolation with the a Sample Editor i attached 3 Images.

1 - Orginal 2048 samples
2 - Kyma Sampleditor interpolatied from 2048 to 4096
3 - Waveform converted/created by the Kyma Sound from my previous post.

All the best
Chris



IP: Logged

SamuelSacher
Member
posted 03 March 2012 14:19         Edit/Delete Message   Reply w/Quote
it appears that "25 waveforms at a time" is a limit ...
after that just a flat line, or corrupted file ...
so in "galbanum" case, 1000+ such operations are in order
while experimenting, I got "Firewire...lost...connection...reset...error (2)...something" notice 2x
I've send a email to "galbanum" promising that I'll buy Kyma format edition of Architecture 2010 if they make one ...

IP: Logged

SSC
Administrator
posted 03 March 2012 17:35         Edit/Delete Message   Reply w/Quote

convert2048to4096.kym

 
Here's a batch processing Sound you can play around with; it uses SpectrumFromSingleCycle and resynthesis to regenerate single cycle wavetables of any length and record them into 4096 sample long files. (It won't maintain the same phases and it does some band-limiting, so the waveshapes won't be visually identically, just identical to the ear).

(But seriously, you guys could be selling waveforms to them

[This message has been edited by SSC (edited 03 March 2012).]

IP: Logged

SamuelSacher
Member
posted 04 March 2012 12:33         Edit/Delete Message   Reply w/Quote
Thank you SSC!

IP: Logged

SamuelSacher
Member
posted 04 March 2012 16:11         Edit/Delete Message   Reply w/Quote
ahhhhh

still getting 0 sampl files, after a 20 transformed waveforms or so ...


IP: Logged

SSC
Administrator
posted 04 March 2012 19:05         Edit/Delete Message   Reply w/Quote

convert2048to4096v2.kym

 
It may be that there are too many simultaneous recordings for your combination of Paca and audio interface to handle.

See if the following works for you: open the DSP Status window and choose Halt from the Control drop down menu. Then try playing the interpolation Sound. When it completes, reselect your audio and MIDI interfaces from the drop down menus in the DSP Status window.

Also, we've attached an updated version of the file that has an alternate implementation that will perform linear interpolation rather than band-limited interpolation. The waveforms produced with the alternate implementation maintain the visual shape of the originals.

IP: Logged

SamuelSacher
Member
posted 05 March 2012 09:25         Edit/Delete Message   Reply w/Quote
Hi!

well, this is strange ...

i tried "Idle DSP" way and ...
I got satisfactory results (all waveforms in a folder (of 60 waveforms) converted to 4096) only when I START Mac-Paca-Kyma chain (Mac also! it does not help if I restart just Paca/Kyma!)
if I then try to do process again, with another folder, most of the resulting files are corrupted or 0 samples - but not all, some are converted (the number of successful conversions is different every time!)

so, I must switch everything (again, computer included) of, and re-start

in pref "Memory size for Kyma" is set to 128 mb

maybe you can make something out of this all

my uneducated guess is that this must have something to do with the hardware part of my set-up ...
iMac? or,
maybe my poor M-Audio card get's choked ...or,
maybe my Paca cub can't handle the task, so I'll have to get a full grown alpha-male Pacarana for this

hopefully, this summer ...

while we are at it, when or will you open some kind of "shop" in Europe?

thank you for help!
bw
s

IP: Logged

ChristianSchloesser
Member
posted 06 March 2012 21:10         Edit/Delete Message   Reply w/Quote
If i select a folder with many waveforms all the solutions above create empty files after 20 to 30 files or even may crash the pacarana. Tested with a Mac Pro and a Macbook. With a TC Konnekt 24D and a Motu Traveller mk3.

It seams that empty files are created first when the smalltalk script is started. Then it is written to the files one after another...maybe everthing above 20 to 30 files are to many open files simultaneously?

Actually i have many different singlecycle and wavetable files and i really would like to convert them for kyma ... but they are all different in size and resolution because most of them are created by myself with vintage hardware/software(prophet VS,Microwave, 12/16Bit samplers,turboSynth ,Infinity, Metasynth etc.)It took a lot time to create them and it will take me a lot of time to convert them to kyma.

The Galbanum library is okay ... it has many waveforms which are really inspiring ... especially to use as controls ... but also many which are more or less useful.

just my 2 cents
all the best
chris

IP: Logged

SSC
Administrator
posted 06 March 2012 23:10         Edit/Delete Message   Reply w/Quote
Could you please try disabling Spotlight on the folder you're writing into to see if this is what's causing the problem? (Please also try setting the converter to SilentDevice during the recording.) Thanks!

[This message has been edited by SSC (edited 06 March 2012).]

IP: Logged

ChristianSchloesser
Member
posted 07 March 2012 13:05         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by SSC:
Could you please try disabling Spotlight on the folder you're writing into to see if this is what's causing the problem? (Please also try setting the converter to SilentDevice during the recording.) Thanks!


Today i switched spotlight off. I set the converter to "SilentDevice" and adjust the I/O Delay to 14ms.
I used the "4096 singleCycle wave builder linear interpolation" sound.

I managed to convert 39 out of 255 files in one Folder in a row.
Then... empty files again.
This was the best result yet.
:-(


IP: Logged

SSC
Administrator
posted 07 March 2012 15:51         Edit/Delete Message   Reply w/Quote
Looks like we have found a fix for this! (new software update coming soon)

[This message has been edited by SSC (edited 09 March 2012).]

IP: Logged

SamuelSacher
Member
posted 10 March 2012 15:02         Edit/Delete Message   Reply w/Quote
yeaaaa!!!

IP: Logged

SamuelSacher
Member
posted 13 March 2012 12:01         Edit/Delete Message   Reply w/Quote
Hi!

Thnx for the upgrade, but,unfortunately ...
it' not working, at least not on my set-up
as before, 20-40 waveforms are converted, the rest of them 0 samples
also as before, number of successfully converted waves is every time different
... while using "idle DSP" mode ...

(( Ss

IP: Logged

cebec
Member
posted 13 March 2012 12:02         Edit/Delete Message   Reply w/Quote
Hi Samuel. Did you update the firmware, as well?

IP: Logged

ChristianSchloesser
Member
posted 13 March 2012 13:21         Edit/Delete Message   Reply w/Quote
Hi SSC
same here ... :-(
With a pacarana + new firmware and the new Software version.
After 40 files it ends up with empty files..

If you like i can upload a zip file to my private web server with 250 files with 2048 cycles for testing. Just send me an email to my registered account.

All the best from Berlin
Chris


IP: Logged

SamuelSacher
Member
posted 13 March 2012 14:46         Edit/Delete Message   Reply w/Quote
Hi cebec

ah, sadly, yes
and as I've said ...
but I know they'll find a solution

IP: Logged

SSC
Administrator
posted 14 March 2012 20:47         Edit/Delete Message   Reply w/Quote
Just uploaded Kyma X 6.82f10 containing a firmware update that fixes the problem with the batch conversion.

Thanks to Christian for providing the waveform files for testing!

IP: Logged

SamuelSacher
Member
posted 15 March 2012 13:11         Edit/Delete Message   Reply w/Quote
Thank you very much!

Everything works perfect now!

IP: Logged

ChristianSchloesser
Member
posted 15 March 2012 16:45         Edit/Delete Message   Reply w/Quote
Thank you SSC!
I am happy to confirm that it works here too!

A folder with one of my first attempts ... all the Waveforms from the ESQ-1 (my first hybrid-synthesizer) ready to use with Kyma can be found here: http://www.experimental.de/Kyma/Ensoniq-ESQ80-Kyma-4096-WaveCycles.zip

Instant 80s ... ;-)

A concatenated version of all of them put together to get that nice Waldorf/PPG feeling including a simple demo synth.

here: http://www.experimental.de/Kyma/SQ80WavesWaveTable.zip

Remember they are converted from crude 8 bit digital PCM!
Anyway fun to use.

Have a nice day
Chris


P.S.:Attachments in the Forum are only allowed up to 500K.

IP: Logged


This topic is 2 pages long:   1  2 

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c