OK i'm building a mixer channel and concocted this badboy from my head, It works 🙂 but is it the correct way to do volume and pan on a stereo channel ?
The pan works from a knob or slider with a 0-1 value.
I'ts probably wrong but i'm happy it worked 😉
Mr bodge is back in town 😀
EDIT* Actually anybody know how i should make an EQ ?
Should i try and mod Jorges EQ ?
I'd like it to be parametric though.
I added this for an aux send, How do i code a switch so i can make it pre or post with a button ?
I'm guessing using masks somehow ?
You can't have multiple outs on a VST at the moment so i would be building the aux FX in for now 🙁
I also just noticed that its cutting the volume in half when centered because of my pan setup, So some rethinking is needed there DOH
stefan ·
Use the RBJ peaking filter for a parametric EQ.
Also, on a stereo channel I'd say that it's "balance" and not "pan", apart from that, it seemed to be correct 🙂
Instead of (pan*-1+1) you can write (1-pan) though.
Nu Audio Science ·
Cheers Stef
Any ideas where i can find out how a balance code would work ?
Actually now you pointed out that pan thing isnt pan*1 the same as pan ?
stefan ·
Nu Audio Science wrote: Cheers Stef
Any ideas where i can find out how a balance code would work ?
Actually now you pointed out that pan thing isnt pan*1 the same as pan ?
The balance code works the way you've done it. It's pan that doesn't work like that 🙂 Pan works with mono signal being mapped to a stereo output.
pan*1 is the same as pan, but you had pan*-1, so I just simplified your expression and got rid of a multiplication, making the code more efficient.
Nu Audio Science ·
No i meant i had a pan*1 aswell as the one you simplified 😉
Thats two i can take out 🙂
Seems like a real crappy way to do a balance because when the pan is half way .5 it is cutting the entire signal by half ?
Or is this compensated in the master channel ?
Nu Audio Science wrote: No i meant i had a pan*1 aswell as the one you simplified 😉
Thats two i can take out 🙂
Seems like a real crappy way to do a balance because when the pan is half way .5 it is cutting the entire signal by half ?
Or is this compensated in the master channel ?
I'd probably scrap the l and r variables as well and write directly to leftout and rightout.
Nu Audio Science ·
DOH 😀
Okay i updated the code above 😉
I still dont like this way of doing balance ade losing half the signal, I'm going to try and find another way to do it 🙂
Probably take me all year 🙂
stefan ·
Nu Audio Science wrote: DOH 😀
Okay i updated the code above 😉
I still dont like this way of doing balance ade losing half the signal, I'm going to try and find another way to do it 🙂
Probably take me all year 🙂
What do you mean with losing half the signal?
You mean that it gets "half as loud as it was before the panner" when being panned to the middle?
That is fixable. Hold on, I'll make another post here in a jiffy.
Nu Audio Science ·
I've just tried a couple of the hosts i own and it seems that they just make the centre volume louder so that when you pan it is in the red, I guess i'll just do that
Sorry for the delay Stef i had been off converting your other version to something very very similar to this and yes it works 😉
Cheers
Now i must work out a mute solo section, I remember when i did this in SE there was about 500 connections 🙁
Nu Audio Science ·
You know i think i'm gonna seperate the balance code so that i can have both types on a selector 🙂
Tom7777 ·
Nice to see your starting to code NAS 🙂
Nu Audio Science ·
OSM Here
This OSM has the two differing types of balance on a switch.
Is the code component the best bet for this ?
I may build LFOs and so on into the mixer so i guess the code somponent is the way to go, It doesn't seem to use much CPU anyway ?
Tom7777 ·
Thanks NAS 🙂
JMH ·
All you need now is adding a 'pan law', possibly with selectors for user preference 😉
Just had to chime in, as this is one of those things I've been thinking about (with pen and paper) but haven't gotten around to build yet.
Would be a timesaver if it was available 😉
Pan law - attenuation of signal level for compensating the apparent raise in volume when signal is panned in the center. Different hosts offer it either with hardcoded level or a couple of choices. Arguments aside on which sounds the best, choice between -1.5dB, -3dB, -4.5dB and -6dB would be ideal.
Regards,
JMH
Nu Audio Science ·
Yeah i will be looking into mono channels soon.
Remember with me though that stuff gets invented if i think the normal way is crap 🙂
I never believe in making a wheel rounder.
Stef helped a lot with the better balance algo infact its pretty much all from his code.
We both knew what it had to do but he actually got it to work 🙂 🙂
Cheers Stef 😉
unkargherth ·
Here is the result of what i understood from JMH proposal
By the moment it's a float version. If it's ok , i convert later to code module, and that way it can be used modulating pan at audio rates
Could you, JMH check if it's correct ?
JMH ·
Will check it out. As soon as I install the latest version.
Jorge and Malc are animals, every time I check out the forum there is a new version available 😀
Regards,
JMH
Nu Audio Science ·
Unk anychance you would let me have a go at converting it to code ?
I'm trying to use converting schematics to code as a learning tool and it seems to be helping a lot 🙂
I will obviously need people to check the code 🙂 🙂
unkargherth ·
Do as you want. In fact i'm still not sure if what i've done is correct, waiting JMH approval. But you can , of course, do with it what you want
Tom7777 ·
Unkargherth i think it work well, Thanks dude 🙂
JMH ·
Sorry, still haven't checked it out... forum discussions seem to take most of my time on the computer.
But will do now, as soon as I've installed yet another latest version of SM 😀
Will get back to you soon.
Regards,
JMH
JMH ·
Seems to be working as it should, congrats 🙂
Weird, encountered my first ever crash in SM - added this to Smeemono2, knobs to control it, and all of a sudden SM died one me while I was repositioning the pan knob on screen...
Regards,
JMH
djhayman ·
Hello, i have read through this topic and am very interested in the aux send/reutrn part of the mixer.
I am building a multi fx vst and would like to be able to place any effect to be placed in any order.. If possible it would be cool be be able to route the chain back through the same effect twice, eg:
delay, reverb, flange, delay. This is not however vital. The main thing is to be able to place any effect at any point in the chain.
All my effects are stereo, i can supply screenshots and an osm if needed,
cheers
Dan
infuzion ·
Pack can take 4 mono channels as input, effects are usually stereo mono, so you can use 2 stereo pair using Pack/Unpack.
djhayman ·
Hello, thanks for your reply, but i am afraid i don't follow.
I am aware what the pack and unpack tool can do, but how do i implement them in an insert style?
At the moment i have 5 effects, therefore i need 5 separate inserts along the signal chain. This would allow all effects to be placed along the signal. I am struggling to figure out how to divert the signal through the chosen effect then back into the main signal. Do i need 5 copies of the same effect but the controls routed from one master?
Cheers
Dan
infuzion ·
djhayman wrote: I am struggling to figure out how to divert the signal through the chosen effect then back into the main signal.
That already happens Dan; I think all of SM's effects have a Wet/Dry mix.
djhayman ·
thanks for replying.
Sorry i dont think i am explaining myself properly. I am building a multi effects vst with effects i am making myself, not ones pre built, i have incorporated a wet/dry mix within each effect module. Part of my brief is too enable any effect to be placed in any order.
I have been experimenting with multiplex and selects but cant think of a solution without creating multiple copies of the effect for each stage of the main signal. This is very CPU heavy.
I have also experimented with the pre built routing matrix but again cant think of a solution.
Cheers
Dan
infuzion ·
djhayman wrote: I have been experimenting with multiplex and selects but cant think of a solution without creating multiple copies of the effect for each stage of the main signal. This is very CPU heavy.
If you want to get this done quickly, this is the route I'd go on. It won't be CPU heavy if you connect the audio path of each effect in a group only to the Selector/Multiplexer, since that module will only be engaged if there is an audio path to it.
Wrote something here? To have a post removed or your name hidden, write to [email protected].