I know that a specific frequency is a note but that is not the note an instrument makes when playing the note, and that note is a complex thing of harmonics of the same note ...... blahh.. blahhh..

I have been trying to figure out a way where I can enter frequencies and durations to play those frequencies, trying to blend math and music in making melodies and experimenting beyond fixed notes and temperaments.

:) The only software that does this how I want it is grub, "play 440 440 1" at the end of the grub.conf.
I have managed to enter a cord played like going up/down on the guitar when grub starts. But trying to get this with a script I can't locate the tool. I know of all the complex synthesizing editing composing tools, I've had trouble getting jack to work, but I just want something simple to write scripts and play them.

Any clues to doing this?

Edit: I discovered somewhere the pkg sox which includes sox, play, and rec.
play does some amazing things, still more complex than I expected.

example:
%  play -v4 -nq synth 8 pl E2 pl B2 pl E3 pl A3 pl B3 pl E4 \                                            
                   delay 0 .08 .15 .23 .29 .33 remix - fade 0.05 2.2 .1 norm -1


% for i in {E2,B2,E3,A3,B3,E4};do play -qn -V1 -c6 synth 1 pluck $i fade 0.004 0.9 0.3 & sleep .18 ;done
... and then there is beep ... not a standard arch utility
beep is 72KB big!

On my installation beeping is restricted, I don't know if it is kernel caused or default eudev behavior. There is a way to set udev rules to allow it, I haven\t gotten that far yet, but there is a link /dev/input/by-path/platform-pcspkr-event-spkr that is written as root only rw, and beep for "security reasons" can't run as root or with root rights, it needs to run as user. Maybe one can create a beep group and pass pcspkr rights to a user.
I simply just chmod 0666 /dev/input/by-path/platform-pcspkr-event-spkr and now I can beep.

This gives you control of the internal pc-speaker (if you have one) and that can make sounds with beep.
You can beep an entire song with scripts, which is close to what I wanted but I wanted to use the audio not the speaker thingy. Luckily this box has a good size speaker on it, with amazing and surprising range of frequencies.

run this command once:
beep -e /dev/input/by-path/platform-pcspkr-event-spkr --debug
Read the output, you should be able to beep now without that long command
beep -l 125 -f 440
beep -l 124  -r 2 -d 14 -f 659
the first command beeps at 440hz (A or La note, std tuning reference for 20th century music) for 125ms
the next command beeps twice (-r 2 two repeats) for 124ms -d (elayed) 14ms from each other.

you can write a script ex
for i in `seq 432 483`; do beep -l 15 -f $i ; done
or if you are compiling huge software you can read core temps and multiply them by 5 or 10 so they are audible and hear the sound so you can come and shut if off before it melts :)

Powered by Obarun