start work on clipped
This commit is contained in:
parent
1744b11791
commit
32046afb19
18
code/clipped/README.md
Normal file
18
code/clipped/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
## Background
|
||||
|
||||
## Setup
|
||||
Potential libraries needed for debian-based gnu+linux
|
||||
```
|
||||
sudo apt-get install libportaudio2
|
||||
```
|
||||
Install python libraries
|
||||
```
|
||||
pip install -r requirnments.txt
|
||||
```
|
||||
|
||||
## Run
|
||||
```
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
## Reflections, Results, Analysis
|
21
code/clipped/main.py
Normal file
21
code/clipped/main.py
Normal file
@ -0,0 +1,21 @@
|
||||
from os.path import dirname, join as pjoin
|
||||
from scipy.io import wavfile as wav
|
||||
import numpy as np
|
||||
import scipy.io
|
||||
import sounddevice
|
||||
import math
|
||||
|
||||
print("Portfolio assignment 1: Clipped")
|
||||
|
||||
# part 1: building and writing the sine wave
|
||||
# starting example: https://www.geeksforgeeks.org/numpy-sin-python/
|
||||
|
||||
in_array = [0, math.pi / 2, np.pi / 3, np.pi]
|
||||
print ("Input array : \n", in_array)
|
||||
|
||||
Sin_Values = np.sin(in_array)
|
||||
print ("\nSine values : \n", Sin_Values)
|
||||
|
||||
# part 2: building and writing clipped wave
|
||||
|
||||
# part 3: playing audio
|
2
code/clipped/requirements.txt
Normal file
2
code/clipped/requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
scipy==1.8.0
|
||||
sounddevice==0.4.6
|
@ -3,7 +3,9 @@
|
||||
|
||||
⚙️ On tuesday, I picked up a copy of the course textbook from the library and have since read the first 3 chapters
|
||||
|
||||
🤔 Our lectures this week focused on the digital aspects of computer sounds. Particularly, some of this had overlap with topics of my other class CS590 Multimedia Computing and Networking such as the basics of analog to digital conversion, discretation, sampling rate, bit rate, and the nyquist limit, which were coincedentally lectured just an hour before this course. However, here in CSM, we got into further details regarding the bit represtation, and hardware architecture implications, endianness, etc. of storing sound data in bytes. After discussing the theory, the more hands on exposure to programming computer sounds with python was my first experience seeing such a demo. This segues well into the first portfolio assignment, "clipped"
|
||||
🤔 Our lectures this week focused on the digital aspects of computer sounds. Particularly, some of this had overlap with topics of my other class CS590 Multimedia Computing and Networking such as the basics of analog to digital conversion, discretation, sampling rate, bit rate, and the nyquist limit, which were coincedentally lectured just an hour before this course. However, here in CSM, we got into further details regarding the bit represtation, and hardware architecture implications, endianness, etc. of storing sound data in bytes. After discussing the theory, the more hands on exposure to programming computer sounds with python was my first experience seeing such a demo. This segues well into the first portfolio assignment, Clipped
|
||||
|
||||
📝 Today I began work on the portfolio assignment, [Clipped](./code/clipped/README.md).
|
||||
### Sunday 06-Oct-2024
|
||||
⚙️ Updated the readme and created this notebook file
|
||||
### Thursday 03-Oct-2024
|
||||
|
Reference in New Issue
Block a user