Hans L on Thu, 10 Jul 2025 07:52:12 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: playing music with GP


Very interesting usage of pari.  
For fun I added a basic ADSR envelope https://en.wikipedia.org/wiki/Envelope_(music)#ADSR
This gets rid of the pops between notes (without a "release"/fade-out, previous notes are interrupted at any point mid-sine-wave causing sharp transitions) and adds a little more character to the sound.

And of course I recognize Ode to Joy :)

-Hans

On Wed, Jul 9, 2025 at 4:15 PM Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
Dear PARI lovers,

I have written a GP script to play music using GP (really play music, not just sending MIDI data).

One need the "aplay" alsa utility. the instrument is the formula in the playnote
function.

If you use the latest GIT version, you can use the first "start" function
instead of the second one.

Can you recognize the music (without reading the score) ?
(Sorry in advance for any error in the score)

Cheers,
Bill.

Attachment: music2.gp
Description: application/gnuplot