Help with MATLAB music code | Signals & Systems

In summary, the conversation discusses creating music for a signals and systems class using a structure with three variables: frequency/notes, duration, and pulse. The use of pulse is causing confusion, as it is not clear how it should be incorporated into the function. The conversation also briefly touches on the relationship between pulse and loudness, and whether a document on music theory can provide a definition for pulse. Overall, the goal is to play different frequencies for different periods of time without any complex musical elements.
  • #1
physics4353
5
0
For my signals and system class were creating music. I am given a structure with three variables, frequency/notes, duration, and pulse. ex: frequency(in note numbers which i then convert to frequencies)[44 45 47 50...].
duration[2 1 1 3 4...] with pulse duration being .25s and pulse[1 3 4 5 8 13...]. So basically I am having a hard time with what I am supposed to be doing with pulse. Doesn't duration with the given .25s already basically give me my pulses? The assignment states to incorporate pulse into my function to account for quiet periods which i guess is represented by 12(in the above example) because 8+4=12 and the next pulse starts at 13 in my pulse vector. I really have no clue how I am supposed to account for it. Hope this is stated this clear enough, let me know if I need to add more information.-thanks for any help.
 
Physics news on Phys.org
  • #2
Is pulse related to loudness and then it dissipates? Like tapping a piano key?
 
  • #3
jedishrfu said:
Is pulse related to loudness and then it dissipates? Like tapping a piano key?
The pulses represent the start of a pulse wave. Like at pulse one the duration is 2(2 pulses) and since a pulse is .25s is represents 1second playing my first note 44. Then pulse three starts since two pulses already occurred and it has a duration of 1 or .25s and plays note 45.
 
  • #4
If this is music theory, is http://wmich.edu/mus-gened/mus170/RockElements.pdf the definition of pulse?
Duple meter = 2 pulses per group: 2/4 time
Triple meter = 3 pulses per group: 3/4 time
Quadruple meter = 4 pulses per group: 4/4 time
 
  • #5
FactChecker said:
If this is music theory, is http://wmich.edu/mus-gened/mus170/RockElements.pdf the definition of pulse?
Duple meter = 2 pulses per group: 2/4 time
Triple meter = 3 pulses per group: 3/4 time
Quadruple meter = 4 pulses per group: 4/4 time
We're not going into music theory, were basically playing one frequency for a period of time and then playing a different frequency for a different period of time. nothing fancy.
 

1. What is MATLAB and why is it used for music code?

MATLAB is a programming language and software environment designed for numerical computing, data analysis, and visualization. It is commonly used in the field of music and audio processing because of its powerful tools for signal analysis and processing.

2. How can I use MATLAB to generate music?

MATLAB has a built-in function called "audioplayer" which can be used to play audio files and generate music. You can also use the "sound" function to generate simple tones and melodies by specifying the frequency, duration, and amplitude of the sound.

3. Can MATLAB be used to analyze music signals?

Yes, MATLAB has a variety of functions and tools for analyzing music signals. It can calculate the frequency spectrum, time-domain waveform, and other properties of a music signal. These tools can be used to study the characteristics of different musical instruments and genres.

4. Is it possible to use MATLAB for real-time music processing?

Yes, MATLAB has the capability to process and analyze music signals in real-time. This can be achieved by using external hardware such as a microphone or audio interface, or by streaming audio data from a computer or mobile device.

5. Are there any resources available for learning MATLAB music coding?

Yes, there are many online tutorials, courses, and forums dedicated to teaching MATLAB music coding. Some recommended resources include MathWorks' official documentation, MATLAB for Musicians by David Brian Williams, and various YouTube channels that specialize in music and audio processing with MATLAB.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • Biology and Medical
Replies
6
Views
392
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
737
  • MATLAB, Maple, Mathematica, LaTeX
Replies
17
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
Back
Top