Expanding on the vline~ driven audio player, here is a rudimentary polyphonic wavetable piano.
It seams to take a second for each clone voice to initialize so there's no sound at first.
The single 561kb wave file is limiting but sound ok in the middle to lower frequencies.
I'm curious though, as to why I need to use a samplerate of 44100 when my soundcard is 48000
Cheers
Balwyn
vline~piano.zip
-
Simple wavetable polyphonic piano
-
@Balwyn Incorrect order causing the lack of sound for first notes...... the 44100 message is sent after the first note passes through...... fixed I think......... vline~wavetable-voice.pd
What is the sample rate in Pd preferences?
The sample rate of your piano sound is 48K.... so for Pd to play the sample at the correct pitch Pd should also be running at 48K and your message should be 48000.
It is likely that the soundcard sample rate is irrelevant as the computer / sound card driver will resample the stream.So you should add a comment about that to the patch as many will be running Pd at 44100..... or better still use the [samplerate~] object to bang in an automatic correction.... only for those users.
It looks to me as though you might have added the 44100 message for that reason.
Also..... [adsr] and [output~] are missing (for me at least in vanilla)......David.
-
Ah! yes that fixed the delay, thank you.
I may have solved the sample rate anomaly also
I think as the note playing in the sample is 110hz I need to get a start point of 110000
so i must multiply by 110000 not 100000 as previously -
Here is the updated poly version