1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Convolution in R6?

Discussion in 'Feature Suggestions' started by Chet Singer, Sep 23, 2010.

Thread Status:
Not open for further replies.
  1. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    Hello guys,

    Can you reveal whether there are plans to include convolution in an upcoming Reaktor update? I have a physically-modeled bowed string synthesizer running in Reaktor now but I use an external convolver to mimic the wooden body resonances. I'm not loading it into the UL unless I can include the body modeling along with it. If no convolver is planned I may try to create a wooden body filter in Reaktor itself. But that's probably a couple of months work and I don't want to begin if a convolver is on its way.
     
  2. herw

    herw NI Product Owner

    Messages:
    6,421
    i don't think so because convolution is an absolute special application. Only a few are able to use it. REAKTOR's intention is to satisfy many users to make synthesis. Such a tool would be so complex that its functionality wouldn't be safe.

    herw
     
  3. Moujik

    Moujik NI Product Owner

    Messages:
    1,761
    I think a lot of people would be interested in a 'black box' convolution option - a module with audio inputs, audio outputs & ability to input impulses similarly to samples in the current sampler modules.
     
  4. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    While such an engine could be complex, all I'm looking for is a primary-level module that has an audio input, an audio output, and a dialog box for loading an impulse file from the disk. That would be enough to model rooms, amp cabinets, instrument bodies, etc.
    ---
    Whoops, I see Moujik beat me to it.
     
  5. herw

    herw NI Product Owner

    Messages:
    6,421
    and where do you (better: the rest of the users) get the impulse file from?
     
  6. Moujik

    Moujik NI Product Owner

    Messages:
    1,761
    There are 100's (1000's?) of impulse files available for free download online. Heck, NI could make some money selling 'impulse packs'.

    Unless I've misunderstood the question, this is like asking "where do you/users get samples from?".
     
  7. herw

    herw NI Product Owner

    Messages:
    6,421
    no, you didn't misunderstood my question; which means: if you want to use a convolution file you have to buy if you want high quality.

    that's not the idea of REAKTOR - so i think there will be no release of such a module - it is a special application.

    Wouldn't it be cheeper to buy a special made software?
     
  8. Moujik

    Moujik NI Product Owner

    Messages:
    1,761
    OK; I suppose I would be more interested in using more unusual applications of the technology, such as using a drum loop for the impulse, rather than using it to get a very high quality reverb.

    Also, NI seem to be developing more & more products using convolution; it would be nice if Reaktor got something back for a change ;)
     
  9. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    I've never paid for an impulse file. You can go to places like noisevault and download many that others have made and offer for free. And I've also made my own; all that's needed is a microphone. My own bowed string ensemble uses impulses of violins, violas, and cellos that I made myself using nothing more than a mic, a metal bolt (used as a striker), and some cotton balls to deaden the strings.

    The applications are unlimited; you could play a thunderstorm through a twanging rubber band, for example, or a tambourine through a car crash. It's an amazing and easy-to-use synthesis tool that I think would add a lot of excitement to Reaktor.
     
  10. cookiemonster

    cookiemonster NI Product Owner

    Messages:
    151
    Hmmmmmh,
    a convolution module seems to be quite a popular request.
    If I remember my dsp-lectures correctly it´s "nothing more" than a matter of organizing lots of multiplications, additions and delays - which is pretty well possible in Reaktor.
    So I am asking myself why this hasn´t been done yet by the community.
    I am pretty sure that it already exists and is hold back.
    Best regards, Gerald.
     
  11. herw

    herw NI Product Owner

    Messages:
    6,421
    The problem is, that the impulse file maybe very large. Yesterday i phoned with Gerald (cookiemonster). As i understand him right, calculating requires a nested for-to-do-loop (circular convolution).
    This is not a simple structure but possible.

    ciao herw
     
  12. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    Wooden body impulse files are typically about a half of a second long, depending on the size of the instrument. I wouldn't attempt to convolve such a file in Reaktor (for one thing, I wouldn't know how). Instead I'd use a modal bank with about 50 or 60 resonances. I've experimented with them before. But they're time-consuming to tune, and my attempts have never sounded as realistic as using an actual acoustic impulse.
     
  13. lxint

    lxint NI Product Owner

    Messages:
    764
    thats right

    also the term convolution is somewhat unfortunate since any filter operation is convolution

    the kongrosian piano actually uses convolution btw
    however it uses a special technique which reduces the number of operations required by a factor of 60 or so its 50 operations but the filter kernel is 4096 samples long I think

    for conventional convolution the number of operations that can be done within a core cell was about 200 or 300 if I remember correctly
    an example for this had been posted in the forums long time ago

    so no-one holds back its already made public

    if the modal bank doesnt sound as realistic as "full" convolution this is because
    a) the overlaping filter bands will result in a slightly different spectrum and
    b) the time information ( phase ) is missing

    however body responses are close to minimum phase like the model bank
    and the smaller the body the less audible information is in the time signal
    I think with anything the size of a guitar or smaller you cant tell the difference if its done right

    and of course you can add the phase if you use your own modal bank and add an allpass stage for each band so you could create pretty long and quite exact convolution with a filter bank

    the kinderklavier uses a modal bank plus an fdn for the body and its pretty convincing

    btw the reduction in operations in the method I used for Kongrosian and whats needed
    for a matched modal bank is about the same, and I wouldnt be surprised if NIs "patent pending convolution" does use one of the two methods,

    why dont you publish all your files in the user library and see if s.o. comes up with a fitted model ?
    I doubt you'll get an answer about r6 when we dont even know if there are any plans to fix the bugs in r55 anytime soon ...
     
  14. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    Well, I just received an email advertisement for "Reflektor", which appears to be a new NI convolution product. So that pretty much answers whether convolution will be included in Reaktor. Bummer.

    I'll check into the modal bank. But I haven't yet been able to get it to work as I wish. There's something about event processing that I'm not understanding.

    I'm not publishing the string model in the UL until it includes a body model, though. I don't want my name attached to something that doesn't sound good.
     
  15. lxint

    lxint NI Product Owner

    Messages:
    764
    did you see the tutorial ensemble ?
    I started working from there

    but I also had some strange behaviours where I am not sure if I did something wrong with the event oders, what I think is you have to make sure that not more events are sent then the number of partials
    I never figured out what it was

    heres a not so quick recipe how you can create a fitted modal bank

    1) load your response in the free sw praat
    then use -> to spectrum, then -> cepstral smoothing, then > to sound
    now cut the first half of the sound and paste it at the end

    ( what you have now is a smoothed linear phase response )

    2)
    then you need a little mod of the ezfft analizer, change it so
    that it always reads the same 1024 samples from a table in a loop
    ( just add a little 1024 repating core counter to read the table )
    and delete the follower and af2db in the core cell and save the result
    in the table thats already in the ens, but change its range from 0 to 1

    now you have the amplitude magnitude spectrum, smoothed

    for this you have to make sure that your original sample wasnt longer than these 1024 samples so you use the first 1024 samples of your response


    the indexes in the fft table are harmonic multiples of F = SR/1024 , so each bin relates to a frequency
    F = SR/1024 * (tableindex+1)

    3)
    now
    - either use a different ens or some additional logic to rewrite the fft index based amplitudes to a pitch based new table
    ( also you need to create another table that holds the frequency factors for the pitch based table )
    - or simply use the frequency spacing of the fft ( in this case your frequency factors are simple harmonics 1,2,3...512)

    4)
    now plug this table into the tutorial ens for Amp
    ( change the tutorial ens so that it doesnt react on MIDI gate/pitch but just uses an intial event )

    the spectrum of this filterbank will not exactly match your target spectrum since the filters bands are overlapping
    you can either ignore this or record an impulse response of a prototype filter bank
    and substract the deviation from unity magnitude from your target levels

    for this your prototype bank should already have the desired decay settings :

    5)
    for decay you can either use a standard "natural" decay of -6 dB/octave ( per log2) or calculate decay from your response :
    create another smoothed kernel in praat, later in time in your recording, and calculate the magnitude table with the fft again

    then for each bin calculate the difference in magnitude per time, convert time to db + add an adjusting constant

    now you have 3 tables, pitch spaced frequency ratio, amplitudes, decays
    which can be plugged into the tutorial ensemble and thats your matched filer bank

    sounds like a lot of work but its less work than its sounds like ( though Hofstaedters Law applies as usual
    and for anything Reaktor I think its Hofstadters Law squared )
    and : maybe the result will not meet your expectations sound wise, since time delay is still missing
    and the filter bank is not exact etc

    alternative : post your ens plus response, and link to a free convolution reverb - why not ?

    since this is in the feature suggestions section : I suggest that R55 bugs get fixed
    also it would be super nice if "reload table data" wouldnt prompt a "sorry this file format is unknown" message even though thats a R3 bug
     
  16. Chet Singer

    Chet Singer NI Product Owner

    Messages:
    822
    Wow. That’s just amazing that it can be done. But much of it is Greek to me. I’m going out of town for a week and will be without my computer. But I’ll give it a try when I get back.
     
  17. cookiemonster

    cookiemonster NI Product Owner

    Messages:
    151
    @Ixint:
    Hi G.
    These two posts of yours are quite hard to chew on (especially the last one).
    Since Reflector has been announced there have been no further requests for a convolution module - which has been expectable.
    I haven´t tried it yet, but as I prefer Reaktor in stand-alone mode I´d love to have s.th. like what you have described.
    A Kernel lenght of 4096 appears to be pretty small as impulse responses of high-end hardware easily can have a length of 40.000 - 65.000 samples.
    So - do you see any chance to implement such high-end procedures ?
    Btw, good to know someone back who REALLY knows what he´s talking about.
    Best regards, Gerald.
     
  18. lxint

    lxint NI Product Owner

    Messages:
    764
    still you could use a filterbank for a long response
    ( iir in fact ;) )
    but I have to say that I am not sure how it is done usually
    my guess is that usually people use multirate ffts so you have one or more ffts at lower sr for the low fqs and ffts or fir filters at higher rates for the immediate response etc - though IMO it makes as much sense to use a ( multirate) filterbank since it can run with ( close to ) 0 latency ( some latency introduced for resampling )
    then you would use fft plus some to set the filterbanks parameters
    this would then result in the even workload Reflector is marketed with ( though the EZFFTs also have an even workload... ;) maybe I should have a closer look at the alleged patent but it seems it hasnt been published yet )

    note that you can build an fft equivalent filterbank with high q truncated impulse response filters ( wich are basically recursive sine oscillators )and you could also use such a filterbank to analize the signal
    a standard procedure for measuring the quality of audio codecs is done with such a filter bank for instance

    now back to reaktor you can not use the modal bank to precisly match the response since there is no phase control etc, and a custom bank in core or primary would be much less efficient and with fft I dont see a way that makes much sense either

    so what I described is a hack for builders not a tool for musicians
     
Thread Status:
Not open for further replies.