You could try something like this, although I’m realizing I have some improvements to make!
from scamp import *
notes = [
# Channel, Track, Time_Start, Note, Dur, and Vel
# Track 1
(1, 1, 1.0, 60, 1.0, 100),
(1, 1, 2.0, 66, 2.0, 100),
(1, 1, 4.0, 62, 4.0, 100),
(1, 1, 6.0, 66, 2.0, 100),
# Track 2
(1, 2, 0.0, 62, 4.0, 100),
(1, 2, 2.0, 66, 2.0, 100),
(1, 2, 5.0, 60, 1.0, 100),
(1, 2, 6.0, 66, 2.0, 100),
]
channel1_track1_notes = [
PerformanceNote(start_beat=note[2], length=note[4], pitch=note[3], volume=note[5], properties=NoteProperties("c major"))
for note in notes
if note[0] == 1 and note[1] == 1
]
channel1_track2_notes = [
PerformanceNote(start_beat=note[2], length=note[4], pitch=note[3], volume=note[5], properties=NoteProperties("c major"))
for note in notes
if note[0] == 1 and note[1] == 2
]
perf = Performance([
PerformancePart(ScampInstrument("Viola"), voices=channel1_track1_notes),
PerformancePart(ScampInstrument("Piano"), voices=channel1_track2_notes),
])
perf.to_score(time_signature="4/4").show()