Login / Register 0 items | $0.00 New @ KVR
irond13
KVRer
 
13 posts since 25 Feb, 2013

Postby irond13; Sun Mar 17, 2013 1:42 pm ZebraBlender 0.05

This is a tool that I've created to assist in the creation of more accurate Geo & SpectroBlend waves for Zebra2 & Zebralette.

Besides allowing you to precisely specify the value of each point in the wave, it also includes a Javascript interpreter which allows you to programatically specify the wave shape and/or wave set.

This is a JavaFX app and therefore requires Java 1.7+ to be installed (I've tested it on my Mountain Lion MacBook Pro). The JAR should be available here: https://www.dropbox.com/s/aftqm5zudmdk9wf/ZebraBlender.jar

You should be able to start the app just by double-clicking it if you have the necessary Java runtime installed.

Once started, usage should be relatively straight-forward:

* To change individual values, click on the 'Table' tab of the relevant wave. Double-clicking the current value will bring up an editor. Just hit Enter when done. Your changes will be reflected in the wave's chart.

* To specify a wave shape programatically, simply type in a Javascript function in the text area below the chart, and then hit 'Apply Function'. Pretty much the only rule for this function is that it must return a float value. The simplest function would therefore be the following

Code: Select all
return 1;


Each function will also be provided with an integer variable called
Code: Select all
index
which ranges from 0 - 127.

The following function will draw a sine wave

Code: Select all
return Math.sin(2 * Math.PI * index / 128);


And the following will make every second value equal to 1

Code: Select all
if ((index % 2) == 0)
  return 1;
else
  return 0;


You can make things as complex as you like. Try this for example

Code: Select all
if ((index % 2) == 0)
  return return Math.sin(2 * Math.PI * index / 128);
else
  return return Math.sin(2 * Math.PI * index / 64);



The 'Global Function' tab allows you to provide a function which will generate values for each of the 16 waves in the wave set. This function is provided with an additional integer variable called
Code: Select all
wave
which ranges from 1 - 16. This variable can be used to create 'morphing' waves.


Once you have applied your function(s), you can tweak the resulting values back in the 'Table' tab.

Finally, when you're happy with your wave set, you can export the result to a Zebra OSC preset using the Save button (remember to specify the h2p extension). This should be saved to the OSC presets location. On a Mac, that would be /Library/Application Support/u-he/Zebra2/Modules/Oscillator/

-- Update 0.02

Fixed GeoBlend & SpectroBlend buttons. Patches will now select the correct mode in Zebra / Zebralette.


-- Update 0.03

Added 'Import Image' button to each wave. This feature transforms images (png's, jpg's, etc) into waveforms. At present this is done by searching for the location of the highest (positive) or lowest (negative) *black* pixel in the center of each of the 128 'blocks' across the width of the image. Optimal images, therefore, are black & white (not grayscale) and have width which is a multiple of 128 pixels (a width of exactly 128 would be most accurate). The following image isn't an exact multiple of 128, but it turned out fine: https://www.dropbox.com/s/v5tscylc3xt7jdq/sine.png

-- Update 0.04

Added folder 'memory'. At the moment, Mountain Lion seems to do its own thing, which is fairly intelligent, but it shares the 'most recent' folder with all FileChoosers in the application. Windows should persist folder locations across sessions as well.

-- Update 0.05

Added 'Load' functionality. Currently can only load patches created with ZebraBlender
Last edited by irond13 on Mon Apr 01, 2013 3:55 pm, edited 4 times in total.
User avatar
bmrzycki
KVRAF
 
4014 posts since 11 Aug, 2006, from Austin, TX

Postby bmrzycki; Sun Mar 17, 2013 2:40 pm

Thank you for sharing this tool with us! I've been toying with something like this in python or javascript but never really got it into a usable state.

There's a bit of documentation on the .h2p format mostly thanks to billstei (still miss that guy). Here are a few posts I think you'd find interesting on the subject:
http://www.kvraudio.com/forum/viewtopic.php?t=252338
http://www.kvraudio.com/forum/viewtopic.php?p=3601084#3601084
http://www.kvraudio.com/forum/viewtopic.php?t=264281&postdays=0&postorder=asc&start=60
http://www.kvraudio.com/forum/viewtopic.php?t=252473&postdays=0&postorder=asc&start=0

And billstei's archive of scripts:
http://customers.hbci.com/~billstei/pub/zebra2/DeltaPatches/

Using a lot of that info I did this:
http://www.kvraudio.com/forum/viewtopic ... 29#4669429

The OSC_WAVEFORM_SPECTROBLEND is (pretty much) an enum from 0 to 3 of the waveform modes in order of the pulldown: Geo/Spectro Morph then Geo/Spectro Blend.

Hope that helps!
irond13
KVRer
 
13 posts since 25 Feb, 2013

Postby irond13; Mon Mar 18, 2013 12:10 am

bmrzycki wrote:The OSC_WAVEFORM_SPECTROBLEND is (pretty much) an enum from 0 to 3 of the waveform modes in order of the pulldown: Geo/Spectro Morph then Geo/Spectro Blend.


Thanks! That was the missing piece in the puzzle. ZebraBlender 0.02 now has properly functioning GeoBlend and SpectroBlend buttons!

Btw, do you know how billstei was able to get hold of what seems to be the entire 'zebrascript' spec?
DefiantCatz70
KVRist
 
145 posts since 25 Jul, 2012

Postby DefiantCatz70; Mon Mar 18, 2013 1:35 am

Good idea irond13, I will have a look at this.

What I would love in Zebra, would be where you could add a waveform pic, and it would be transformed into that wave in realtime.

Thanks for the documentation bmrzycki.
irond13
KVRer
 
13 posts since 25 Feb, 2013

Postby irond13; Mon Mar 18, 2013 2:15 am

DefiantCatz70 wrote:What I would love in Zebra, would be where you could add a waveform pic, and it would be transformed into that wave in realtime.


That was actually one of my first ideas, but I ended up going down the JS Evaluator route. Now that I've got that working though, I think I can go back to the 'image import' idea.

Do you have a sample waveform pic that you would like transformed?
DefiantCatz70
KVRist
 
145 posts since 25 Jul, 2012

Postby DefiantCatz70; Mon Mar 18, 2013 2:38 am

irond13 wrote:Do you have a sample waveform pic that you would like transformed?
I don't actually have a waveform picture, but would love to recreate some old synth sounds for Zebra, I do like the Juno 106 or M1 sounds from the 1980/90's.
paradiddle
KVRian
 
1430 posts since 14 Aug, 2001, from montreal, canada

Postby paradiddle; Mon Mar 18, 2013 3:59 am

Sticky!
Stuck in Aperture Laboratories for a 2nd time!
irond13
KVRer
 
13 posts since 25 Feb, 2013

Postby irond13; Mon Mar 18, 2013 2:35 pm

DefiantCatz70 wrote:What I would love in Zebra, would be where you could add a waveform pic, and it would be transformed into that wave in realtime.


ZebraBlender 0.03 now has preliminary support for that (see update to initial post)
irond13
KVRer
 
13 posts since 25 Feb, 2013

Postby irond13; Mon Mar 18, 2013 2:36 pm

paradiddle wrote:Sticky!


It would be an honour! :)
DefiantCatz70
KVRist
 
145 posts since 25 Jul, 2012

Postby DefiantCatz70; Mon Mar 18, 2013 3:26 pm

irond13 wrote:
DefiantCatz70 wrote:What I would love in Zebra, would be where you could add a waveform pic, and it would be transformed into that wave in realtime.


ZebraBlender 0.03 now has preliminary support for that (see update to initial post)


Wow.....irond13, That is really Cool, A Big Thank You for creating this :)

Are there any spectrograph vst's that would show a waveform as a black and white image?
User avatar
.maki
KVRAF
 
4362 posts since 21 Jan, 2008, from oO

Postby .maki; Mon Mar 18, 2013 4:12 pm

bmrzycki wrote:
There's a bit of documentation on the .h2p format mostly thanks to billstei (still miss that guy).


where's he gone?
User avatar
bmrzycki
KVRAF
 
4014 posts since 11 Aug, 2006, from Austin, TX

Postby bmrzycki; Mon Mar 18, 2013 4:49 pm

irond13 wrote:
bmrzycki wrote:The OSC_WAVEFORM_SPECTROBLEND is (pretty much) an enum from 0 to 3 of the waveform modes in order of the pulldown: Geo/Spectro Morph then Geo/Spectro Blend.

Thanks! That was the missing piece in the puzzle. ZebraBlender 0.02 now has properly functioning GeoBlend and SpectroBlend buttons!
Btw, do you know how billstei was able to get hold of what seems to be the entire 'zebrascript' spec?

Happy to help and glad you were able to get a few missing features into your tool. :)

As for billstei, if you crawl through those threads you'll see a good deal of back-and-forth with Urs. Thankfully it's archived for us all. :)

Suloo wrote:
bmrzycki wrote:There's a bit of documentation on the .h2p format mostly thanks to billstei (still miss that guy).

where's he gone?
No idea really. He stopped showing up here about 4 years ago. Sharp cookie and quite funny. I hope he comes back some day.
DefiantCatz70
KVRist
 
145 posts since 25 Jul, 2012

Postby DefiantCatz70; Tue Mar 19, 2013 1:35 am

Hello irond13, that picture of the sine wave:

https://www.dropbox.com/s/v5tscylc3xt7jdq/sine.png

Is this the ideal size, for importing the image of a wave.

This is great if you want to draw the wave freehand, and format it to Zebra, again a very cool idea, at the moment I don't have a pen tablet, so I would just do it the old fashioned way.....use pen to paper, scan it, and hopefully see what happens.
irond13
KVRer
 
13 posts since 25 Feb, 2013

Postby irond13; Tue Mar 19, 2013 2:39 am

DefiantCatz70 wrote:Are there any spectrograph vst's that would show a waveform as a black and white image?


Not that I know of, but a workaround would be to take a screenshot and then use an image editor (e.g. the GIMP) to change the color scheme into black and white.

In terms of recreating waveforms though, you probably want to use GeoBlend mode instead of SpectroBlend mode, as SpectroBlend mode only supports harmonic partials and (according to some other threads) has differing amplitude levels for each of the harmonics. Using something like this http://bram.smartelectronix.com/plugins.php?id=4 would probably yield better results, though I still haven't found a configuration that I'm completely happy with yet (if you could get your hands on the config used by Urs in the YouTube vids, that would be ideal).

DefiantCatz70 wrote:Hello irond13, that picture of the sine wave:

https://www.dropbox.com/s/v5tscylc3xt7jdq/sine.png

Is this the ideal size, for importing the image of a wave.


No, that was just an image I picked up on the interwebs and tweaked slightly. The ideal size would be exactly 128 pixels wide (height doesn't really matter as much, as the value range is continuous).
irond13
KVRer
 
13 posts since 25 Feb, 2013

Postby irond13; Thu Mar 21, 2013 12:27 pm

I've uploaded a minor update which should fix an issue mentioned by Fritz where folder selection was reset each time the Save As or Import Image functions were selected. This seems only to have been an issue on Windows.
Next

Moderator: u-he Mods

Return to u-he