Help with MATLAB code?

  • MATLAB
  • Thread starter physics4353
  • Start date
  • #1
For my signals and system class were creating music. Im 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 im having a hard time with what Im 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 im 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.
 

Answers and Replies

  • #2
12,020
5,671
Is pulse related to loudness and then it dissipates? Like tapping a piano key?
 
  • #3
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
FactChecker
Science Advisor
Gold Member
5,743
2,132
If this is music theory, is this (page 2) 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
If this is music theory, is this (page 2) 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.
 

Related Threads on Help with MATLAB code?

Replies
3
Views
3K
  • Last Post
Replies
2
Views
9K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
13
Views
11K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
2
Views
4K
Top