Global (or multi-track) Fade Out and Fade In

mardi 19 juillet 2016

If you've read a couple of the other threads I've participated in this week, you will know I'm new to Mobius. I have read all the manuals and though I think I understand the Scripting manual, I am not yet in command of the Scripting language. Bottom line, I'm not getting things to work the way I think they should, if I understand the Scripting manual correctly. Which I probably don't:). I haven't done any programming since I was a kid with a Radio Shack color computer trying to frustratingly write in Basic.

Specifically, I have three Scripts I am trying solve/write and if I can get these three to work, I will be able to use Mobius like how I was using three Ditto X4's but in a much more compact footprint (and hopefully less buggy). I decided to break the three into separate threads so future new Mobius users will easily find them if that is what they need (the third is already ongoing in the General category, thanks Dave!)
Problem #1 - Global Fade Out/Global Fade In

Actually this is meant to be on just tracks 1, 2, 3, 4, 5 and 6.

1st attempt:


!name Global FadeIn-Out Test

for 1,2,3,4,5,6

if output = 127
Call "fadeOut"

else if output = 0
Call "fadeIn"

endif

next

end

This works except it only does each track one at a time. In other words, I press the footswitch, It fades Track 1 to zero, after it hits zero then Track 2, etc etc. The second footswitch press does Fade In but with the same problem: First Track 1 fades in to 127, then Track 2 fades in etc etc.

Second attempt:


!name Global FadeIn-Out Test3

for 1

if output = 127
Call "fadeOut"

else if output = 0
Call "fadeIn"

endif

for 2

if output = 127
Call "fadeOut"

else if output = 0
Call "fadeIn"

endif

for 3

if output = 127
Call "fadeOut"

else if output = 0
Call "fadeIn"

endif

for 4

if output = 127
Call "fadeOut"

else if output = 0
Call "fadeIn"

endif

for 5

if output = 127
Call "fadeOut"

else if output = 0
Call "fadeIn"

endif

for 6

if output = 127
Call "fadeOut"

else if output = 0
Call "fadeIn"

endif


next

next

next

next

next

next

end


Same problem.

I really like this script that I found in the Yahoo archive:

!name Global Fade Out
!autoload
#
# Fade the output levels of all tracks slowly to zero
# This one is tricky because this pattern:
#
# for *
# while output > 0
# ...
# next
# next
#
# will fade each track in sequence, not at the same time.
#

Variable done false

Message Starting Global Fade

while !done

set done true
for *
if output > 0
set output output - 1
set done false
endif
next

if !done
Wait msec 50
endif

next

Message Global Fade Complete

end

And I tried to modify it to Fade In like this:

# This one is tricky because this pattern:
#
# for *
# while output > 0
# ...
# next
# next
#
# will fade each track in sequence, not at the same time.
#

Variable done false

Message Global Fade Out

while !done

set done true
for *
if output > 0
set output output - 1
set done false
endif
next

if !done
Wait msec 50
endif

next




Variable done false

Message Global Fade In

while !done

set done true
for *
if output = 0
set output output 127
set done false
endif
next

if !done
Wait msec 50
endif

next

It still fades out but does not fade back in. Any help is much appreciated. I have found a half dozen other Global Fade scripts but I can't get any of those to work. I'm hoping to getting back to working on my compositions instead of struggling with scripting asap!


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor