<commit_before>'''
Implements mixer to play sound files, sounds can be mapped to keyboard input
Necessary to have sounds files in same file directory
Links to sound libraries:
http://www.findsounds.com/
http://soundcavern.free.fr/guitar/
'''

import pygame,random, array
from pygame.locals import *

xmax = 1000    #width of window
ymax = 600     #height of window

# VVV Added part VVV
#pygame.mixer.pre_init(44100, -16, 2, 2048) # setup mixer to avoid sound lag
pygame.mixer.init(48000, -16, 1, 1024)
pygame.init()

fadeTime=1000
maxTime=0,1,10,100,1000
pygame.mixer.fadeout(fadeTime)

try:
    #piano
    c3 = pygame.mixer.Sound('input\c3.wav')
    c4 = pygame.mixer.Sound('input\c4.wav')
    c5 = pygame.mixer.Sound('input\c5.wav')
    c6 = pygame.mixer.Sound('input\c6.wav')
    c7 = pygame.mixer.Sound('input\c7.wav')
    c8 = pygame.mixer.Sound('input\c8.wav')
    '''
    #guitar
    gh3 = pygame.mixer.Sound('input\gh3.wav')
    gh4 = pygame.mixer.Sound('input\gh4.wav')
    gn3 = pygame.mixer.Sound('input\gn3.wav')
    gn4 = pygame.mixer.Sound('input\gn4.wav')
    gn5 = pygame.mixer.Sound('input\gn5.wav')
    gp3 = pygame.mixer.Sound('input\gp3.wav')
    gp4 = pygame.mixer.Sound('input\gp4.wav')
    gs3 = pygame.mixer.Sound('input\gs3.wav')
    gs4 = pygame.mixer.Sound('input\gs4.wav')
    '''
    #better guitar
    A = pygame.mixer.Sound('input\A.aif')
    B = pygame.mixer.Sound('input\B.aif')
    D = pygame.mixer.Sound('input\D.aif')
    E = pygame.mixer.Sound('input\E.aif')
    G = pygame.mixer.Sound('input\G.aif')

    #guitar 
    g1 = pygame.mixer.Sound('input\g1.wav')
    g2 = pygame.mixer.Sound('input\g2.wav')
    g3 = pygame.mixer.Sound('input\g3.wav')
    g4 = pygame.mixer.Sound('input\g4.wav')
    g5 = pygame.mixer.Sound('input\g5.wav')<commit_msg>modified kbi to match file names<commit_after>'''
Implements mixer to play sound files, sounds can be mapped to keyboard input
Necessary to have sounds files in same file directory
Links to sound libraries:
http://www.findsounds.com/
http://soundcavern.free.fr/guitar/
'''

import pygame,random, array
from pygame.locals import *

xmax = 1000    #width of window
ymax = 600     #height of window

# VVV Added part VVV
#pygame.mixer.pre_init(44100, -16, 2, 2048) # setup mixer to avoid sound lag
pygame.mixer.init(48000, -16, 1, 1024)
pygame.init()

fadeTime=1000
maxTime=0,1,10,100,1000
pygame.mixer.fadeout(fadeTime)

try:
    #piano
    c3 = pygame.mixer.Sound('input\c3.wav')
    c4 = pygame.mixer.Sound('input\c4.wav')
    c5 = pygame.mixer.Sound('input\c5.wav')
    c6 = pygame.mixer.Sound('input\c6.wav')
    c7 = pygame.mixer.Sound('input\c7.wav')
    c8 = pygame.mixer.Sound('input\c8.wav')
    '''
    #guitar
    gh3 = pygame.mixer.Sound('input\gh3.wav')
    gh4 = pygame.mixer.Sound('input\gh4.wav')
    gn3 = pygame.mixer.Sound('input\gn3.wav')
    gn4 = pygame.mixer.Sound('input\gn4.wav')
    gn5 = pygame.mixer.Sound('input\gn5.wav')
    gp3 = pygame.mixer.Sound('input\gp3.wav')
    gp4 = pygame.mixer.Sound('input\gp4.wav')
    gs3 = pygame.mixer.Sound('input\gs3.wav')
    gs4 = pygame.mixer.Sound('input\gs4.wav')
    '''
    #better guitar
    A = pygame.mixer.Sound('input\A.wav')
    B = pygame.mixer.Sound('input\B.wav')
    D = pygame.mixer.Sound('input\D.wav')
    E = pygame.mixer.Sound('input\E.wav')
    G = pygame.mixer.Sound('input\G.wav')

    #guitar 
    g1 = pygame.mixer.Sound('input\g1.wav')
    g2 = pygame.mixer.Sound('input\g2.wav')
    g3 = pygame.mixer.Sound('input\g3.wav')
    g4 = pygame.mixer.Sound('input\g4.wav')
    g5 = pygame.mixer.Sound('input\g5.wav')
{'fraction_non_alphanumeric': 0.16727069974909395, 'fraction_numerical': 0.0479509339280736, 'mean_word_length': 3.302158273381295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7225897', 'n_tokens_mistral': 1559, 'n_tokens_neox': 1506, 'n_words': 250}