User waveforms

Official support for: u-he.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Howard wrote: Thanks Bart! Er... I don't want to read the entire Python documentation for this - what's the precise syntax in the command line if I e.g. put your script and "test.wav" in Python's root directory, and want it to build "test.h2p"? I'm always getting the "invalid syntax" message.
Well, if you used an installer application to install python on windows, then .py files are already associated with python interpreter, so running a script is just a matter of typing it's name in the command line.
You have to provide two parameters - the first one is the name of the input wave file, and the second is the name of the output preset.
To make it a bit clearer on how to use this program, I'll give you an example:

wavToZ2.py and example.wav are in C:\convert directory. To convert example.wav, you must (in command line) type:

Code: Select all

C:
cd \convert
wavToZ2.py example.wav example.h2p
It would be even easier if you would add the location of wavToZ2.py script to the Windows PATH environment variable (then you would 'cd' directly into samples directory and call wavToZ2.py without actually copying it to that location).

Anyway if there's a demand for it, I can make a simple GUI for this script :wink:

cheers,
Bart

Post

FEV wrote:As I'm a little bored at work right now :D, so I produced a tiny python script, that should convert 16-bit mono wave files into Z2 osc presets.
:o

This is wicked, will try it out asap. Another reason Mac's are cool - they come with perl, php and python preinstalled... :D

Thanks! :tu:
Image

Post

It works here on a PPC Mac...
Image

Post

Hmmm...I get an error even if I just type "c:" or "cd \"!! Does Python work with German keyboards?

Edit: OK! I just tried using the DOS Commander instead of Pathon's, and it works. Her's the Little Phatty Sawtooth (sorry about using up so much space - won't happen again!)

#defaults=no
#cm=OSC
Wave=2
<?

float Wave[128];
Wave[0] = 0.00167846679688;
Wave[1] = 0.0120544433594;
Wave[2] = 0.0223693847656;
Wave[3] = 0.0326538085938;
Wave[4] = 0.0426635742188;
Wave[5] = 0.0524597167969;
Wave[6] = 0.061279296875;
Wave[7] = 0.0713806152344;
Wave[8] = 0.0805358886719;
Wave[9] = 0.0897827148438;
Wave[10] = 0.0984802246094;
Wave[11] = 0.107452392578;
Wave[12] = 0.1162109375;
Wave[13] = 0.12451171875;
Wave[14] = 0.132049560547;
Wave[15] = 0.139770507813;
Wave[16] = 0.1474609375;
Wave[17] = 0.154937744141;
Wave[18] = 0.162384033203;
Wave[19] = 0.169586181641;
Wave[20] = 0.176788330078;
Wave[21] = 0.183349609375;
Wave[22] = 0.189910888672;
Wave[23] = 0.196319580078;
Wave[24] = 0.201782226563;
Wave[25] = 0.208129882813;
Wave[26] = 0.214019775391;
Wave[27] = 0.219268798828;
Wave[28] = 0.224945068359;
Wave[29] = 0.230102539063;
Wave[30] = 0.234832763672;
Wave[31] = 0.2392578125;
Wave[32] = 0.243560791016;
Wave[33] = 0.248443603516;
Wave[34] = 0.252777099609;
Wave[35] = 0.256439208984;
Wave[36] = 0.260131835938;
Wave[37] = 0.264373779297;
Wave[38] = 0.267608642578;
Wave[39] = 0.270935058594;
Wave[40] = 0.274841308594;
Wave[41] = 0.27783203125;
Wave[42] = 0.280853271484;
Wave[43] = 0.283538818359;
Wave[44] = 0.286499023438;
Wave[45] = 0.286163330078;
Wave[46] = 0.288330078125;
Wave[47] = 0.290344238281;
Wave[48] = 0.292297363281;
Wave[49] = 0.293975830078;
Wave[50] = 0.296112060547;
Wave[51] = 0.297790527344;
Wave[52] = 0.299163818359;
Wave[53] = 0.300445556641;
Wave[54] = 0.301635742188;
Wave[55] = 0.303131103516;
Wave[56] = 0.3037109375;
Wave[57] = 0.304809570313;
Wave[58] = 0.305480957031;
Wave[59] = 0.604919433594;
Wave[60] = 0.770751953125;
Wave[61] = 0.764617919922;
Wave[62] = 0.752899169922;
Wave[63] = 0.741333007813;
Wave[64] = 0.730163574219;
Wave[65] = 0.719146728516;
Wave[66] = 0.708770751953;
Wave[67] = 0.697998046875;
Wave[68] = 0.687042236328;
Wave[69] = 0.677612304688;
Wave[70] = 0.666961669922;
Wave[71] = -0.650970458984;
Wave[72] = -0.7529296875;
Wave[73] = -0.742156982422;
Wave[74] = -0.727081298828;
Wave[75] = -0.709655761719;
Wave[76] = -0.692230224609;
Wave[77] = -0.674621582031;
Wave[78] = -0.65869140625;
Wave[79] = -0.642242431641;
Wave[80] = -0.625793457031;
Wave[81] = -0.609375;
Wave[82] = -0.593414306641;
Wave[83] = -0.578308105469;
Wave[84] = -0.563720703125;
Wave[85] = -0.548858642578;
Wave[86] = -0.534149169922;
Wave[87] = -0.519653320313;
Wave[88] = -0.504730224609;
Wave[89] = -0.491516113281;
Wave[90] = -0.477508544922;
Wave[91] = -0.463836669922;
Wave[92] = -0.450286865234;
Wave[93] = -0.4365234375;
Wave[94] = -0.423095703125;
Wave[95] = -0.409545898438;
Wave[96] = -0.396301269531;
Wave[97] = -0.383056640625;
Wave[98] = -0.370422363281;
Wave[99] = -0.356628417969;
Wave[100] = -0.344146728516;
Wave[101] = -0.331146240234;
Wave[102] = -0.318298339844;
Wave[103] = -0.304962158203;
Wave[104] = -0.291259765625;
Wave[105] = -0.278533935547;
Wave[106] = -0.265930175781;
Wave[107] = -0.253356933594;
Wave[108] = -0.240844726563;
Wave[109] = -0.230682373047;
Wave[110] = -0.217803955078;
Wave[111] = -0.20556640625;
Wave[112] = -0.193145751953;
Wave[113] = -0.180816650391;
Wave[114] = -0.168548583984;
Wave[115] = -0.156127929688;
Wave[116] = -0.143859863281;
Wave[117] = -0.132080078125;
Wave[118] = -0.120025634766;
Wave[119] = -0.108245849609;
Wave[120] = -0.0966186523438;
Wave[121] = -0.0849914550781;
Wave[122] = -0.0733947753906;
Wave[123] = -0.06201171875;
Wave[124] = -0.0507507324219;
Wave[125] = -0.0393371582031;
Wave[126] = -0.0285339355469;
Wave[127] = -0.0173645019531;
Selected.WaveTable.set( 1, Wave );

?>

Post

You should be typing those into the Windows command prompt, Howard. Start -> Run -> command to open a terminal.

Now CD to the directory, and run the python proggie from there...

Edit: ok, you've figured it out! ;)
Image

Post

Howard wrote:Her's the Little Phatty Sawtooth
Wow, that crashed Z2/Live here... :-o

Hmm, worked the second time... ;)
Image

Post

Howard wrote:Her's the Little Phatty Sawtooth
isn't analouge just overrated? ;)
www.grenzmord.de/phatty.h2p
Image

Post

luCiPHer wrote:
Howard wrote:Her's the Little Phatty Sawtooth
isn't analouge just overrated? ;)
www.grenzmord.de/phatty.h2p
Can I assume from the smiley that I don't have to answer that question?
:)

Post

FEV wrote:Anyway if there's a demand for it, I can make a simple GUI for this script :wink:
Huge demand here! Even as it is, it's a great little tool. But a simple GUI would also be quite helpful. Maybe that could eventually turn into *the* user-friendly tool for making Z2 waves... remember Cool Edit?

Many thanks :)

Post

Howard wrote:
FEV wrote:Anyway if there's a demand for it, I can make a simple GUI for this script :wink:
Huge demand here! Even as it is, it's a great little tool. But a simple GUI would also be quite helpful. Maybe that could eventually turn into *the* user-friendly tool for making Z2 waves... remember Cool Edit?

Many thanks :)

+1

Post

Oh! Quite some stuff going on here while I'm away :-o

Post

Howard wrote:
FEV wrote:Anyway if there's a demand for it, I can make a simple GUI for this script :wink:
Huge demand here! Even as it is, it's a great little tool. But a simple GUI would also be quite helpful.
Well, I'm not sure you can call that a GUI, but I did a tiny adjustment to the script. Now when there are no parameters passed (you can just run the damn thing, simply by double clicking on the script icon), open file dialog should appear, where you can select file(s) to convert. The presets are saved in the same directory as sound files, with the same name as sound files + .h2p extension :cool:

The script is here

cheers,
Bart
Last edited by FEV on Sat Jan 27, 2007 12:07 am, edited 1 time in total.

Post

Little feature request - maybe the choice of creating a Geomorph oscillator rather than a Geoblend, with the waveform points basically tracing the outlines.

Anyone have any tips for getting a nice source waveform with a 128 sample cycle period? I'm kinda doing it a bit hit and miss - aer there any particular frequencies or keys that would give a nice 128-sample waveform cycle period?
Image

Post

beej wrote:Little feature request - maybe the choice of creating a Geomorph oscillator rather than a Geoblend, with the waveform points basically tracing the outlines.
Sorry, hehe, the spline based Morph curves are not (yet) accessible from within the scripting engine... Gotta work something out here that actually makes sense...

Post

Urs wrote:Oh! Quite some stuff going on here while I'm away :-o
While You're "frying" on the sun on the other side of our planet, we have to entertain ourself somehow :wink:

cheers,
Bart

Post Reply

Return to “u-he”