Skip to content

Commit bb9b95c

Browse files
authored
Merge pull request #4 from Gabriel-Dee/master
Added Tip
2 parents 35bbcb1 + fad5b20 commit bb9b95c

15 files changed

Lines changed: 60 additions & 16 deletions

File tree

File renamed without changes.
File renamed without changes.

Audiogeneration_Tips/Numpy Broadcasting/ReadMe.md renamed to Audiogeneration_Tips/Numpy Broadcasting/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ This is a Python code example demonstrating audio signal generation using NumPy
1010
## Usage
1111

1212
1. Install the required dependencies by running the following command:
13-
```
14-
pip install numpy
15-
```
13+
14+
`pip install numpy`
1615

1716
2. Clone or download this repository to your local machine.
1817

File renamed without changes.
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
# AUDIO GENERATION TIPS USING PYTHON
2+
23
This repository provides tips and examples for audio generation using Python. It includes various techniques and methods for producing audio signals, utilizing built-in functions, libraries, and modules.
34

45
## TIPS
6+
57
* Sound production using print statement: You can generate simple audio signals using the print statement in Python. For example, you can generate a simple sine wave by printing the ASCII character representing the sine wave symbol.
6-
* Resampling audio with scipy: The scipy library provides various methods for resampling audio signals. You can use the resample function from scipy.signal module to resample an audio signal to a different sample rate.
8+
* Resampling audio with scipy: The scipy library provides various methods for resampling audio signals. You can use the resample function from scipy.signal module to resample an audio signal to a different sample rate.
79
* Convolution with scipy: Convolution is a common operation in audio signal processing. You can use the convolve function from scipy.signal module to perform convolution on audio signals.
8-
* List comprehensions: List comprehensions are concise and powerful ways to generate lists in Python. You can use list comprehensions to generate audio signals with complex patterns or structures.
10+
* List comprehensions: List comprehensions are concise and powerful ways to generate lists in Python. You can use list comprehensions to generate audio signals with complex patterns or structures.
911
* NumPy broadcasting: NumPy is a powerful library for numerical computing in Python, and it can be used to generate and manipulate audio signals efficiently. Broadcasting is a technique in NumPy that allows you to perform operations on arrays of different shapes and sizes. You can use NumPy broadcasting to generate complex audio signals with different shapes or dimensions.
1012
* Using built-in functions: Python provides built-in functions that can be used for audio generation. For example, you can use the wave module to create a waveform file with specified parameters such as sample rate, duration, and amplitude.
1113

1214
This repository contains Python code for basic audio processing tasks using the `scipy` library. The `scipy` library provides a wide range of signal processing functions that can be used for audio processing tasks such as filtering, convolution, and resampling.
1315

1416
## Prerequisites
1517

16-
- Python 3.x
17-
- NumPy
18-
- SciPy
18+
* Python 3.x
19+
20+
* NumPy
21+
22+
* SciPy
1923

20-
You can install the required dependencies using `pip`:
24+
You can install the required dependencies using `pip`:

Audiogeneration_Tips/Using Built in functions/ReadMe.md renamed to Audiogeneration_Tips/Using Built in functions/README.md

File renamed without changes.

Bignumber_Readability/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Big Number Redability
2+
3+
An awesome and life saving trick that helps make big numbers readable without affecting the arithmetic operations.
4+
Underscore _ can be used to separate zeros in Python and this will make big numbers more readable while mathematically it won’t affect the syntax so you can still carry out arithmetic operations as normal:
5+
6+
This one is a potential favorite for teachers, scientists, finance quants, accountants, quantum physicists, actuaries, traders and all the rest of the big number people.

Bignumber_Readability/bignumber.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
A = 1_000_000_000
2+
B = 5_700
3+
c = 100
4+
5+
print(A)
6+
print(A + B)
7+
print(B + C)

Dictionary_Merge/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Dictionary Merge
2+
3+
Here is a fantastic Python tip that will help you merge two or more dictionaries in pyhton in a very easy and efficient way. We use **notation for**kwargs-like objects (values with names like dictionaries) to merge them conveninently.
4+
5+
## For example as shown in the code
6+
7+
{**d1,**d2}
8+
The result will be: {'A': 10, 'B': 20, 'C': 30, 'X': 100, 'Y': 200, 'Z': 300}
9+
10+
You do that and Python will take care of the rest.

0 commit comments

Comments
 (0)