|
Hi Mr. Oeyvind,
thanks, Your example work very well (on windows). Exactly what i need.
Hi Mr. David,
thanks for Your answer and for Your explanation, i'm working on Your
example, and that is study (i.e. a way to understand).
And thanks for Your words. It's always nice to feel how many passion there
is about csound and
music out there!
ciao from an italian hermit
fran.
David Akbari wrote:
>
> Hi Fran,
>
> It sure has been a while since I've had a chance to use Csound, but
> this is my interpretation of your example as you describe it.
>
> This instrument takes CC 10 (GM Pan) on MIDI channel 1 as the
> continuous controller for pan position. This is a simple pan and not a
> constant power or equal weighted pan. At first I wanted to make just a
> bare bones example, but when I actually got out my MIDI controller it
> ended up being something more musical, which Dr. B always encouraged
> us to make in our examples :)
>
> The key concept is using the "changed" opcode as the input to
> "trigger" so it only prints when you are moving the controller (and on
> initialization). I hope the inclusion of "massign" and "ctrlinit"
> doesn't throw you, those aren't technically necessary but many of my
> professors from Berklee would frown if I didn't include reasonable
> defaults in any instruments :)
>
> Tested on Linux. You may need to alter CsOptions to suit other OSes. I
> wish you the best of luck in your sound explorations with Csound.
> Hopefully it helps aid the learning process about what goes into the
> sounds behind the music in ways commercial software cannot do as
> easily. I
>
> Of course there are ways to improve this. You might consider some
> reasonable enveloping strategy, and to implement a more pleasing pan
> algorithm like the constant power technique described in the text by
> Dr. Curtis Roads or The Csound Book by Dr. Boulanger and colleagues.
> You might find other ways to improve this to suit your individual
> needs, and I hope you do.
>
>
> Good luck and happy Csounding,
>
> David Akbari
>
>
>
>
> -m0 -odac -iadc -d -b128 -B256 -Mhw:2,0 -+rtaudio=alsa -+rtmidi=alsa
>
>
>
> sr = 44100
> ksmps = 128
> nchnls = 2
> massign 1, 1
> ctrlinit 1, 10, 64
>
> /*--- ---*/
>
> instr 1
>
> iamp ampmidi 12000
> icps cpsmidi
>
> kpanval ctrl7 1, 10, 0, 127
> kpan = kpanval/127
>
> kchang changed kpanval
> ktrig trigger kchang, 0, 0
>
> aosc1 vco2 iamp/2, icps-0.02, 10
> aosc2 vco2 iamp/2, icps+0.02, 10
> aosc sum aosc1, aosc2
> alpf butlp aosc, 3200
>
> printf "Pan [%f]\n", ktrig, kpan
>
> aoutL = alpf * (1-kpan)
> aoutR = alpf * kpan
>
> outs aoutL, aoutR
>
> endin
>
> /*--- ---*/
>
>
> f0 3600
>
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
> |