Control in play_pattern_timed

Hello everyone.

I am trying to understand the syntax necessary to use control and change for example the pan or amp using play_pattern_timed

use_synth :fm
with_synth_defaults amp: 1, pan: -1, slide_pan: 1 do |x|
use_octave 2
play_pattern_timed [:c4,:d4,:e4], [1, 0.5,0.5]
control x , pan: 1
sleep 1
play_pattern_timed [:f4,:g4,:a4], [1, 0.5,0.5]]

Thanks a lot

I suggest using fx wrappers for ;pan and :level like this:

use_synth :fm
with_fx :pan,pan: -1,pan_slide: 2 do |x|
  with_fx :level, amp: 1 do |y|
    
    
    use_octave 2
    
    play_pattern_timed [:c4,:d4,:e4], [1, 0.5,0.5]
    control x,pan: 1
    sleep 1
    control y,amp: 0.5 #abrupt vol change. could use slide
    play_pattern_timed [:f4,:g4,:a4], [1, 0.5,0.5]
   
  end
end
1 Like

Thanks a lot @robin.newman

interesting way to solve the problem