Sine Sine Everywhere a Sine

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

Post

Howard wrote:
billstei wrote:I Am Zebra
Here turned into a speaking patch. Actually sounds like Urs himself: http://www.box.net/shared/l2s1306cy4
We have 4 oscillators, so with a bit of jiggery-pokery, we should be able to get a few more words into a single patch. Loving it!
Cue for a separate thread...see main directory.

Post

I've been doing an inventory of Things I Hate About It and here's a few:

1) The fundamental frequency was too high (aka the B sound is missing)

2) The FFT windows were not overlapped so the smoothness of the wave sweep might be improved.

3) The FFT windows were not anything like a Hanning window or the like, it was just a horrible brick wall non-window.

4) The scripts generate one Patch for each OSC and Wave, so to load up 4 OSCs and 16 Waves each, there would be 64 Zebra patches.

5) Octave spits out the matrices as it's manipulating them. There must be a way to suppress this, it's annoying and must be slowing it down.

All of which is easily solved, so it's no biggie really, I'm just wallowing in my self-loathing.
Last edited by billstei on Mon Jun 08, 2009 11:33 pm, edited 1 time in total.

Post

billstei wrote:I've been doing an inventory of Things I Hate About It and here's a few:

1) The fundamental frequency was too high (aka the B sound is missing)

2) The FFT windows were not overlapped so the smoothness of the wave sweep might be improved.

3) The FFT windows were not anything like a Hanning window or the like, it was just a horrible brick wall non-window.

4) The scripts generate one Patch for each OSC and Wave, so to load up 4 OSCs and 16 Waves each, there would be 64 Zebra patches.

All of which is easily solved, so it's no biggie really, I'm just wallowing in my self-loathing.
1. Fixed via pitch modulation (see MSEG2 in "Urs Zebra")
(2. and 3. are way over my head!)
4. Copy/paste oscillators
5. Don't wallow or self-loath ;)

Post

Disclaimer: It's not my fault if you destroy your computer with this stuff. I did not do this in Windows or OSX, I am a Linux geek. The geekiest geeks are inherently Linuxy, so I apologize for this.

If you are using Windows you can get Octave here: http://octave.sourceforge.net I did not try Mac OSX. In the installer make sure you check the Octave Forge extra packages -- at the very least my scripts need the Audio, and the Fixed packages to run. It's probably easiest to select the whole Octave Forge package, but it's not that way by default, so be sure to install it.

Okay, here is a zip file of the three scripts that I used to do the FFT Zebra thing:

Zebra Octave Fun Pack Ver 1

You need to put all three scripts into a directory somewhere and then start Octave. When you get into Octave there will be a prompt, that looks like this:

octave:1> _

or if you are in MS Windows, like this:

octave-3.0.5.exe:1:c:\Program Files\Octave\3.0.5_gcc-4.3.0\bin
> _

So, Octave wants to talk to you. First we tell it to go to the place where you put the 3 scripts:

octave:1> cd /home/bill/place_where_I_put_the_stuff

If you get lost you can ask it Where am I? like this:

octave:1> pwd

which means Present Working Directory, and it will give you an answer, like this:

ans = /home/bill/you_are_in_the_wrong_place

You can look around like this:

octave:1> dir

or in Linux you would say "ls", and it will answer something like this (we hope assuming you are in the right place):

genSBlendWavetable.m makeSBlendZebraScript.m
positiveFFT_zero_padding.m Zebra1Mono.wav

which are the 3 scripts, and the audio file I want to use. The only script you really need to call is genSBlendWavetable.m, and that script calls the other ones as needed.

Note: About the audio file: It must be mono. The script doesn't do stereo, and will crap. Maybe someday it will do stereo, but not today. Also wavs longer than several seconds might be a bad idea. I'm not sure what I mean by "bad idea", but it doesn't sound good, and we want good sound.

One nice command to remember is "help", which can be used with any Octave command (even scripts that it knows about), like this:

help genSBlendWavetable

and it will spit out some lines (that I now see are not as complete as they should be, so there will be a version 2 someday, but not today).

So here we go:

genSBlendWavetable("Zebra1Mono.wav", 80, "zpatch", 1)

And it means this:

Zebra1Mono.wav - my audio file I want to do an FFT on and make Zebra SpectroBlend wavetables out of. It's a string so remember to put it in quotes.

80 - The lowest frequency that you want to represent. This will be the fundamental frequency of the harmonics, so you will have 80, 160, 240, 320, 400, etc up to 128 harmonics. Of course once in Zebra you can play the fundamental via the OSC module at whatever frequency you want.

zpatch - the name of the 16 patches that will be generated, aka zpatch1.h2p, zpatch2.h2p, ..., zpatch16.h2p. Again it's a string, so put it in quotes.

1 - build the patches so that these wavetables will end up in OSC1. So this could be 1 to 4.

So we press Enter, and it will think about it, and spit out a lot stuff to the terminal that's not needed, and you have to press "q" to make it go away ("quit"), but it's the stdout on the terminal that's getting quitted, not the script. In Linux this message will appear after pressing "q":

warning: broken pipe -- some output may be lost

but we didn't need that terminal output anyway, so nothing is "lost" that we care about. I hope to fix this someday, but not today.

There should now be 16 Zebra patches in the "present working directory", and these can be loaded into Zebra, and will end up in OSC1's wavetables (because we said "1" when we called genSBlendWavetable). Remember that OSC needs to be set to SpectroBlend.

I also see now that these Zebra patches don't look so good in Windows Notepad, because the script uses Linefeed only. Hmmm. You weren't going to edit these anyway. So there will probably be a Version 2 of this stuff, because there's a lot I might change someday, but not today. And besides all that, Jupiter8 will probably come out with a nice graphical drag-n-dropy thing, and no one will ever have to feel the pain of being a geek ever again. How :cool: would that be?

Have fun. :)

P.S. I forgot: type "exit" to get out of the Octave terminal.

Post

P.P.S. Apparently functions with no explicit return variable will send output to stdout (i.e. the terminal) so that is probably my bugaboo with the stdout going crazy. There is also a global variable in Matlab/Octave called silent_functions that can control this. So, probably easy to fix. Someday, not today.

Post

billstei wrote:Anyway, it sounds a lot better than I thought it would.
Sounds amazing :hail: :hail: :hail: Also, it seems like the oscillator has good utility, tweaking it doesn't break it.

Did you try any other samples?

Post

This is awesome!
(a little geeky, but still awesome)
And I was just about to hook up my old Fs1r to mess about with it's formant sequences. But I think this just got delayed... :wink:
//L

Post

Thanks for your efforts, that's awesome!

Post

Howard wrote:
billstei wrote:I Am Zebra
:tu:

Here turned into a speaking patch. Actually sounds like Urs himself:
http://www.box.net/shared/l2s1306cy4
:clap:

Well done Howard and billstei.

Must be synchronisity, or something, because I tried more-or-less the same thing just a few days ago, but without any real success. I got a "zebra" sample from an on-line speech synth and tried to convert the phonemes (/z/,/b/,/r/) with Jupiter8's Wav2Zebra. The idea was to use the formant filter to get the vowel sounds. But I'm obviously not enough of a geek, cos I couldn't even get a passable /z/, never mind the /b/.

I wonder how one might go about synthesizing speech in zebra without 'sampling' phonemes into Osc Waves?

This vintage clip shows how intelligible speech can be synthesized using just a pitched buzzy (sawtooth?) oscillator, a noise source and bandpass filtering.

Surely something similar could be done in Zebra, but where to start? Searching for info about speech synthesis yields plenty of scientific papers and geeky mathematical stuff, but nothing at a more accessible level.

[Edit] Found some interesting synthesizer speech stuff here.

Post

hakey wrote:
Howard wrote:
billstei wrote:I Am Zebra
:tu:

Here turned into a speaking patch. Actually sounds like Urs himself:
http://www.box.net/shared/l2s1306cy4
:clap:

Well done Howard and billstei.

Must be synchronisity, or something, because I tried more-or-less the same thing just a few days ago, but without any real success. I got a "zebra" sample from an on-line speech synth and tried to convert the phonemes (/z/,/b/,/r/) with Jupiter8's Wav2Zebra. The idea was to use the formant filter to get the vowel sounds. But I'm obviously not enough of a geek, cos I couldn't even get a passable /z/, never mind the /b/.

I wonder how one might go about synthesizing speech in zebra without 'sampling' phonemes into Osc Waves?

This vintage clip shows how intelligible speech can be synthesized using just a pitched buzzy (sawtooth?) oscillator, a noise source and bandpass filtering.

Surely something similar could be done in Zebra, but where to start? Searching for info about speech synthesis yields plenty of scientific papers and geeky mathematical stuff, but nothing at a more accessible level.

[Edit] Found some interesting synthesizer speech stuff here.
I would think that with the right set of SpectroBlend waves one could assign envelope sweeps (like I did) and filter modulations to the Zebra XY controllers so that all the phonemes are possible, and then automate the XYs in a host to make words. Easier said than done :wink:

Post

Here's the latest version of my Octave scripts:

Zebra Octave Fun Pack Ver 1.1

Changes/Notes

1) There are only 2 scripts now. You can throw away positiveFFT_zero_padding.m from the previous version if you use the same directory.

2) There should not be any data dumping into the terminal now. It should just think for a bit and return back to the terminal prompt.

3) The way you call genSBlendWavetable has changed, and is more powerful now. The old way was like this:

genSBlendWavetable("Zebra1Mono.wav", 80, "zpatch", 1)

The new version 1.1 way is like this:

genSBlendWavetable("Zebra1Mono.wav", 80, "zpatch", 1, 1:16)

and the new argument at the end, 1:16, means generate Wave1 through Wave16, and that would be equivalent to what Ver 1.0 did, however, you can now do this:

genSBlendWavetable("Zebra1Mono.wav", 80, "zpatch", 1, 2:4)

and you will only get Wave2 through Wave4 patches. Note however, that saying 2:4 will divide the audio wav into 3 (equal) FFT windows, not 16... so patches p2,p3,p4 are not the same as the p1,p2,p3,p4,...p16 as generated from the previous example, because 1:16 would have divided the audio wav into 16 pieces. Also the range is contiguous, so you can't get 2 & 4 without 3 (or so it seems... Matlab/Octave has some uber-tricky stuff going on, so maybe I'm just too stupid to know the awesome Power of the Matrix, bwahahahaha).

Here are some things I might do in the future with this script (but I make no promises):

Ver 1.2 - combine patch output to have multiple waves in one patch

Ver 1.3 - ability to use 0 for the oscnum to make a patch that puts the Waves in all (and only) active OSCs

Ver 1.4 - ability to use Hanning windows

Ver 1.5 - ability to use overlapping windows

Have more fun. :)

Post

billstei wrote:I also see now that these Zebra patches don't look so good in Windows Notepad, because the script uses Linefeed only.
This is easily worked around by using wordpad.exe instead of the ancient notepad.exe. :)

Post

On OS X, XCode seems to handle .m files, struggling a bit getting the script to run but probably a result of how long it's been since I've used a terminal shell for anything interesting (I didn't even know I had XCode ...) . . . will poke around a bit more. Had to track down auload.m, create_lookup_table.m so far.

Why is this so much more interesting than just sampling XD . . . it's basically vocoding in a way, right?

Post

xh3rv wrote:On OS X, XCode seems to handle .m files, struggling a bit getting the script to run but probably a result of how long it's been since I've used a terminal shell for anything interesting (I didn't even know I had XCode ...) . . . will poke around a bit more. Had to track down auload.m, create_lookup_table.m so far.

Why is this so much more interesting than just sampling XD . . . it's basically vocoding in a way, right?
I'm not familiar with XCode, but I suspect it does not have the ability to run Matlab/Octave scripts, although it surely could be used to edit the script files, as could any common text editor. As far as IDE front-ends (like XCode) are concerned, I did use QTOctave, but I don't think this is available for OSX.

Post

Yet another version:

Zebra Octave Fun Pack 1.2.1

The only difference from version 1.1 is that there will be one file generated with multiple Waves, not one for each Wave.

Okay, stop having fun and get to work. :hihi:

Post Reply

Return to “u-he”