Can I create an instrument for the left ear / speaker and a second instrument for the right ear / speaker, and play interactively with them?
Yes! It’s actually possible to address any midi CC through though an extra playback parameter in the properties argument. It’s on a per-note basis, not a per-instrument basis:
from scamp import *
s = Session()
clar = s.new_part("clarinet")
oboe = s.new_part("oboe")
clar.play_note(70, 0.7, 1.0, "param_10: 0")
oboe.play_note(70, 0.7, 1.0, "param_10: 1")
In this case, MIDI CC 10 controls pan, and I’ve normalized everything from 0 to 1, so 0 represents hard left, 1 represents hard right, and 0.5 would be dead center.
You could also use a dictionary, like this:
oboe.play_note(70, 0.7, 1.0, {"param_10": 0})
1 Like