jxmorris12 / synthviz

visualize MIDI files from piano MIDI or audio
14 stars 2 forks source link

lines separating octaves width #3

Open sugizo opened 1 year ago

sugizo commented 1 year ago

problems with lines separating octaves width when changing the resolution 400 x 300 image

hd 1920 x 1080 image

4k 3840 x 2160 image

8k 7680 x 4320 image

suggestion make dynamic or responsive lines separating octaves width e.g. synthviz/main.py

        # draw lines separating octaves
        if i % 12 == 0:
            im_lines[0:(key_start-1), (x0-2):(x0-1)] = [20, 20, 20]

im_lines[0:(key_start-1), (x0-2):(x0-1)] should be

line_width = 9 # or whatever value from user entry (or you can hard code it, in scale of the picture width)
im_lines[0:(key_start - 1), (x0 - line_width):(x0 - 1) ]

best regards