Sine Wave - Set exact frequency (from array)



  • hello friends, is there a way to make sine wave banks read specific frequencies from an array? the fine/course ratio stuff doesn't help for my current idea, and scriptnode is too crashy ☺



  • @iamlamprey making an additive synth?



  • @d-healey yes with a specific focus on Physical Modelling. I actually got pretty far, the only issue is that the modes aren't exact, just rounded to the nearest note and modifying the fine ratio applies it to all modes simultaneously, unless I make like 600 sine wave generators 😋

    this is a conga with 1 residue sample and 1 sine gen:

    it's taking the extracted mode array and combining it with the residue file (whatever isn't the main modes) from the original sample. this means I can then change the pitch/size/shape of the conga, even add RR and have a pretty realistic, completely new sound, all while keeping the footprint way smaller than a sample library



  • @hisefilo is the additive expert around here.

    @iamlamprey Does your technique just apply to percussion or could it be used for brass/winds/strings, etc?



  • @d-healey I think it's specific to percussion, the residue is whatever's left when the main modes are extracted (basically filtered noise), so changing notes would necessitate a new residue sample (because there'd still be some modes that the original extraction missed)

    for stuff like sustained winds, i'd look at the modes for one single note, then tweak by combining with wind-blowing and keypress samples for realism, then convoluting using the body of whatever instrument you're trying to emulate. once it sounds good for a single pitch, it's just a matter of shifting mode frequencies around (you could also model things like mouth position using filters or just adjusting the modes, then add additional players by duplicating the original instrument and varying the values/panning etc)

    other articulations would also make it way more complicated than a simple drum hit 😉

    i'm very new to this, but that's my general outlook on it, it's super fun... but some people take it to entirely different levels, like this:



  • How do you extract the modes/residual?



  • it's a little tool from a Kadenze course i watched on physical modelling, the lecturer provided some example code using ChucK that I've messed with, all it's doing I think is analyzing the loudest 45 (or however many you want) frequencies at a certain point, then printing those frequencies, and their gains out to a table:

    https://www.kadenze.com/courses/physics-based-sound-synthesis-for-games-and-interactive-systems-iv/info

    the course is free btw, and covers the basics really well, ChucK is gross but in my opinion

    i dont think i can share the code, but it's in the resource section of Session 5. you could also just do it by eye using a spectrogram, then phase inverting the extracted modes with the original, there's some tools out there but I haven't bothered looking extensively, try searching "audio modal extraction"

    i think Hise 3.0 will probably have ways to do it with scriptnode, if we get a way to calculate gain at a specific frequency



  • @iamlamprey Thanks I'll check it out. I've used Audacity's spectrum plot in the past to get a similar list of frequencies.



  • Ah just found this: http://www.klingbeil.com/spear/

    super old but works on windows 10 apparently, you can select partials below a threshold, then View -> Print Average Frequencies, open console with Window -> Console, copy those values into google sheets, then Data -> Split Text to Columns and select the Space operator. Nice clean table of partials 🙂

    it also has tools to subtract audio, so you could probably use it to make a residue file as well



  • @iamlamprey Yeah I've used SPEAR in the past, it's resynthesis tools are very accurate, I also used CSounds resynthesis but the analysis files were often larger than the original samples, and I still had to record all the samples anyway for analysis 😛

    I just watched the intro to the Kadenze course, it's 5 minutes long and Perry Cook didn't blink once! Try to watch the video while having a staring contest with Perry, he'll win!



  • @d-healey he's got nothing on the creator of faust... there's a course on there with him and something about his dead stare triggers my fight or flight response 😂

    i also just realized hise is better equipped to make winds/brass etc because the sine wave generator has the ratio settings, so just find the ratios between partials and boom



  • @iamlamprey Yeah I've seen the Faust course. I created a 20 partial additive synth in HISE to emulate a flute. There are two issues, one is the attack which I haven't been able to synthesise accurately (I ended up crossfading in an attack sample) The other is that each note requires a different set of values and I haven't figured out a good way to change the values. And I haven't even looked at different articulations yet.



  • is there anything wrong with using an attack sample? at a certain point the effort required to synthesize something that would otherwise take 10mb of space seems gratuitous, at least in my opinion 😋

    what do you mean by different values? every note has different relationships between partials? what a headache...



  • is there anything wrong with using an attack sample?

    Not really, but it still means I have to spend time in the studio recording and editing.

    every note has different relationships between partials? what a headache...

    Yes


Log in to reply
 

27
Online

810
Users

3.0k
Topics

25.5k
Posts