I’d like to output a value at audio rate. I can see a few ways to accomplish this, but they all seem pretty odd, for example I’m currently doing:
var v = 0.5;
Out.ar(0, Line.ar(v, v, 10000));
I would think there is some standard short way to do something like this?
As to why, I’m integrating with an ES-8 and would like to generate an offset.
The shortest to output an ar constant, AFAIK:
DC.ar(0.5)
Hrm, DC.ar
can’t be changed though? Sorry for not being clear this offset need to change (I’m sending 1/v oct pitch information ).
Changed from where? Do you want that DC-level to be a control input to your (DC) synth? And if so, how often does that DC level need to change? E.g. are control-rate changes ok? For instance
(SynthDef(\dc, {
var out = \out.ir(88), amp = \amp.kr(0.5);
Out.ar(out, K2A.ar(amp));
}).add);
Don’t send this to speakers. I put a high default value for the bus there on purpose. Test e.g. with
b = Bus.audio(s, 1);
y = Synth(\dc, [out: b]);
b.scope;
y.set(\amp, 1);
Hrm, actually after thinking about it some more I think DC.ar
is fine for the code I was writing, was just a trivial thing to work out what SC values map to 1/voct. In other code that I wrote to sequence the modular from SC, I don’t have this problem because values are being generated from say DSeq
.
K2A.ar
!!! I was looking for something like this but I couldn’t find it. I think I was adding bus
to my Google search query because of other things I was trying so K2A
and A2K
weren’t showing up.
Thanks!
Google doesn’t help here, the mailing-list archive is the largest resource (almost 20 years of Q & A) and not open to search engines.
Unfortunately the interface is confusing users, see this thread:
https://www.listarc.bham.ac.uk/lists/sc-users/msg67589.html
( https://www.listarc.bham.ac.uk/lists/sc-users-2020/msg67589.html )
http://www.listarc.bham.ac.uk/marchives/sc-users/
Select one of the years, go to search, or directly to
https://www.listarc.bham.ac.uk/lists/sc-users-old/search/
A2K / K2A are giving hundreds of matches.
1 Like