Re: [PD] best way to use a variable number of polyphonic voices?

2019-11-11 Thread Winfried Ritsch
Do you mean set voice count dynamically  during playing or at setup ?

for first approach I would do a clone with maximum and switch~ (and message 
spigot) in each voice and a counter with modulo for voice number prepend.

for second I would dynamically generate a poly and a clone object in a 
subpatch on setup voices.

mfg
 winfried


Am Montag, 11. November 2019, 17:23:11 CET schrieb Matt Davey:
> If i wanna set up round robin polyphony with a variable number of available
> voices, is the best way just to have a bunch of different [poly] objects
> and subpatches and just choose between them?  or is there something more
> elegant?


-- 
--
- ao.Univ.Prof. DI Winfried Ritsch 
- rit...@iem.at - http://iem.at/ritsch
- Institut fuer Elektronische Musik und Akustik
- University of Music and Dramatic Art Graz
- Tel. ++43-316-389-3510 (3170) Fax ++43-316-389-3171 
--




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Raspberry Pi: Loading Samples RAM problem

2019-11-11 Thread Jakob Laue
thanks, cyrille!
 

Gesendet: Montag, 11. November 2019 um 20:05 Uhr
Von: "cyrille henry" 
An: pd-list@lists.iem.at
Betreff: Re: [PD] Raspberry Pi: Loading Samples RAM problem



Le 11/11/2019 à 19:53, Jakob Laue a écrit :
> Okay,
> now I found some time to look at Giulios patch and I think I understood it :P (So many $'s in there :P)
> So, what actually happens in that patch is that on [loadbang] we read 32768 samples into an array using soundfiler.
> Then when the file should be played, we do play the first 32768 samples using [tabplay~] and simultaneously load the rest of the file using [readsf~]. Then, when [tabplay~] is done playing the first bit of the sample, we send a [1( to [readsf~] to start playing the rest of the file.
> I don't have any audio pops playing eight samples simultaneously, even using the cheap hdmi-to-cinch-converter as my audio interface (which caused more pops in comparison to the Scarlett USB interface while trying olivers patch). Also, I don't have to adjust Pd's audio settings. I can use the standard settings (44100, 64 blocksize, 25 msec) and I don't get audio pops, which is good.
>
> But there is one thing that I realised: The wav-files are not played at original speed. They are all recorded in 122 bpm. When I play them with Giulois patch, the samples are played quite slowly, at around 111 bpm.

look like the sample are recorded at 48KHz and play at 44100.

> In a later version of my sample player, I want to be able to change the bpm/tempo in which the samples are played, so I will need to have some mechanism for changing this. Using e.g. [phasor~] to play samples, this should work, but I don't know if it will be possible to do this using Giulios approach. In the help file of [tabplay~], it says that samples are played with no transposition, so maybe a transposition will not be possible to implement?! On the other hand, it says that [tabplay~] does not have the interpolation-artefacts that [tabread4~] has, which I would have, if I used a [phasor~] approach.

if you want to change the tempo, you need to somehow interpolate the samples...

best

> All the best, Jakob
> *Gesendet:* Dienstag, 05. November 2019 um 15:40 Uhr
> *Von:* "oliver" 
> *An:* Kein Empfänger
> *Cc:* Pd-List 
> *Betreff:* Re: [PD] Raspberry Pi: Loading Samples RAM problem
> Jakob Laue wrote:
> > Okay,
> > finally I found some time to try some stuff out. First, I gave Olivers
> > examples a try.
> > I made a patch with eight [ol_sfplay~] objects to simulate my sample
> > player and tested this patch on my old Raspi 2
> > and also a Raspi 3. I also tested two different audio interfaces: a
> > Scarlett 2i4 USB audio interface and a HDMI-to-CINCH-Converter running
> > on the 2835 ALSA driver.
> > The best result was achieved by the Raspberry Pi 3 with the Scarlett
> > audio interface. I used
> > - block length of 64 from Pd's preferences
> > - buffersize of 512 and 1024 for [ol_sfplay~]
> > I have no pops and Pd does not freeze.
> > When I use the same configurations with the hdmi-to-cinch-converter and
> > alsa, I get audio pops.
>
> please also consider using even 2048 as buffersize for [ol_sfplay~]. AND
> you might want to increase PD's audio delay with the "-audiobuf" startup
> flag.
>
> try "-audiobuf 120" or higher and work your way down from there.
>
> i remember using this method on a PI2 with an 8 track wav-file and
> really had to increase those values to get a smooth playback.
>
> it worked alright in the end but then i had no video-traffic ...
>
> in general, use a PI3 if possible
>
> best
>
> oliver
>
>
>
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list






___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Raspberry Pi: Loading Samples RAM problem

2019-11-11 Thread Jakob Laue
Ah yes, Martin, that makes sense! :-)
 

Gesendet: Montag, 11. November 2019 um 20:14 Uhr
Von: "Martin Peach" 
An: Pd-List 
Betreff: Re: [PD] Raspberry Pi: Loading Samples RAM problem



On Mon, Nov 11, 2019 at 1:56 PM Jakob Laue  wrote:




 
Also, I don't have to adjust Pd's audio settings. I can use the standard settings (44100, 64 blocksize, 25 msec) and I don't get audio pops, which is good.


But there is one thing that I realised: The wav-files are not played at original speed. They are all recorded in 122 bpm. When I play them with Giulois patch, the samples are played quite slowly, at around 111 bpm.




 

If the wav files were recorded at 48000 and played back at 44100 you would get that.

(122/111 ~= 48000/44100)

Martin


___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list






___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Raspberry Pi: Loading Samples RAM problem

2019-11-11 Thread cyrille henry



Le 11/11/2019 à 19:53, Jakob Laue a écrit :

Okay,
now I found some time to look at Giulios patch and I think I understood it :P 
(So many $'s in there :P)
So, what actually happens in that patch is that on [loadbang] we read 32768 
samples into an array using soundfiler.
Then when the file should be played, we do play the first 32768 samples using 
[tabplay~] and simultaneously load the rest of the file using [readsf~]. Then, 
when [tabplay~] is done playing the first bit of the sample, we send a [1( to 
[readsf~] to start playing the rest of the file.
I don't have any audio pops playing eight samples simultaneously, even using 
the cheap hdmi-to-cinch-converter as my audio interface (which caused more pops 
in comparison to the Scarlett USB interface while trying olivers patch). Also, 
I don't have to adjust Pd's audio settings. I can use the standard settings 
(44100, 64 blocksize, 25 msec) and I don't get audio pops, which is good.

But there is one thing that I realised: The wav-files are not played at 
original speed. They are all recorded in 122 bpm. When I play them with Giulois 
patch, the samples are played quite slowly, at around 111 bpm.


look like the sample are recorded at 48KHz and play at 44100.


In a later version of my sample player, I want to be able to change the 
bpm/tempo in which the samples are played, so I will need to have some 
mechanism for changing this. Using e.g. [phasor~] to play samples, this should 
work, but I don't know if it will be possible to do this using Giulios 
approach. In the help file of [tabplay~], it says that samples are played with 
no transposition, so maybe a transposition will not be possible to implement?! 
On the other hand, it says that [tabplay~] does not have the 
interpolation-artefacts that [tabread4~] has, which I would have, if I used a 
[phasor~] approach.


if you want to change the tempo, you need to somehow interpolate the samples...

best


All the best, Jakob
*Gesendet:* Dienstag, 05. November 2019 um 15:40 Uhr
*Von:* "oliver" 
*An:* Kein Empfänger
*Cc:* Pd-List 
*Betreff:* Re: [PD] Raspberry Pi: Loading Samples RAM problem
Jakob Laue wrote:
 > Okay,
 > finally I found some time to try some stuff out. First, I gave Olivers
 > examples a try.
 > I made a patch with eight [ol_sfplay~] objects to simulate my sample
 > player and tested this patch on my old Raspi 2
 > and also a Raspi 3. I also tested two different audio interfaces: a
 > Scarlett 2i4 USB audio interface and a HDMI-to-CINCH-Converter running
 > on the 2835 ALSA driver.
 > The best result was achieved by the Raspberry Pi 3 with the Scarlett
 > audio interface. I used
 > - block length of 64 from Pd's preferences
 > - buffersize of 512 and 1024 for [ol_sfplay~]
 > I have no pops and Pd does not freeze.
 > When I use the same configurations with the hdmi-to-cinch-converter and
 > alsa, I get audio pops.

please also consider using even 2048 as buffersize for [ol_sfplay~]. AND
you might want to increase PD's audio delay with the "-audiobuf" startup
flag.

try "-audiobuf 120" or higher and work your way down from there.

i remember using this method on a PI2 with an 8 track wav-file and
really had to increase those values to get a smooth playback.

it worked alright in the end but then i had no video-traffic ...

in general, use a PI3 if possible

best

oliver



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list





___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Raspberry Pi: Loading Samples RAM problem

2019-11-11 Thread Martin Peach
On Mon, Nov 11, 2019 at 1:56 PM Jakob Laue  wrote:

>
>
> Also, I don't have to adjust Pd's audio settings. I can use the standard
> settings (44100, 64 blocksize, 25 msec) and I don't get audio pops, which
> is good.
>
> But there is one thing that I realised: The wav-files are not played at
> original speed. They are all recorded in 122 bpm. When I play them with
> Giulois patch, the samples are played quite slowly, at around 111 bpm.
>

If the wav files were recorded at 48000 and played back at 44100 you would
get that.
(122/111 ~= 48000/44100)
Martin
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] Raspberry Pi: Loading Samples RAM problem

2019-11-11 Thread Jakob Laue
Okay,

now I found some time to look at Giulios patch and I think I understood it :P (So many $'s in there :P)

So, what actually happens in that patch is that on [loadbang] we read 32768 samples into an array using soundfiler.

Then when the file should be played, we do play the first 32768 samples using [tabplay~] and simultaneously load the rest of the file using [readsf~]. Then, when [tabplay~] is done playing the first bit of the sample, we send a [1( to [readsf~] to start playing the rest of the file.

 

I don't have any audio pops playing eight samples simultaneously, even using the cheap hdmi-to-cinch-converter as my audio interface (which caused more pops in comparison to the Scarlett USB interface while trying olivers patch). Also, I don't have to adjust Pd's audio settings. I can use the standard settings (44100, 64 blocksize, 25 msec) and I don't get audio pops, which is good.


But there is one thing that I realised: The wav-files are not played at original speed. They are all recorded in 122 bpm. When I play them with Giulois patch, the samples are played quite slowly, at around 111 bpm.

 

In a later version of my sample player, I want to be able to change the bpm/tempo in which the samples are played, so I will need to have some mechanism for changing this. Using e.g. [phasor~] to play samples, this should work, but I don't know if it will be possible to do this using Giulios approach. In the help file of [tabplay~], it says that samples are played with no transposition, so maybe a transposition will not be possible to implement?! On the other hand, it says that [tabplay~] does not have the interpolation-artefacts that [tabread4~] has, which I would have, if I used a [phasor~] approach.

 

All the best, Jakob



Gesendet: Dienstag, 05. November 2019 um 15:40 Uhr
Von: "oliver" 
An: Kein Empfänger
Cc: Pd-List 
Betreff: Re: [PD] Raspberry Pi: Loading Samples RAM problem

Jakob Laue wrote:
> Okay,
> finally I found some time to try some stuff out. First, I gave Olivers
> examples a try.
> I made a patch with eight [ol_sfplay~] objects to simulate my sample
> player and tested this patch on my old Raspi 2
> and also a Raspi 3. I also tested two different audio interfaces: a
> Scarlett 2i4 USB audio interface and a HDMI-to-CINCH-Converter running
> on the 2835 ALSA driver.
> The best result was achieved by the Raspberry Pi 3 with the Scarlett
> audio interface. I used
> - block length of 64 from Pd's preferences
> - buffersize of 512 and 1024 for [ol_sfplay~]
> I have no pops and Pd does not freeze.
> When I use the same configurations with the hdmi-to-cinch-converter and
> alsa, I get audio pops.

please also consider using even 2048 as buffersize for [ol_sfplay~]. AND
you might want to increase PD's audio delay with the "-audiobuf" startup
flag.

try "-audiobuf 120" or higher and work your way down from there.

i remember using this method on a PI2 with an 8 track wav-file and
really had to increase those values to get a smooth playback.

it worked alright in the end but then i had no video-traffic ...

in general, use a PI3 if possible

best

oliver



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list





___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] messages into [bp~ ] audio input trigger impulses?

2019-11-11 Thread Peter P.
Thanks for the good explanation Christof!
cheersz, P

* Christof Ressi  [2019-11-11 17:50]:
> Pd does automatic float to signal promotion on all its signal inlets. The 
> only*) possible exception is the main (= leftmost) inlet, if the class has a 
> dedicated float message (very few objects do).
> 
> BTW, sending floats to filter objects can be quite useful, e.g. you can use 
> [lop~] as an exponential ramp generator, unlike the linear ramp generated by 
> [line~].
> 
> > Furthermore, the help patch for signal arithmetic objects says, that
> > they accept numeric messages into their right inlet if a numeric
> > argument hast been supplied. It seems this is not (always?) required.
> 
> I think this stems from the old times when Pd didn't do float to signal to 
> promotion on all signal inlets. Note that while you can send floats to the 
> right inlet of [+~], this still adds two signals. On the other hand, [+~ 5] 
> adds a signal and a scalar, which is more efficient.
> 
> Christof
> 
> *) some objects try to seperate floats from signals even on auxiliary signal 
> inlets, but this can only be achieved with tremendous hackery.
> 
> > Gesendet: Montag, 11. November 2019 um 17:29 Uhr
> > Von: "Peter P." 
> > An: pd-list 
> > Betreff: [PD] messages into [bp~ ] audio input trigger impulses?
> >
> > Hi,
> >
> > just found out by accident that one can send number messages into the
> > first audio input of the [bp~ ] bandpass filter. They seem to be treated
> > as audio signal values and cause an audio signal to be output by [bp~ ].
> > Is this intentional?
> >
> > Furthermore, the help patch for signal arithmetic objects says, that
> > they accept numeric messages into their right inlet if a numeric
> > argument hast been supplied. It seems this is not (always?) required.
> >
> > cheers, P
> >
> >
> >
> > ___
> > Pd-list@lists.iem.at mailing list
> > UNSUBSCRIBE and account-management -> 
> > https://lists.puredata.info/listinfo/pd-list
> >
> 
> 
> 
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] messages into [bp~ ] audio input trigger impulses?

2019-11-11 Thread Christof Ressi
Pd does automatic float to signal promotion on all its signal inlets. The 
only*) possible exception is the main (= leftmost) inlet, if the class has a 
dedicated float message (very few objects do).

BTW, sending floats to filter objects can be quite useful, e.g. you can use 
[lop~] as an exponential ramp generator, unlike the linear ramp generated by 
[line~].

> Furthermore, the help patch for signal arithmetic objects says, that
> they accept numeric messages into their right inlet if a numeric
> argument hast been supplied. It seems this is not (always?) required.

I think this stems from the old times when Pd didn't do float to signal to 
promotion on all signal inlets. Note that while you can send floats to the 
right inlet of [+~], this still adds two signals. On the other hand, [+~ 5] 
adds a signal and a scalar, which is more efficient.

Christof

*) some objects try to seperate floats from signals even on auxiliary signal 
inlets, but this can only be achieved with tremendous hackery.

> Gesendet: Montag, 11. November 2019 um 17:29 Uhr
> Von: "Peter P." 
> An: pd-list 
> Betreff: [PD] messages into [bp~ ] audio input trigger impulses?
>
> Hi,
>
> just found out by accident that one can send number messages into the
> first audio input of the [bp~ ] bandpass filter. They seem to be treated
> as audio signal values and cause an audio signal to be output by [bp~ ].
> Is this intentional?
>
> Furthermore, the help patch for signal arithmetic objects says, that
> they accept numeric messages into their right inlet if a numeric
> argument hast been supplied. It seems this is not (always?) required.
>
> cheers, P
>
>
>
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list
>



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] messages into [bp~ ] audio input trigger impulses?

2019-11-11 Thread Peter P.
Hi,

just found out by accident that one can send number messages into the
first audio input of the [bp~ ] bandpass filter. They seem to be treated
as audio signal values and cause an audio signal to be output by [bp~ ].
Is this intentional?

Furthermore, the help patch for signal arithmetic objects says, that
they accept numeric messages into their right inlet if a numeric
argument hast been supplied. It seems this is not (always?) required.

cheers, P



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] best way to use a variable number of polyphonic voices?

2019-11-11 Thread Matt Davey
If i wanna set up round robin polyphony with a variable number of available
voices, is the best way just to have a bunch of different [poly] objects
and subpatches and just choose between them?  or is there something more
elegant?
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] Sleigh Bells

2019-11-11 Thread Francisco Medeiros
Dear list,
Has anyone ever made some Christmas sleigh bells sound in pd they would
like to share or has some tips on how one could do it?
Something like this:

https://www.youtube.com/watch?v=9ck_Og-R9rI

Best regards,
Xis
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list