Piano staves

Hi. I’m trying to print my piano part with piano staves, as usual for a piano, with a bass and treble clef, but I don’t know how. Any idea?
Another thing: is it possible to make a tutorial on quantisation_scheme, really not clear for me.

Thank you!


Hi Eric – good to meet you!

The piano staff thing has come up, before. See:

It’s not a perfect solution, but should be pretty workable.

As for quantization_scheme, I’ll consider making a tutorial definitely. Did you see the one on generating notation?

It goes over a lot of the settings you can use, but admittedly doesn’t go into the building of quantization schemes directly. Is there anything in particular that you’re trying to do with the quantization?

Hi Marc! Thank you.
I see for the piano. But, for big chords, what to do? I have to write two different parts.
I see the tutorial and it’s ok, but I don’t understand how to work with the quantization_scheme. It’s a bit tricky.

I would like to quantize piano parts and ensemble parts and trying out to understand the program better.

I’m waiting! Thank you! and congrats for the program


Ah, good point. I guess for chords you could do something like this:

def play_piano_chord(pitches, volume, length, properties=None):
    bass_pitches = [p for p in pitches if p < 60]
    treble_pitches = [p for p in pitches if p >= 60]
    if len(bass_pitches) > 0:
        piano_bass.play_chord(bass_pitches, volume, length, properties)
    if len(treble_pitches) > 0:
        piano_treble.play_chord(treble_pitches, volume, length, properties)

(There might be a typo, haven’t tried running it!)

By the way, I’m curious how you came to learn about SCAMP?