Ruby/DSP Selectable Curve Crossfader

Post any examples or modules that you want to share here
Post Reply
glitchcpt
Posts: 54
Joined: Wed Oct 01, 2014 3:42 pm

Ruby/DSP Selectable Curve Crossfader

Post by glitchcpt »

Hi Guys,

So I'm working on trying to construct a realistic sounding crossfader schematic,
And I can't seem to wrap my head around the ruby behind it, I have worked out most of the maths functions, but the if statements aren't firing correctly, I don't even know if that is the right method to use here haha :lol:

anyway, here it is so far

:edit:

I think I got the if statements firing off correctly, just need to figure out the last 2 equations :)
Attachments
Ruby CrossFader Advanced 0.2.fsm
(1.86 KiB) Downloaded 1295 times
User avatar
Walter Sommerfeld
Posts: 250
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany
Contact:

Re: Ruby/DSP Selectable Curve Crossfader

Post by Walter Sommerfeld »

Just had a little time 4 this...

here a simple solution for the last Type:

Code: Select all

##Fast Cut BUG?  # after sun mod O.K.
if @index==5
   if @x <=0.1
   then
   self.output 2, @x*10.5
   else
   self.output 2, 1 # sun mod
   end
   if @x >=0.9
   then
   self.output 3, (1-@x)*10.5
   else
   self.output 3, 1 # sun mod
   end
end

[using ur indentation]

but none 4 the 'Slow Fade'

Keep on doing!
Walter
adamszabo
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Ruby/DSP Selectable Curve Crossfader

Post by adamszabo »

I would use a min and max functions instead of the last if statements
User avatar
Walter Sommerfeld
Posts: 250
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany
Contact:

Re: Ruby/DSP Selectable Curve Crossfader

Post by Walter Sommerfeld »

Good idea adam...

like this:

a = @fader >= 0.9 ? (1-@fader)*10.5:1
output 3, a
watch 'a',a

b = @fader <= 0.1 ? @fader*10.5:1
output 2, b
watch 'b',b
Post Reply