How to Mix Two Samplers like Two VCO OSCs



  • How to Mix Two Samplers (Gain and Pan) like Two OSCs found in any Dual VCO Synthesizers?



  • @Tania-Ghosh said in How to Mix Two Samplers like Two VCO OSCs:

    How to Mix Two Samplers (Gain and Pan) like Two OSCs found in any Dual VCO Synthesizers?

    Gain as an example:

    Add a simple gain to each Sampler

    use the logarithmic law to cross fade these values



  • @Lindon What is Power law?According to Google it is "What is the Power Law? The power law (also called the scaling law) states that a relative change in one quantity results in a proportional relative change in another."

    How can I do it with HISE?



  • How can I do something like..... When the Knob is in Center Two Samplers will be in equal Vol.. When the Knob is at Min or Max pos the one sampler will be at full and other will be at zero respectively?.



  • @Tania-Ghosh

    The knob you want at full set to the same value as the master knob, the knob you want at zero set to 1- the master knob's value.



  • @Tania-Ghosh logarithmic law ()sorry thats my mistake)...wikipedia tells you this:

    Logarithmic
    Another type of curve is called the logarithmic ratio (also known as "audio taper",[17] or an inverse-logarithmic ratio.[18] the log/audio-taper more closely matches human hearing, with finer control at lower levels, increasing dramatically past the 50% point. Here it is important to remember that the perceived volume of a sound has a logarithmic relationship with its level in decibels.[2] A fade that works on a logarithmic scale would thus counteract the curve of a linear fade.[2] In fade-ins the shape of the perceived volume curve looks like the level in decibels pulled towards the middle part of the line to the bottom right corner.[2] The fade-out in turn looks like it has been pulled toward the bottom-left corner.[2] A logarithmic fade takes a line that has already been curved and straightens it out [15]. The logarithmic fade sounds consistent and smooth since the perceived volume is increased over the whole duration of the fade.[2] This makes this curve very handy for fading standard pieces of music. It is best used on a long fade-out since the fade has a perceived linear nature.[2] Also a fade-out sounds very neutral when incorporated to parts of music with natural ambience.[2] In cross-fades this type of curve sounds very natural. When this curve is applied the perceived volume of the fade's midpoint is at about 50% of the maximum – when the two sections are summed the output volume is fairly constant.[2]



  • @Lindon

    Content.makeFrontInterface(500, 400);
    const var SimpleGain1 = Synth.getEffect("Simple Gain1");
    const var SimpleGain2 = Synth.getEffect("Simple Gain2");
    
    const var Mix = Content.getComponent("Mix");
    
    inline function onMixControl(component, value)
    {
    	SimpleGain1.setAttribute(SimpleGain1.Gain,value*(-2));
    	SimpleGain2.setAttribute(SimpleGain2.Gain,value);
    };
    
    Content.getComponent("Mix").setControlCallback(onMixControl);
    
    
    HiseSnippet 1350.3oc6Y0saaTDEdVauUwNjnVTKEwUqh3BGTajsIEPBUUm3DCQjerxllBWUlr633QY2YLyNanVUQh2L3B38.wSPeCJmYVu1yl533ZZIjf8EQYN+semyb9a01Rv8HQQbAxp3A85RPVefsaOlrSiNXJCs0FHq6auC8ENQ3vtADAwYa5IDmCarGZ8dcwQQDejkU9uQIrUwBH8uW8j0wAXlGYHID5PN0irMMjJGRsU8uiFDzD6SNfFZH8p02xiyZvC3w.vxaWA0E6cB9XxtXkX4rQV2ZSepjKbkXIIBYUXcteO2N7elkH+gzH5QAD0gpHWvPIjaxC7UHV8+nFcnA9sRC.QHvnsFFNxmDNtK389zAzGFVtslgyPMLiGV4FG7pd4vq5nfmkA7Jj.u6X65InckC4nv171awjDQaLbEXBqDYQ41ImcCNHAStRH9DRSAbXfFkeTkJOvY0JUV9qWnDbMDIcNEKbbopD.0EcUmG6nyQV4Xhby1sIdxxKkv1QyeoKRyZWhl0zZZpqJ06wNofEzpAOrKmAGJuDvqu7TV.kQbZGy7jTNygy.dJkD7fxdoZ7.vhAwjkWnzKWnTQC+YkHhbMoTPOJVRJaxP82Gn05yJ+vZKqdZFJV6hTrlghJcNSixw3EJC0GuMvAAGAY6kMcBkQL7tc4RxdrxKW5kkJV5rRNmmU61ijWeiAkwijspFTLNEKyhCOhHRiioBBIiYy1mexx18RhGFBxYawnx85R5e1rdH0qS4VAMvYMIMzGMopcsQH1PRuY4Fp+8kpvqu3fnRcY2h8K6bCn9DAhBXzV0lDoiLls8POcqMvRbpQ.6AOitDgjphTVaPNEZKlTKWzdCRzIRdWsr8SPflRWxi7ECdb+BodugO6CqGloo7uFR88CHs3QT00ZFP9lMVf1ab+3.rLaOOUdceFJaX1bQ0.gA1tm4ff2hFgUl3FgSJbuicKpzqynwatQfW3V58Md6OVYA6j1eCAaA6le+zNCY5fxhIPYdaWn4otsrFHej9ryyvmBMkILhPETqdQi6+sO4r+XRG22chG2ummDd7GHvrnt7nLF1kDRO.JMhLI9zHXHF4m1WcKaRuAGKFIqW8jlfSNRcbwxXgNcYsPdLSlI8He16D6IqSW1pFC4ujA9EtB1G4ceY3+7tF4mL3dIqLULEiICp2jcJI.ZEqw3GB8daiiCjoTylvuCmw61gyndlYC6SfQ+GeLQXh8Q5PvRBvH8gTta88IADrYl8mVeaHiDKf3DYJiEUm7Xw3tu9X6D35npRctYzsO+Mnt8uEuPi4U9bCd+tA6opgxh1l6tOlWqCg1fDfyD.eF0GlZLfvOTeDSB1BpnDxV7.r37g+7uqRsKLw4HJW55SNspsDDxuNAXcJw0G.ea6V3+KjPrOOVRYGuCFFo.azauabnKrNjGAfJiQBTKaXkSsRSx4JpyI6Cw70GdM7qOyppyV8YVMk4+JOCiv98R2uTsJ4v8Kum9batHbBVu7G+qW+6u2WurpokOGuZY6+IiYYEOgTFoTtWSv8Ljat5oDqYRDR8xXL3bFKod8NiiaxvPhkKA7F+8h7.mUE6LyMaEGDQzUfF18OMHWyj72hE9v8h2U3Ft2Z1FtWUa3Va1Fty1v8+ea3Va1Fty1vc1Ft2L2vchCIpuqz0lav6aCa6UyQ2724pu6+MkWUID6I3O2K4S6n5wNmlB32L8mYtn8NpyNUS+pN11UVoBJDVB84ddpIbODhOiVmZSgNe9TnypSgNOZJz4KlBc9xoPmuZr5n1+esXIOLI+GHzZS8WWyxJ4cizkBn+FveENK3
    

    I have tried as far I have learnt HISE in One month.. can you correct me ? What am I doing wrong?
    Logarth.zip



  • @d-healey Logarth.zip
    I have tried as far I have learnt HISE in One month.. can you correct me ? What am I doing wrong?



  • Your knob only goes from -1 to +1 is the range you want?



  • I have to go out now but here's something to get you started: (this goes all the way to +36dB so don't press a key or you'll be deafened!!!).

    HiseSnippet 1347.3oc6Y80aaaCDWx1pH1cIncnccX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xiRWV2iERECkdj+cr0bkQ0ZtvG.lCW+21d2KNjexf6UPtoXJFiaqtI8DrKTfNBieJTQrKJzUjJc375sYTleOFkXqdnuGFZTezQXtJ1GoCAszgtuYRtW88vtXjZB7WVeKHwCw2NtB8zDKpN4whwcd84Fwv0TdYz7iih54m0Jpe8bLuvfWeMfIYz1ujgJy5w7nqMp2D6hFJn8BhCzPHisQ8QTjuMbKhK5vbQ7KFxyec4mEl37BoKM6jGKKEAg7YI.GkRL6.36XzA8egDh8XgBB8nsQPaDfFtwNgdV.SGaL.UJE6Je0idNIak3wUjiio5PchF7V3Whxpxw5IJqlp78xdnD1ueJ0QIKwLpi2OZbWF2aBXN9y+0a+8abliUUW4KnqlptlXQHc3oGKZnYIcuVf6oLuEpmJrlpPH0anECFOzJIenmxvMoHHwxBCdiytA1fyJicp4lcBcCvQ2.UV2+TQbMUweOh6.mK127jWu0bxqenHuVaN404jW++A40ZWN40Wu94yIuNm75bxqyrjWm3Ph7C5LybB9.CfHWMynB9le3q3+wxqP7P1b1Ksi+9MxZrKDIA7aZz22snw1xwlUS+zMxOwQEMOf34Ksskc0dDDeFsM0lBa9povl0lBad7TXyWOE17MSgMe6XsQx4e8PAyKN+GDzYynOgltd7ydhtJn82..jxX+
    


  • @d-healey OK, take your time......
    Yes, Very Loud 😆 But somehow I have managed to change the Value. Now the problem is in each side the sound is very loud and in the middle the sound is very quiet.

    HiseSnippet 1353.3oc6Y0saaaCEVx1pH1YIncnccWJDrKb.ZCrcR2OnnHNwIYyX4Ginz1sqZYjni4hDoJEUV7JJvdM5c60X20Gk9Hj2fsCojroyrS7LZZqaiuH.7b34nOd3ge7SQs3LWbTDiaXV7ftgXCyuvxoKUzoQGDgZzbCCy6ZsC4T6HTPnOlis2lbL19IM1yX8tgnnHrmgoY9eTNYyhELT+Na00Q9HpKtuICimvHt3sIADQeqsp+yDe+sPd3CHAZydk5McYzFLeVL.r7VULBQtGiNBuKRNsbVFl2XSOhfwcDHANxvrv5LutNcX+NM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mkxe+H.t6yhED5Q6ffqQ.Y2V6FG3.Jcbw.ToTru7sdLyIUqjLthbbhTGpmZv+.+RcVUN1L0Y0LmuWdFZk86jIcTpRruzw6nF2lwCFCkiOOW2WbkqbrpdlOmuZ591.KhoCN8DSCLK4xaKX4oMuYpmYrltQn0afjAiGHSxWzSa3lTDzX4fgUi2dQtvhUV6z6MaE6GgUm.0x6a0LWS27Og3dv9h6Uu30abs30OThWqcs30qEu94g30Zi7++vxKm+MWKd8ZwqWKdcpU75XWRjePmolcv6ZAB4pYqH7s+vy3+oxagDfb4rm4l78ajbrynr.qap566VzZG4X6pYe5FKqJKUwH.Dd9LWW4sZ2GpOCOlZSPLKOAwrxDDyClfX91IHluaBh46uvXjZ9WKVvBR5+ACs1T8IzLMSdsG0QAi+Ef5Y2X5
    


  • @Tania-Ghosh - which is why you should be using a logarithmic scale - you are using linear....



  • @Lindon Got it ..but how? I don't know HISE very well.



  • @Lindon How can I convert it to log ? From API I have found Math.log(var value)

    SimpleGain1.setAttribute(SimpleGain1.Gain,Math.log(1-value));
    SimpleGain2.setAttribute(SimpleGain2.Gain,Math.log(value));
    

    Something like this??



  • @Tania-Ghosh said in How to Mix Two Samplers like Two VCO OSCs:

    @Lindon How can I convert it to log ? From API I have found Math.log(var value)

    SimpleGain1.setAttribute(SimpleGain1.Gain,Math.log(1-value));
    SimpleGain2.setAttribute(SimpleGain2.Gain,Math.log(value));
    

    Something like this??

    Somethingn like that yes - try using

    Console.print() to see what values you are getting - and then adjust to suit your requirements.


Log in to reply
 

17
Online

1.1k
Users

3.8k
Topics

33.4k
Posts