| You don't need to reset the sink or accumulating variables or channels
at the end of each kperiod, the signal flow graph opcodes take care of
that for you.
The signal flow opcodes can transmit arrays, i.e. for spatialization
you can set of Ambisonic or multchannel audio signals to route through
the signal flow graph.
The signal flow graph opcodes as such have nothing do do with pfield
conventions. But the module system assumes that users will arbitrarily
re-order patches, therefore it is best if the pfields follow the same
convention. But they certainly don't have to use MY convention. Also
as long as your score or score generator knows which pfield format
goes with which instrument definition, it is not necessary to use a
pfield convention.
It is easy to put ratios into pfields.
-- You can put them directly into the pfields:
i insno, time, duration, pitch_numerator, pitch_denominator, octave
-- You can put them into the score as arithmetic expressions. The
following Csound score directly computes frequencies from numerator /
denominator * lowest_frequency * octave number.
; C E B
i "Droner1" 0 60 [ 1 / 1 * 60 * 1] 60
i "Droner1" 0 60 [ 5 / 4 * 60 * 2] 60
i "Droner1" 0 30 [28 / 15 * 60 * 3] 60
; C Ab E B
i "Blower1" 30 30 [ 8 / 5 * 60 * 1] 60
; G F# B
i "Buzzer1" 60 60 [ 3 / 2 * 60 * 1] 60
i "Buzzer1" 60 60 [45 / 32 * 60 * 2] 60
i "Buzzer1" 60 30 [28 / 15 * 60 * 3] 60
; G F B
i "Buzzer1" 90 30 [ 4 / 3 * 60 * 3] 60
; C E B
i "Droner1" 120 60 [ 1 / 1 * 60 * 1] 60
i "Droner1" 120 60 [ 5 / 4 * 60 * 2] 60
i "Droner1" 120 30 [28 / 15 * 60 * 2] 60
i "Droner1" 150 30 [ 1 / 1 * 60 * 5] 60
If you want to convert frequencies to fractional MIDI key numbers this
UDO will do it:
opcode hertz2midinn, i, i
ihertz xin
print ihertz
; m = 12*log2(fm/440 Hz) + 69
ilog2 = log(2)
imidinn = 12 * (log(ihertz / 440) / ilog2) + 69
print imidinn
xout imidinn
endop
But you don't need this and you don't need logs. You could (not
tested) get the fractional MIDI key numbers directly from ratios like
this, assuming middle C is C3 (usual convention for synths, C0=24):
i "Droner1" 120 60 [ ((numerator / denominator) * 12) + (octave * 12) + 24 ] 60
-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com
On Sat, May 6, 2017 at 10:38 AM, Forrest Curo wrote:
> A few questions re the modular idea:
>
> 1) Advantages (rather than conceptional digestibility) of 'connect' vs
> channels?
>
> 2) A set of instruments using other p-field conventions could still work
> together using the same system?
>
> 3) Is anyone working on a literal graphical representation <--> signal flow
> graph conversion system? (whether for setting up the original header or
> something that might be modified in real time?)
>
> 4) re question #2: My purpose would be to put frequencies rather than
> midi-keys into p4 -- Is there a simple commonly-known method for turning
> just-intonation ratios approximately into fractional midi differences? Um,
> for an octave, add 12... but arrgh, here comes that log2 stuff again...?
>
> Forrest Curo
> San Diego
>
>
> On Sat, May 6, 2017 at 2:41 AM, Andrea Strappa wrote:
>>
>> Csound is making giant steps, always bigger!
>>
>> My compliments, Mr. Gogins.
>>
>>
>>
>> Il 05/05/2017 18:27, Michael Gogins ha scritto:
>>>
>>> Shader toy web site for demos and snippets of GLSL code:
>>>
>>> https://www.shadertoy.com/
>>>
>>> My "module system" for interchangeable and routable Csound
>>> instruments, based on the signal flow graph opcodes:
>>>
>>>
>>> https://github.com/gogins/gogins.github.io/tree/master/csound/silencio/patches
>>>
>>> The description of the signal flow graph opcodes from the Csound
>>> Reference Manual
>>>
>>> https://gogins.github.io/csound/html/indexframes.html
>>>
>>> Please note, if you are using a recent desktop version of the Chrome
>>> browser, you can play and experiment with the example csd from this
>>> page of the manual right in your browser.
>>>
>>> Also, attached is my document describing the module system in more
>>> detail. I will be fleshing out the stuff about spatialization at some
>>> point.
>>>
>>> If you like you can just use Git to clone gogins.github.io on your
>>> computer and get all of this stuff at once.
>>>
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>> https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>> https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |