mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
make style
This commit is contained in:
parent
e3e33a6501
commit
b55c186b3a
5 changed files with 22 additions and 20 deletions
6
client/pyscripts/theremin.py
Normal file → Executable file
6
client/pyscripts/theremin.py
Normal file → Executable file
|
@ -66,7 +66,8 @@ while True:
|
|||
max_v = v
|
||||
|
||||
# Recalculate the audio frequency to generate
|
||||
out_freq = (max_freq - min_freq) * (max_v - v) / (max_v - min_v) + min_freq
|
||||
out_freq = (max_freq - min_freq) * (max_v - v) / (max_v - min_v) \
|
||||
+ min_freq
|
||||
|
||||
# Generate the samples and write them to the soundcard
|
||||
sinevs = out_freq / sampling_freq * numpy.pi * 2
|
||||
|
@ -75,4 +76,5 @@ while True:
|
|||
sinev = sinev if sinev < numpy.pi * 2 else sinev - numpy.pi * 2
|
||||
i = (i + 1) % sample_buf_size
|
||||
if not i:
|
||||
stream.write((numpy.sin(sample_buf) * volume).astype(numpy.float32).tobytes())
|
||||
stream.write((numpy.sin(sample_buf) * volume).
|
||||
astype(numpy.float32).tobytes())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue