<commit_before>var app = angular.module('app', ['ui.bootstrap']);
app.controller('AppController', function($scope) {

    $scope.tempo = 120;

    var conductor = new BandJS();

    conductor.setTempo($scope.tempo);

    var melody = conductor.createInstrument('square'),
        harmony = conductor.createInstrument('square'),
        bassline = conductor.createInstrument('sawtooth');

    // Bar 1
    // melody.note('half', 'Bb4')
    //     .rest('dottedEighth')
    //     .note('sixteenth', 'Bb4')
    //     .note('tripletEighth', 'Bb4')
    //     .note('tripletEighth', 'Bb4')
    //     .note('tripletEighth', 'Bb4');
    harmony.note('half', 'C7')
        .note('half', 'D7')
        .note('half', 'E7')
        .note('half', 'F7')
        .note('half', 'G7')
        .note('half', 'A7')
        .note('half', 'B7')
        .note('half', 'C7');
    // bassline.note('quarter', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('quarter', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('tripletEighth', 'Bb2');
    //
    // // Bar 2
    // melody.note('dottedEighth', 'Bb4')
    //     .note('sixteenth', 'Ab4')
    //     .note('quarter', 'Bb4')
    //     .rest('dottedEighth')<commit_msg>player plays any string converted into TONEZ<commit_after>var app = angular.module('app', ['ui.bootstrap']);
app.controller('AppController', function($scope) {

    $scope.tempo = 120;

    var conductor = new BandJS();

    conductor.setTempo($scope.tempo);

    var melody = conductor.createInstrument('square'),
        harmony = conductor.createInstrument('square'),
        bassline = conductor.createInstrument('sawtooth');

    var newNoteTable = ["C0","C#0","Db0","D0","D#0","Eb0","E0","F0","F#0","Gb0","G0","G#0","Ab0","A0","A#0","Bb0","B0","C1","C#1","Db1","D1","D#1","Eb1","E1","F1","F#1","Gb1","G1","G#1","Ab1","A1","A#1","Bb1","B1","C2","C#2","Db2","D2","D#2","Eb2","E2","F2","F#2","Gb2","G2","G#2","Ab2","A2","A#2","Bb2","B2","C3","C#3","Db3","D3","D#3","Eb3","E3","F3","F#3","Gb3","G3","G#3","Ab3","A3","A#3","Bb3","B3","C4","C#4","Db4","D4","D#4","Eb4","E4","F4","F#4","Gb4","G4","G#4","Ab4","A4","A#4","Bb4","B4","C5","C#5","Db5","D5","D#5","Eb5","E5","F5","F#5","Gb5","G5","G#5","Ab5","A5","A#5","Bb5","B5","C6","C#6","Db6","D6","D#6","Eb6","E6","F6","F#6","Gb6","G6","G#6","Ab6","A6","A#6","Bb6","B6","C7","C#7","Db7","D7","D#7","Eb7","E7","F7","F#7","Gb7","G7","G#7","Ab7","A7","A#7","Bb7","B7","C8"]
    var shortNoteTable = ["C4","C#4","Db4","D4","D#4","Eb4","E4","F4","F#4","Gb4","G4","G#4","Ab4","A4","A#4","Bb4","B4","C5","C#5","Db5","D5","D#5","Eb5","E5","F5","F#5","Gb5","G5","G#5","Ab5","A5","A#5","Bb5","B5","C6","C#6","Db6","D6","D#6","Eb6"]
    var string = 'katsuraku';

    var midiNotesArray = string.toLowerCase().split('').map(function (x) {
      if(isNaN(x)) {
        return x = x.charCodeAt(0) - 97
      } else {
        return parseInt(x) + 26
      }
    });

    var notes = midiNotesArray.map(function (x) {
      return x = shortNoteTable[x];
    });

    notes.forEach(function (note) {
      harmony.note('half', note)
    })
    // Bar 1
    // melody.note('half', 'Bb4')
    //     .rest('dottedEighth')
    //     .note('sixteenth', 'Bb4')
    //     .note('tripletEighth', 'Bb4')
    //     .note('tripletEighth', 'Bb4')
    //     .note('tripletEighth', 'Bb4');
    // harmony.note('half', 'C7')
    //     .note('half', 'D7')
    //     .note('half', 'E7')
    //     .note('half', 'F7')
    //     .note('half', 'G7')
    //     .note('half', 'A7')
    //     .note('half', 'B7')
    //     .note('half', 'C7');
    // bassline.note('quarter', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('quarter', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('tripletEighth', 'Bb2')
    //     .note('tripletEighth', 'Bb2');
    //
    // // Bar 2
    // melody.note('dottedEighth', 'Bb4')
    //     .note('sixteenth', 'Ab4')
    //     .note('quarter', 'Bb4')
    //     .rest('dottedEighth')
{'fraction_non_alphanumeric': 0.3045540796963947, 'fraction_numerical': 0.056925996204933584, 'mean_word_length': 3.134313725490196, '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': '7494260', 'n_tokens_mistral': 1822, 'n_tokens_neox': 1769, 'n_words': 186}