Guitar string code in Python? [closed]

2024/11/16 1:48:30

I'm very new at Python but really interested in making a code that could simulate guitar strings. How would I go about doing this? Or at least how would I begin to do this? Any help is appreciated!

Thank you!

EDIT:

I would like to see the sound waves when playing different strings, notes, etc. I am also interested in the sound waves when two different strings are being played, and how that changes when they are dissonant and consonant notes. Another thing I'm interested in is how sometimes strings vibrate when they are not being plucked (resonance).

Any help is appreciated, thank you!!!

Answer

This is really a question of sound synthesis, and there's no simple answer. There are a whole bunch of possible approaches--it's an entire field of study. Physical Audio Signal Processing by J.O. Smith is a good starting point, as is The Theory and Technique of Electronic Music by Miller Puckette. For guitar, you might particularly be interested in the Karpus-Strong method. Perhaps you should search for a Python implementation of it. It's a common project for students in music technology programs; I'm sure there are many.

https://en.xdnf.cn/q/120381.html

Related Q&A

What is the point of initializing extensions with the flask instance in Flask? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.Want to improve this question? Add details and clarify the problem by editing this post.Closed 8 years ago.Improve…

Nested list doesnt work properly

import re def get_number(element):re_number = re.match("(\d+\.?\d*)", element)if re_number:return float(re_number.group(1))else:return 1.0def getvalues(equation):elements = re.findall("…

How can I increment array with loop?

Ive got two lists:listOne = [33.325556, 59.8149016457, 51.1289412359] listTwo = [2.5929778, 1.57945488999, 8.57262235411]I use len to tell me how many items are in my list:itemsInListOne = int(len(list…

Two Complements Python (with as least bits as possible)

I am trying to output the binary representation of an negative number with the least bytes available each time.Example:-3 -> 101 -10 -> 10110

iterating through a column in dataframe and creating a list with name of the column + str

I have a dataframe with 2 coulmn, i want to iterate through the column headers, use that value and add a string to it and use it as the name of a list.rrresampled=pd.DataFrame() resampled[RAT]=dd1[RAT]…

Python multiple inheritance name clashes [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.Questions asking for code must demonstrate a minimal understanding of the problem being solved. Incl…

How to read multiple txt file from a single folder in Python? [duplicate]

This question already has answers here:How to open every file in a folder(8 answers)Closed 3 years ago.How can I read multiple txt file from a single folder in Python?I tried with the following code b…

Time Changing Without Clicking Button

The following code works fine as long as the time in the spinbox does not change. What I want is to do the set the time for a break. The first time it works perfectly but after that if I change the val…

Avoid `logger=logging.getLogger(__name__)` without loosing way to filter logs

I am lazy and want to avoid this line in every python file which uses logging:logger = logging.getLogger(__name__)In january I asked how this could be done, and found an answer: Avoid `logger=logging.g…

Find all directories and files of your laptop [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.Closed 8…