BookmarkSubscribeRSS Feed
pink_poodle
Barite | Level 11

This post is a sequel to my previous post, titled "Making music with SAS." Here are a bunch of thoughts/ questions in bold, all revolving around an idea of making music chords from array coordinates of the notes. There is probably software devoted just to that (is there a free one?),  but I would like to discuss how it is done in SAS. Although there are many questions, they belong to the same topic.

 

The CALL SOUND routine sounds the system bell. Is it kind of like "\a" command in Python? Unlike "\a" command, CALL SOUND can modify the frequency and duration of the bell. How does it do it?

 

What is that system bell? Is there only one? The main question is, can these sounds be simultaneous, producing music chords?

 

For example, if there are input coordinates of chord note positions, like [ 0, 3, 6, 9 ], where A is 0, C sharp is 3 and so on, can the chord sound all at once? If not, how would you make arpeggio (sequential) sounds from these arrays? (The answer to the previous question can probably base on Rick Wicklin's code for a Christmas Carol.)

 

How would you map this array to the sounds? (Last question seems like it would need a hash.) 

 

References

https://lexjansen.com/search/searchresults.php?q=music

1 REPLY 1
Kurt_Bremser
Super User

I think this goes back to how sound was produced in the early DOS/PC days. The sound was created by the processor by sending pulses to the speaker. So it was monophonic and caused the system to stop for the duration of the sound (eg when the BEL character was encountered in a text stream). This started to change with the advent of sound cards.

From this, I guess it won't be able to produce chords, at least not from a single SAS session.

Also note that the routine is available on Windows only.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1207 views
  • 1 like
  • 2 in conversation