How to feed a Sine Bank Oscillator module with a Frequency Spectrum List With Partials

savan
savan Member Posts: 4 Member
edited December 2022 in Building With Reaktor

Hallo Reaktor users and programers. Thank you for your help. I am not very good programer but I am very happy working with Reaktor. I am trying to build a synth (with Sine Bank oscillator) that reads the spectral analysis from a given sound, or that you can feed with a text list with the spectral analysis information ( Partials and their respective volumes ). So far I can make a list in text with the harmonics partials from sound , but I am not able to connect this list so it gets translated to the Sine Bank Oscillator module . Does anyone has experience creating sounds with data generated with spectral analysis ? Or it would bee also nice to connect an spectral analyser direct into the Sine Bank module so it generates again the sound that is analysed with pure sine tones. Thank you in advance and best wishes!

Comments

  • Paule
    Paule Member Posts: 1,328 Expert
    Answer ✓

    The sine bank can't read text. So there is nothing to feed the sine bank. It's a fix module you can use by controlling. The only module you can read text is the event table.

  • savan
    savan Member Posts: 4 Member

    Paul thank you for your comment , and the event table can control the sine bank oscillator ! I will try this way , thank you again and best wishes!

  • Paule
    Paule Member Posts: 1,328 Expert

    @savan

    and the event table can control the sine bank oscillator

    IMHO no. Try it — try things people never do or forget.

  • Chet Singer
    Chet Singer Member Posts: 56 Advisor

    I can think of two ways to do it.

    One is to load your text into a table in a core cell and address the table by a combination of harmonic number and time. I've done this myself once.

    If your text is too big for a table, another way is to convert it into a wav file (done offline, not in Reaktor). And then load the wav file into a table reference Sample Map. This means that your values are limited to between +/- 1.0. But it removes all space limitations; your data can be hundreds of megabytes. Within core you will read it as a table, just as the first method.

    If, by chance, you're a programmer, I'll share a Python program that will convert a text file (a list of numbers) into a wav file.

    What tool are you using to produce the spectral analysis? If it's Sndan, and if it's helpful, I have another Python program that reads a Sndan analysis file and synthesizes (using additive synthesis) a phase-aligned sample of it. I used it to create this ensemble: Sax Sample Player Experiment | Entry | Reaktor User Library (native-instruments.com)

  • savan
    savan Member Posts: 4 Member

    Dear Chet, thank you for your help, very interesting, I am learning to program, and it will bee nice to learn to convert a list to a wav file, it makes some sense now to me that you mention it and would also bee very interesting to see what does a wav file looks like represented in text. I am using audacity spectral analyser , it will make a list of the frequency and the amplitude of each harmonic! but it does not analyses the time, if I understand it is like an average .

    I don t know Sndan, I will look for it , thank you again, it would be very interesting to see how you manage to do this process with additive synthesis, it is more or less what I will hope to achieve, maybe having some control over the harmonics after I can reproduce a sound, and hopefully modulate it in a creative way.

    Your Sample player Experiment is amassing , I will check it in with detail . You feed it with a wav with text data from the Sndan analysis? thank you again.

  • Chet Singer
    Chet Singer Member Posts: 56 Advisor

    To use Audacity's information in a Sine Bank I suggest using a primary-level Event Table, as Paule has, or a core-level Table. Either can be loaded with a text file containing numbers. And if you're doing averages then I think they'll be big enough for you to use, and you won't need to use the Table Reference stuff.

    The Sndan programs include a "phase vocoder", which produces what Audacity does, but in time-varying form rather than an average. They're difficult to use, because they run on Linux and create binary (not text) analysis results. If you don't need time-varying analysis, Sndan is definitely more hassle than you want. I had to write Python programs to interpret Sndan's output files.

    The steps used to create the saxophone ensemble are included in the description.

  • ANDREW221231
    ANDREW221231 Member Posts: 295 Advisor

    Or it would bee also nice to connect an spectral analyzer direct into the Sine Bank module so it generates again the sound that is analyzed with pure sine tones. Thank you in advance and best wishes!

    just practically demised myself in confusion putting this together, and almost thought i wouldn't figure out how to get get all the events sending properly, thought it was just down to something about sending events as audio signals, but it ended up being some mysterious mislabeling of misunderstanding about how many bins are supposed to be in a fourier transform


    this one is internally labeled 4096, which i am extremely use to meaning that there should be an output of 2048 bins or partials... for some reason this one is outputting 1024? not sure what its doing sending full bandwidth over 1024 partials but there is a proper 2048 bin FFT that can go in, just apparently not in my file collection. (it can be retrofitted pretty easily). anyway it it's officially cleared for 1000x more fun than anything ever done with an inverse FFT


    please forgive the delay, had only seen the part about reading pre-cooked tables of amplitudes which i don't know much about. but there's about a thousand fun things to do if you store the output of this into tables or indexed arrays, famously, you can also do that or absolutely imaginable with also. the ensemble itself is as stripped down as possible as included here, if you're short on ways to put this into use i can amend the file at a later time, with countless ways to interact with the sound stream ,there are a few basics which are heavy hitters in that regard


  • savan
    savan Member Posts: 4 Member

    Wooo! Andrew, this is really great, so the audio is generated again by the sine bank? impressive indeed , thanks a lot I am looking and listening and trying to understand but very impressive, I just wait to experiment some more ! :)

  • ANDREW221231
    ANDREW221231 Member Posts: 295 Advisor

    Wooo! Andrew, this is really great, so the audio is generated again by the sine bank?

    that is correct! one thing that is possible to do is to break out what it is sending to the sine bank into individual sine oscillators spread across polyphonic voices, which is kind of fun because its easier to do things like apply fm to any individual band... or even stuff like hard sync to individual voices

    what i mean is like here, each 10 hz or so gets its own oscillator on its own voice:

    i included a version doing that here. its not CPU efficient, so not really recommended for actual use, but it is handy for building intuitions on what's going on as far as resynthesis. (in this version the one labeled "Instrument" is producing the sound instead of the sine bank)


    also the two controls are for filters for the amplitudes and frequencies being fed into the oscillators, so with a low cutoff you can sort of "freeze" the resynthesis across those two domains


Back To Top