Generalize ssg. Prepare for reading MIDI data (some hardcoded values remain still).