[ TAG 52 ][12.06.2021] - Erfolgreich - IAP-20210601-20210609-2325
Ich beginne mit der Programmierung am [ IAP-20210601-20210609-2325 ]. Ich habe gerade überprüft ob [ numpy ] installiert ist. Dies ist nicht der fall. Beim [ IAP-20210601-20210605-0404 ] habe ich nur [ python-sounddevice ][Quelle] installiert. Bei der Installation des [ python-sounddevice ] wird scheinbar die [ numpy ] mit installiert. Ich werde es jetzt als erstes testen.
- Eine gute Quelle für die Einarbeitung in Python:
- Installation
- Quelle: https://python-sounddevice.readthedocs.io/en/0.4.1/installation.html
- Installationsbefehl: [ conda install -c conda-forge python-sounddevice ]
- Bei der Installation wird [ numpy ] mit installiert
- TEST - [ numpy ] - Array
- Rahmenbedingungen
- duration = 2
- AUFNAHMEZEIT = 2 SEKUNDEN
- fs = 44100
- SAMPLERATEN = 44.100 Hz
- FRAMES pro SEKUNDE
- DATENAUFNAHMEN pro SEKUNDE
- frms = int(duration * fs)
- GESAMTANZAHL der FRAMES
- dtype = 'float32'
- BITRATE
- GRÖSSE einer DATENAUFNAHME in BIT
- GRÖSSE eines FRAMES in BIT
- ------------------------------------
- inpt_dvc_num = 1
- INPUT-DEVICE-NUMBER
- inpt_chnl = 2
- INPUT-CHANNEL
- outpt_dvc_num = 4
- OUTPUT-DEVICE-NUMBER
- DATEI-NAME
- Quelle: [ https://www.programiz.com/python-programming/datetime/current-datetime ]
- import datetime as dt
- date = dt.datetime.today()
- time = dt.datetime.now()
- ------------------------------------
- year = date.year
- print("year: "+str(type(year)))
- Ausgabe: [ year: <class 'int'> ]
- month = date.moth
- print("month: "+str(type(month)))
- Ausgabe: [ month: <class 'int'> ]
- day = date.day
- print("day: "+str(type(day)))
- Ausgabe: [ day: <class 'int'> ]
- ------------------------------------
- hour = time.hour
- print("hour: "+str(type(hour)))
- Ausgabe: [ hour: <class 'int'>]
- minute = time.minute
- print("minute: "+str(type(minute)))
- Ausgabe: [ minute: <class 'int'> ]
- ------------------------------------
- prf = "ALOG"
- dlmtr_0 = "-"
- dlmtr_1 = "_"
- dlmtr_2 = "."
- ftype = "wav"
- wav_file = str(year)+str(month)+str(day)+dlmtr_1+str(hour)+str(minute)+dlmtr_2+ftype
- print("wav_file: "+wav_file)
- Ausgabe: [ wav_file: 2021612_659.wav ]
- AUSGABE-DATEI mit [scipy]
- Installationsbefehl: [ conda install -c conda-forge scipy ]
- ------------------------------------
- from scipy.io.wavfile import write
- Ich importiere nur die Funktion [ write ]
- WAV-DATEI-SPEZIFIKATIONEN
- http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
- http://www.piclist.com/techref/io/serial/midi/wave.html
- https://web.archive.org/web/20101207002408/http://www.it.fht-esslingen.de/~schmidt/vorlesungen/mm/seminar/ss00/HTML/node107.html
- https://en.wikipedia.org/wiki/WAV
- https://de.wikipedia.org/wiki/RIFF_WAVE
Kommentare
Kommentar veröffentlichen