-
kshahar
Hi,
I've got a setup that performs some effects on microphone input (adc~ and dac~).
I'd like to implement the following feature: after a certain event occurs, normal operation is stopped and the last X seconds should be played (X between 20-180).For implementation, I can think of two cases:
1. After X seconds have passed - in this case I can use "delwrite~ X" and delread~
2. Before X seconds have passed - in this I can write to table with size X, using tabwrite~, and read using tabread~
Is this the correct approach to implement this?
Thanks in advance
-
kshahar
Hi,
I'm trying to implement a simple musician's metronome using the osc~ and metro objects. My current attempt is attached to the message.
The problem is that there are noticeable "click" sounds whenever the sound starts or stops.
What approach would you recommend in order to smooth those clicks?Thanks in advance
-
kshahar
Hi,
I'm beginning with PD so please bear with me
I'm trying to translate an existing application to PD, and having difficulties with a certain part.In general, the application applies a filter when the input level is above a certain threshold. When it goes below the threshold, it waits for some time and stops applying the filter.
So there are three possible states: Normal, Wait, Stop. Here's a short pseudo-code to describe the state change logic:
if (level >= threshold) { state = Normal } else if (state == Normal) { TimerBegin() state = Wait } else if (state == Wait) { if (TimerElapsed() > waitTime) { state = Stop } }
Afterwards, the state is used to determine whether to activate a filter:
if (state != Stop) { ApplyFilter() }
What is the correct approach to implement this in PD? I understand that I need to use
Thanks!
-
kshahar
Thanks for your response. Regarding the [delwrite~] approach -
For simplicity consider that I'd like to play the last 60 seconds. If only 30 seconds have passed, I'd like to play the last 30 seconds.
The audio will go into a [delwrite~ my_line 60000].
If more than 60 seconds have passed, the audio will be played from a [delread~ my_line 60000].
If less than 60 seconds (for example, 30 seconds) have the passed, the audio will be played a [delread~ my_line 30000]Is this what you meant?
-
kshahar
Thanks Nau, adding a [line~] with a short time solved this issue
-
kshahar
Hi Joe,
Thanks! it works perfectly for my needs.
I only had to add a "change" object for the input value, otherwise the delay restarts whenever the input changes (in my case, all the time).
Shahar