Csound Csound-dev Csound-tekno Search About

[Csnd] Quick way to do this?

Date2010-09-09 06:24
FromShaun Tuck
Subject[Csnd] Quick way to do this?
What's the quick way to do this?

I have Instrument 1 that can already give a-rate output in one long single event that is effectively a streaming sequence of frequencies.  The frequencies that output from Instrument 1 are based on a specific set of possible frequencies (not following 12-tone equal temperament) controlled by tables and formulas.  The duration of each frequency in the streaming sequence is practically random.

I would like to create an Instrument 2 or combination of Instrument 2 and score that algorithmically reads the a-rate output of frequencies of Instrument 1 and whenever there is a change in frequency, generate a series of correlating i-rate events with a duration that equals the random time that such frequency is held at a-rate. 

Effectively, the output of Instrument 2 (and likely, supplementary algorithmically-defined score) would be MIDI note events matching the durations and frequencies of Instrument 1 when played.

I've looked at tabplay, tabrec, and pvsftr as possible opcodes to approach a solution.  Certainly, any insights would be greatly appreciated!


Sincerely,

Shaun Tuck

Date2010-09-09 07:31
FromOeyvind Brandtsegg
Subject[Csnd] Re: Quick way to do this?
Maybe the simplest way would be something like

instr 1
kduration = ...
kfreq = ...
chnset kduration, "duration"
chnset kfreq, "frequency"
endin

instr 2
kduration chnget "duration"
kfreq  chnget "frequency"
kchange changed kfreq
if kchange > 0 ...
endin

Oeyvind

2010/9/9 Shaun Tuck :
> What's the quick way to do this?
>
> I have Instrument 1 that can already give a-rate output in one long single
> event that is effectively a streaming sequence of frequencies.  The
> frequencies that output from Instrument 1 are based on a specific set of
> possible frequencies (not following 12-tone equal temperament) controlled by
> tables and formulas.  The duration of each frequency in the streaming
> sequence is practically random.
>
> I would like to create an Instrument 2 or combination of Instrument 2 and
> score that algorithmically reads the a-rate output of frequencies of
> Instrument 1 and whenever there is a change in frequency, generate a series
> of correlating i-rate events with a duration that equals the random time
> that such frequency is held at a-rate.
>
> Effectively, the output of Instrument 2 (and likely, supplementary
> algorithmically-defined score) would be MIDI note events matching the
> durations and frequencies of Instrument 1 when played.
>
> I've looked at tabplay, tabrec, and pvsftr as possible opcodes to approach a
> solution.  Certainly, any insights would be greatly appreciated!
>
>
> Sincerely,
>
> Shaun Tuck


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"