<commit_before>package cz.peinlich.c2m.midi;

import com.google.common.collect.Iterables;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.sound.midi.*;
import java.io.IOException;
import java.nio.file.Path;

/**
 * @author Jiri
 */
public class MidiGenerator
{

    private static final int QUARTER_TICK = 24;
    private static final Logger logger = LoggerFactory.getLogger( MidiGenerator.class );
    private static final int PLAY_NOTE = 0x90;
    private static final int RELEASE_NOTE = 0x80;
    private final Track rightHand;
    private final Track leftHand;
    private final Sequence sequence;
    private long curTick;

    public MidiGenerator() {
        try {
            sequence = new Sequence( Sequence.PPQ, 24 );
        } catch( InvalidMidiDataException e ) {
            throw new RuntimeException( "Could not start a sequence", e );
        }
        rightHand = sequence.createTrack();
        leftHand = sequence.createTrack();
        curTick = 1;
    }

    public void initialize() {
        try {
            //****  General MIDI sysex -- turn on General MIDI sound set  ****<commit_msg>starting ticks at 0<commit_after>package cz.peinlich.c2m.midi;

import com.google.common.collect.Iterables;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.sound.midi.*;
import java.io.IOException;
import java.nio.file.Path;

/**
 * @author Jiri
 */
public class MidiGenerator
{

    private static final int QUARTER_TICK = 24;
    private static final Logger logger = LoggerFactory.getLogger( MidiGenerator.class );
    private static final int PLAY_NOTE = 0x90;
    private static final int RELEASE_NOTE = 0x80;
    private final Track rightHand;
    private final Track leftHand;
    private final Sequence sequence;
    private long curTick;

    public MidiGenerator() {
        try {
            sequence = new Sequence( Sequence.PPQ, 24 );
        } catch( InvalidMidiDataException e ) {
            throw new RuntimeException( "Could not start a sequence", e );
        }
        rightHand = sequence.createTrack();
        leftHand = sequence.createTrack();
        curTick = 0;
    }

    public void initialize() {
        try {
            //****  General MIDI sysex -- turn on General MIDI sound set  ****
{'fraction_non_alphanumeric': 0.0913884007029877, 'fraction_numerical': 0.012741652021089631, 'mean_word_length': 2.769867549668874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3829635', 'n_tokens_mistral': 687, 'n_tokens_neox': 641, 'n_words': 199}