-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParameters.py
More file actions
101 lines (80 loc) · 2.33 KB
/
Parameters.py
File metadata and controls
101 lines (80 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from datetime import datetime
import decimal
import shutil
import pyaudio
from pydub import AudioSegment
import wave
import os
import random
import threading
from time import time, sleep
import json
#class of parameters set by the user
class Parameters:
def __init__(self):
#file = open("Parameters.json")
#data = json.load(file)
#self.setDirectoryForFiles()
#print('hi')
return
def setDirectoryForFiles(self, input):
self.directoryForFiles = input
return
def getDirectoryForFiles(self):
return self.directoryForFiles
def setNumberOfTracks(self, input):
self.numberOfTracks = input
return
def getNumberOfTracks(self):
return self.numberOfTracks
def setDivisionConstant(self, input):
self.divisionConstant = input
return
def getDivisionConstant(self):
return self.divisionConstant
def setMinimumTimeBetweenChecks(self, input):
self.minimumTimeBetweenChecks = input
return
def getMinimumTimeBetweenChecks(self):
return self.minimumTimeBetweenChecks
def setMaximumTimeBetweenChecks(self, input):
self.maximumTimeBetweenChecks = input
return
def getMaximumTimeBetweenChecks(self):
return self.maximumTimeBetweenChecks
def setMinimumLengthOfPiece(self, input):
self.minimunLengthOfPiece = input
return
def getMinimumLengthOfPiece(self):
return self.minimunLengthOfPiece
def setMaximumLengthOfPiece(self, input):
self.maximumLengthOfPiece = input
return
def getMaximunLengthOfPiece(self):
return self.maximumLengthOfPiece
def setMinimumLengthOfSample(self, input):
self.minimumLengthOfSample = input
return
def getMinimumLengthOfSample(self):
return self.minimumLengthOfSample
def setMaximumLengthOfSample(self, input):
self.maximumLengthOfSample = input
return
def getMaximumLengthOfSample(self):
return self.maximumLengthOfSample
#def createStream(self, firstFile):
# file = wave.open(firstFile, "rb")
# p = pyaudio.PyAudio()
# self.stream = p.open(
# format = pyaudio.get_format_from_width(file.getsampwidth()),
# rate = file.getframerate(),
# channels = file.getnchannels(),
# input = False,
# output = True,
# output_device_index = 3)
# return
#def getStream(self):
# return self.stream