Skip to content

Commit

Permalink
Bugfix and audio optimizations
Browse files Browse the repository at this point in the history
Changed to 48 kHz and reduced Buffersize to 128 for less delay in the beginning.
  • Loading branch information
BKLronin committed Mar 30, 2022
1 parent ff46b03 commit e282eb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Binary file modified dist/underbridge.exe
Binary file not shown.
9 changes: 4 additions & 5 deletions underbridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,14 @@ def start_Rec():
global j
global pro
global pattern_nr
CHUNK = 1024
CHUNK = 128
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
RATE = 48000
RECORD_SECONDS = loop_time
WAVE_OUTPUT_FILENAME = name_input.get()+ "_" + "track" + str(j+1) + ".wav"

p = pyaudio.PyAudio()
start_MIDI()
p = pyaudio.PyAudio()
stream = p.open(format=FORMAT,
channels=CHANNELS,
rate=RATE,
Expand All @@ -178,7 +177,7 @@ def start_Rec():
#print("* recording")

frames = []

start_MIDI()
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
data = stream.read(CHUNK)
frames.append(data)
Expand Down

0 comments on commit e282eb9

Please sign in to comment.