Re: playing music with GP

Hans L <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <CAFoRp-Mo-PjjxbSoNcGRkunDzxy25yNZiU6ywRzvp0JnPPkEUQ@mail.gmail.com>
It's not really my script, I can't take credit.  I only made a minor
modification to Bill's script by applying an "envelope" (varying amplitude
wrt duration) to individual notes.

-Hans

On Thu, Jul 10, 2025 at 3:25 PM American Citizen <[email protected]>
wrote:

> Hmmm, Hans, your script works great, but there seems to be a mild
> dissonance, due to the scale of octave being used. Are you using chromatic
> scale? I am curious, because the exact tones don't match my orchestral
> memory of those tones in "Ode to Joy"
>
>
> On 7/9/25 22:51, Hans L wrote:
>
> 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 <
> [email protected]> 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.
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.