| Author |
Message |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Wed Mar 19, 2008 1:09 pm Post subject:
|
 |
|
Speaking of bit width the plot thickens.
I have been playing with extending the bores a bit and wondered why some notes just won't resonate. I went back to my C implementation of the model which uses the same bit width as the FPGA version and low and behold, when I use the same delay line lengths as the FPGA version, the C version won't resonate either. I looked at the data and realized that 18 bits just isn't enough, mainly because of the way the Lagrange interpolators work. I got it to resonate using 32 bit arithmetic instead of 18.
I will next try bumping the FPGA version up to 36 bit arithmetic and see what happens. I noticed that the interpolator uses some very small numbers - they are small as long as the frequency of the signal is low compared to Nyquist (which it is) so I decided to multiply those values by a big number before the calculation and then divide by the same number just before summing - that was required by the 32 bit implementation or it too did not resonate. I tried the same trick with 18 bit arithmetic and the bore failed to resonate. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Wed Mar 19, 2008 8:38 pm Post subject:
Physical Models |
 |
|
Wow, now there's a neat little bit of detective work. Cool stuff Scott.
Tim (glad his bore doesn't resonate) Servo |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Mar 21, 2008 5:24 pm Post subject:
|
 |
|
Progress: I got the phLUTe working with 35 bit signed arithmetic. I get 3 octaves plus up to Eb, no dead notes as there were with 18 bits. The tone along with the waveshape as seen on the scope is also much more consistent from note to note with the wider arithmetic.
There are still some things to smooth out, but this is working and I believe I can make a playable musical instrument.
EDIT-ADD: It's going 5 octaves starting at middle C now. It's easier to control, too. Overblowing is much more predictable. 5 octaves is available because the tuning ROM now implements that many lengths, but I'm not sure how much of the last octave is really usable. I did a quick test and not a discerning quality listen and the highest octave seems to at least play in tune. The Lagrange interpolators work best with frequencies less than .1. The highest C is around .08 (4186 Hz). _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24676 Location: The Netherlands, Enschede
Audio files: 330
G2 patch files: 320
|
Posted: Sun Mar 23, 2008 4:25 pm Post subject:
|
 |
|
| ScottG wrote: | | It's going 5 octaves starting at middle C now. |
I think that's excellent, for a physical wind instrument it's pretty hard to achieve such a range as well. _________________ Jan
also .. could someone please turn down the thermostat a bit.
9 3 4 .. erm .. not 13 then? .. hmm, ah eight! .. yeah yeah as in 8647 .. 47 is an 88 .. pwew .. numbles! |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Mar 23, 2008 8:50 pm Post subject:
|
 |
|
Yes, I was a bit surprised. When I generated the new ROM, I figured that not all of the shorter wavelengths would work, but I was pleasantly surprised when I found I could do a chromatic scale all the way to the end. The ROM actually goes a few more keys than I have...
I've got a page for this project here:
http://www.fpga.synth.net/pmwiki/pmwiki.php?n=FPGASynth.PhLUTe
There's a bit more info there including a block diagram of the design as it currently exists and there's a little sound file of me noodling around on the keyboard with the phLUTe.
I did a bit of design optimization and was able to free up enough RAM that I believe I could implement 4 phLUTes in one FPGA. But I won't even touch that until I've fixed the slow rise to resonance from zero input. I believe this an "embrouchure" problem that may be solved by bandwidth limiting the jet noise. More energy in the lower end of the spectrum seems like it should cause the bore to attain full amplitude resonation more quickly.
I also need to add an IIR filter for a slight portamento to reduce or eliminate the transient that occurs when the instrument's bore length is changed. (in fact, a real flute doesn't change pitch instantly, so this will improve the model). Portamento could also be fun when pushed beyond the small amount needed for transient suppression. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Mar 28, 2008 8:12 pm Post subject:
|
 |
|
I've been working on getting the bore to resonate more quickly. I realized that flute models as shown on websites are the models at resonance. The values that are shown, such as for feedback, are the values that need to be set for resonance. If these values are used and are fixed, the bore will resonate, but will build amplitude slowly.
Today, I built in an envelope follower to sense the bore amplitude and use that information to control one of the critical bore feedback scale values. This servo system resulted in a bore that comes to full amplitude much more quickly without any objectionable sound characteristic.
I also added another IIR filter to implement portamento. This tames (does not eliminate) the transients that are generated when the bore changes length. It's almost playable now, I need to optimize the servo for fastest startup. The rest of it's working very nicely. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sat Mar 29, 2008 12:18 pm Post subject:
|
 |
|
Ok, I think this is about as far as I can take this. It is apparent from what I have read and my experimental experience that this model is _not_ a flute. It is similar and has many characteristics in tandem, but it is not a flute. Thus, my implementation is a phLUTe.
Today, I played with the portamento settings trying to eliminate the transients, but it only made it worse - at certain settings, the portamento was causing a zipper transient effect instead of a single edge transient. Still more portamento than that caused noticable glissandos. The single edge sounds more natural, almost like key clicks.
The servo controlled bore feedback scale #2 has enabled the system to come to full amplitude much more quickly. A little slower on the low end, but acceptable. IMO, the instrument is now playable.
I will put together some kind of demonstrative sample and post that a bit later. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24676 Location: The Netherlands, Enschede
Audio files: 330
G2 patch files: 320
|
Posted: Sat Mar 29, 2008 5:20 pm Post subject:
|
 |
|
Now I understand the phLUTe word
Did you experiment with the excitation function? I assume the excitation is causing the string like attack? I don't mean that it's a bad attack phase that you demonstrate, as the sample sounds fine to me, but it is a very specific characteristic as it is, which just seems to indicate that it's promising to experiment with.
Sounds promising, listened a few times, liked the sounds. _________________ Jan
also .. could someone please turn down the thermostat a bit.
9 3 4 .. erm .. not 13 then? .. hmm, ah eight! .. yeah yeah as in 8647 .. 47 is an 88 .. pwew .. numbles! |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sat Mar 29, 2008 5:37 pm Post subject:
|
 |
|
| Blue Hell wrote: | Now I understand the phLUTe word
Did you experiment with the excitation function? I assume the excitation is causing the string like attack? I don't mean that it's a bad attack phase that you demonstrate, as the sample sounds fine to me, but it is a very specific characteristic as it is, which just seems to indicate that it's promising to experiment with.
Sounds promising, listened a few times, liked the sounds. |
Thanks, I'm still learning how to play it
Yeah, with a name like phLUTe I figure I can get away with whatever I want. And of course LUT refers to the guts of an FPGA. In fact, I'm really not trying to duplicate a flute, I'm trying to see what I can make this model do. I've been able to get about 6 harmonics to stabilize for seconds at a time using trilling with different sets of notes. I found several more that are not in the sample.
I've played with all of the parameters, shape of the ADSR, amount of noise, feedback scalers, etc. The excitation is a transient that is most apparent for larger wavelength jumps and more apparent at the low end of it's range. This is because the delay line RAM is filled zeroes outside of the area it is using for the delay line. So imagine that you're extending the bore, that means you probably have a sine wave sitting in the delay line and then all of a sudden it's a sine wave cycle with a bunch of zeroes at the end. You'll get a different kind of transient from shortening the bore - a sine cycle truncated in time which can present a large vertical edge. From what I read, there is much more to a real physical flute. This model manages to approximate the main components, but some are missing. Eg. there is probably more to the embrouchure than just noise and an envelope.
EDIT ADD: Not sure what you meant by the excitation function - there is a nonlinear function (X-X^3) that approximates a dynamic in the behavior of the jet. This function produces a sigmoid control shape that is essential for the system to begin resonation. I did play with this, for example, K(X-X^3) was tried with various values of K. This modification would change the "amplitude" of the function's output without changing the function's roots which are -1, 0 and 1. When K is unity, the maximum value of the sigmoid is around .4, If K is larger than unity, the system breaks down with chaos/distortion that is unpleasant. I believe that the bore feedback scale values would have to be modified at the same time to make changes to the nonlinear function work correctly. This process is not intuitive because the system is recursive and things can spiral out of control quickly. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
Last edited by JovianPyx on Sun Mar 30, 2008 10:24 am; edited 2 times in total |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Mar 30, 2008 11:09 am Post subject:
|
 |
|
More model tweaking has resulted in an instrument that is yet more playable, I've caused the reflection filter parameters to use velocity as part of it's input. Higher velocity values open the filter more (bandwidth extends more into the higher end of the spectrum) which makes cracking up an octave easier and can be controlled by playing technique.
I have a Mozart string quartet MIDI file that I used for a GateMan demo. I would like to use that piece with four phLUTes and see how that turns out. If it works, I'll post it. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Mar 30, 2008 5:18 pm Post subject:
|
 |
|
The Mozart string quartet I have sounds like crap with phLUTes. The way the MIDI file implements the piece it really expects violins etc. I can fix the file so that it works better for this instrument, but it will take some time, it has to be tweaked by hand. Parts of it sound nice, but other parts are just wrong. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Mon Mar 31, 2008 1:11 pm Post subject:
|
 |
|
Here's another sample, I found some design problems that were contributing to a mysterious distortion, especially associated with the transient. This was being caused by lack of overflow checking. I now check the 3 labeled adders for overflow and clip instead of allowing wrap. This resulted in a much cleaner signal. There are still the transients, but they are less pronounced. I also added the ability to use velocity to control the instrument better. In the sample, it starts out with a short riff that I did with fairly low velocity. Then I do the riff again, but with much velocity, you can hear the difference. The rest is just whatever I felt like. The instrument still supports the Jovian trill harmonic stuff it did before.
| Description: |
| Demonstrates cleaner output, velocity control and trill harmonics |
|
 Download (listen) |
| Filename: |
phLUTe_005.wav |
| Filesize: |
7.09 MB |
| Downloaded: |
1753 Time(s) |
_________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Apr 04, 2008 6:44 am Post subject:
|
 |
|
Lately, I've been working on taming the transients in the phLUTe.
I've tried several approaches, adding portamento didn't help. It caused a zipper effect in the low register which was worse than without the portamento. Yesterday, I added code to "RAM sweep". The first try was to simply clear all RAM not actively in use by the delay line. This sounded no better than doing nothing at all. The last thing I tried was to fill the unused RAM with various levels of noise signal. At full amplitude, the noise is obvious causing a short "sh" at the beginning of notes that is noticable in the low register and becomes a click for higher notes. Lowering the amplitude of the noise helps, but the transients never totally vanish (as expected). Currently, this is how the instrument stands.
I've read that another developer "solved" the transient problem by using two seperate bore systems and switching from one to the other to generate new notes and crossfading between them when the note changes. This can work, but is more complex and will have bore startup time issues.
I have one or two more ideas, but I am not confident that they are much better than what I have implemented. Among these are to use a linear method to "complete" a truncated waveform, or to force fill the new delayline length with a semi-complete sinusoid - I say "semi complete" because if I fill with a pure sinewave, there will be no transient at all (even real flutes have this transient, but it is far less noticable than in this model). A full triangle wave could also work, it's transient should be mild and consist of conversion of the triangle to a sine by the resonant system. Thus I thought a near sinusoid waveform placed in the delayline would have a transient effect and perhaps it would be less profound. Two problems with this method are the time it takes to fill the RAM for long delay line lengths and synchronization with the previous wave's zero crossings. I've tried building a zero crossing detector into the model, but this causes problems too - if the window is small, the note change can be noticably late. If the window is too large, the "edge" transient will still occur.
I've added another MP3 sample of the Mozart quartet. You can hear the improvements over the first quartet sample, but it's not perfect. Of course, I don't expect perfection and to be fair, this particular Mozart piece is not written for woodwinds. It's also a piece that is done with nothing but phLUTes so it's quite "naked". I believe that if a phLUTe were used in a jazz or blues piece, the imperfections might be able to hide in the mix given a variety of 4 or 5 instruments including percussion. The problem is also mainly in the lowest octave, using the next 2 or 3 octaves up sounds much more natural with the transients imitating key clicks more than anything (IMO).
I don't believe this model will ever sound exactly like a flute because the model does not precisely and fully simulate all of the physical characteristics of a real flute. However, I am still working at making this into a playable and usable instrument.
| Description: |
| Improved Mozart phLUTes quartet sample |
|
 Download (listen) |
| Filename: |
mozquart_phLUTes04.mp3 |
| Filesize: |
3.7 MB |
| Downloaded: |
1258 Time(s) |
_________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
Last edited by JovianPyx on Fri Apr 04, 2008 5:12 pm; edited 2 times in total |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Apr 04, 2008 1:24 pm Post subject:
|
 |
|
Wow. I just realized that the lowest octave of the phLUTe is in the bass flute range. Most of the transient problems are in that octave. If I stay out of that octave (or design the instrument so that it plays an octave higher for those same keys) the problem is more tolerable. I remember starting out wanting to include bass flute and then forgot I did that. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Apr 04, 2008 4:53 pm Post subject:
|
 |
|
Last sample - I've replaced the sample a couple posts up.
The design was changed to play an octave higher so that the phLUTe's lowest note is middle C instead of an octave lower. The transients are less apparent and the design works best in this range.
I think this is about the best I can do with this design.
Also, this piece is for strings that do things flutes don't do or do differently. For example, 3/4 of the way through, in either the cello or viola parts, there is a rythmic bowing on one note which when played by phLUTes manifests some rythmic clicks. I think that this piece may not the best example for a demo of this instrument, but it has other qualities that demonstrate very flute like behavior. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24676 Location: The Netherlands, Enschede
Audio files: 330
G2 patch files: 320
|
Posted: Wed Dec 16, 2009 5:48 pm Post subject:
|
 |
|
Good sounds, nice bit of music too! _________________ Jan
also .. could someone please turn down the thermostat a bit.
9 3 4 .. erm .. not 13 then? .. hmm, ah eight! .. yeah yeah as in 8647 .. 47 is an 88 .. pwew .. numbles! |
|
|
Back to top
|
|
 |
Dan Lavin

Joined: Nov 09, 2006 Posts: 649 Location: Spring Lake, Mi, USA
Audio files: 21
|
Posted: Wed Dec 16, 2009 6:49 pm Post subject:
|
 |
|
Scott,
I agree with Jan...very nice sound and music. It even has a hammered dulcimer kind of thing going on, so it's more rhythmic than a straight harp. _________________ Synth DIY since 1977! |
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Wed Dec 16, 2009 7:26 pm Post subject:
|
 |
|
The way I excite the waveguide - I'd say, yes it was being hammered, model-wise. The current design uses a pulse. That is certainly not a pluck model.
I'll have to think about a plucking model, probably a triangular shape at the start and released to do what it wants. As if to model a silent pull and release. The triangle would have a base the length of the string. That should do standard timbre changes depending on distance from the "bridge" that the string is plucked.
It would be nice to have more than one excitation model. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Thu Jun 17, 2010 3:25 pm Post subject:
|
 |
|
Well, I'm back to working on the phLUTe (physical model of a flute based on Perry Cook's model design).
Two problems are vexing me with this model:
1) L-o-n-g bore resonation startup times. One to two seconds, just unacceptable.
2) key clicks because of transients generated when the bore changes length.
I've decided to work on #1 first. I had done so many really desperate things to the design to try to get it to start up like a real flute (that is, almost immediate startup) that I want to back all that out. Things like dynamically adjusting the reflection filter parameters. In Perry Cook's writings, I find no mention of a need for that, so I'm starting out by eliminating that and using Perry Cook's parameters (a0=.7 b1=-.3).
Today I looked at the ADSR which I discovered was rather slow, so I fixed that so it is snappy, but this didn't help.
Future work will include stripping the model back to the original Perry Cook specifications and then diagnostics to confirm that my design is actually doing what it is supposed to do. Hopefully I will find some doofus thing I did and it will begin to work as it should.
As for #2, I want to try a sort of brick-wall filter approach, probably either an SVF or two SVFs in series for 4 pole response. I'd be happier with a sort of thump rather than a click. The filter's Fc could be set to something like 3 times the top frequency the instrument is expected to produce which should eliminate at least the high frequency portion of the clicks without affecting the tone quality of the bore output.
Anyway, back to work on this... _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Oct 31, 2010 2:46 pm Post subject:
|
 |
|
I'm back to playing with the phLUTe design, can't leave it alone. I fixed some bad things and it is working much better now.
The main problem right now is getting the bore to come to full resonance faster, especially with low notes. If I can make fast attack happen, I will attempt an 8 pipe "organ" instrument.
The model data I have is from Perry Cook's Stanford website area and I'd guess that the values given there are not optimal, rather just workable.
I've written a model adjustment program which I am using to experiment with different values. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
|
Back to top
|
|
 |
JovianPyx

Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
|
Back to top
|
|
 |
|