Today I encountered a problem which leaves me clueless. I tried out many variants but I couldn’t found the reason of the problem or a solution. The delay in the third line of the following group is ignored and the macro is instead executed immediately:
NOTE 6400 2/3 ; E4
group TremQuart_1 {
VZ1 play $offms 1
@fi_fast(“VZ1”, -1, 40) // first macro
($durms)ms @fo_late(“VZ1”, -1, 75) // second macro, delay ignored!
75ms VZ1 play -1
}
I could verify that the value of $durms is about 3000, as expected. I also replaced the delay in millis by 2 beats, what didn’t help either: The sound produced by VZ1 is always stopped immediately instead only after 3 s (or 2 beats). If I replace the first macro with a message line, the result is (almost) as expected.
NOTE 6400 2/3 ; E4
group TremQuart_1 {
VZ1 play $offms 1
inmix VZ1 -1 40 // message instead of macro
($durms)ms @fo_late(“VZ1”, -1, 75) // delayed as specified
75ms VZ1 play -1
}
I don’t understand why. Is there something wrong in the syntax of the macros?
@MACRO_DEF fi_fast($object, $tolevel, $millis) {
group {
@local $fil
curve
@grain := 5ms
@action := {
group {
inmix $object $fil 5
}
}{
$fil
{
{ -96 } @type “circ_out”
($millis)ms { $tolevel }
}
}
}
}
@MACRO_DEF fo_late($object, $fromlevel, $millis) {
group {
@local $fol
curve
@grain := 5ms
@action := {
group {
inmix $object $fol 5
}
}{
$fol
{
{ $fromlevel } @type “exp_in”
($millis)ms { -96 }
}
}
}
}