[PD] Osc phase and number of periods for subsonic touch-music

Collin Oldham coldham at mac.com
Wed Dec 8 19:12:54 CET 2010


Hi,

You can reset the phase of an [osc~] by sending a message to its right 
inlet. In your case the message would be [0.25( , i.e. 1/4 of the way 
through the cosine wave form, which is zero. That won't work at the note 
off, though, so the sensible thing would be to use an envelope. But, if 
you really want precise control of phase instead, write a period of a 
sine wave to a table (might as well use a long one) and read through it 
with a [line~] and a [tabread~].If you want 20 Hz, the period in ms is 
1000/20 = 50. Let's say the sine table is 4096 samples long and lives in 
a table: [table sine 4096]. Use [metro 50] to bang a message [0, 4096 
50( to [line~] controlling [tabread~ sine]. That way, when you turn on 
the [metro] it will start at zero, and when you turn it off, [line~] 
will continue until it reaches the end of the table (which should also 
be a zero), and then stop.



Collin


On 12/08/2010 07:02 AM, pd-list-request at iem.at wrote:
> On 8 December 2010 08:32, Daniel K.<konarsonarsmonar at gmail.com>  wrote:
>    
>> >
>> >  I'm working on re-realizing a piece I wrote for subwoofer that is meant to
>> >  be felt by touching the speaker cone instead of hearing it. This is done by
>> >  using sine waves from around 15 to 26 Hz at low volume adn utilizing
>> >  difference frequencies to get lower frequency pulses. My problem is that the
>> >  way I have my synth set up, the osc~ objects end up receiving midi messages
>> >  a unpredictable times in the period which is leading to interference and
>> >  thus unintended dynamic shifts. Another problem is clicks on note-offs. I
>> >  can get around those with [line~] or a low pass filter but it would seem
>> >  more elegant if I could solve both problems by generating sine waves with
>> >  finite numbers of periods that always started with the same phase. I haven't
>> >  been able to figure out to this and I've thrown enough hours at it that I
>> >  think it's time to ask for some help. Any suggestions would be much
>> >  appreciated.
>> >
>> >  -Daniel Konar
>>      




More information about the Pd-list mailing list