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

2010-12-13 Thread Andy Farnell



Hi Daniel,

Sorry for the late reply on this subject.

To do exactly as you describe it is possible to
take the cosine or sine of a line over period.

Use [vline~] as it is much more flexible.

Take a line running from 0 to 1 in some time, 
and use the cosine function to obtain exactly
one period in the same time. 

Note: You don't need the 2 * PI with Pure Data
audio objects, they are adjusted for radians
(rotation normalised so that 2*PI = 1 )



On Tue, 7 Dec 2010 23:32:48 -0800
Daniel K. konarsonarsmo...@gmail.com wrote:

 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.

-- 
Andy Farnell padawa...@obiwannabe.co.uk

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


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

2010-12-08 Thread Ludwig Maes
Could you be more specific, im not sure I entirely understand the problem...

On 8 December 2010 08:32, Daniel K. konarsonarsmo...@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

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



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


Re: [PD] Osc phase and number of periods for subsonic touch-music, (Daniel K.)

2010-12-08 Thread david medine

Daniel,
You could make a table with a sine wave form in it and drive it with a 
[tabosc4~] object. The only way (as far as I know) to ensure sample 
accuracy for this is to set the blocksize to 1 (use the [blocksize] 
object). Otherwise you might run over the end of your table by as much 
as 63 samples and you will probably get a click (Pd defaults to 
calculating 64 samples at a time).

Hope that helps,
David

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


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

2010-12-08 Thread Collin Oldham


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-requ...@iem.at wrote:

On 8 December 2010 08:32, Daniel K.konarsonarsmo...@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
 



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


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

2010-12-08 Thread Claude Heiland-Allen

On 08/12/10 07:32, Daniel K. wrote:

generating sine waves with
finite numbers of periods that always started with the same phase.


10 periods of 20Hz sine wave, subsample accurate timing without needing 
[block~]:



0, 10 500
 |
[vline~]
 |
[- 0.25]
 |
[cos~]
 |
[dac~]


For N periods of F Hz, something like this should work if my mental 
algebra is up to scratch: 0, N T where T = 1000 * N / F


Have fun!


Claude
--
http://claudiusmaximus.goto10.org

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


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

2010-12-07 Thread Daniel K.
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
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list