Csound Csound-dev Csound-tekno Search About

[Csnd] Initializing and scaling MIDI controlled values

Date2009-07-07 16:52
FromCharles Gran
Subject[Csnd] Initializing and scaling MIDI controlled values
I'm sure this info is out there, but if someone could help or point
that would be great!


1. If I have a value like a time value for delay:

kdelay ctrl7 8,13,0,4

do I need to use initc7 to create the initial value, or is there
something else I can use?  I can't seem to do something like:

kdelay = 1
kdelay ctrl7 8,13,0,4

so that kdelay will stay at one until I move the knob.


2. If I'm using a controller for pvscale to do realtime transposition
and I want my panpot which I'm controlling with

kscale ctrl7 8,12,0.25,4.

What I'd really like is to equally divide the controller with 2
octaves on either side, so full left is 15va below, full right is 15va
above and center is 1.


Charles

Date2009-07-07 17:30
FromIain McCurdy
Subject[Csnd] RE: Initializing and scaling MIDI controlled values
Hi Charles,

1. You have to 'fool' Csound into thinking that a midi controller has been moved to an initial position, otherwise it assumes it is at its minimum position. 'initc7' will give Csound an initial position for that MIDI controller (0=min,1=max). For an initial value of '1' in your case, use:

initc7 8,13,0.25

(1-0)/(4-0)
in instrument 0

2. As I understand it, you want pan controller movement to the right to transpose up to +2 octaves, to the left to transpose to -2 octaves and in the centre no transposition.
You can you 'oct' format to quickly implement this:

;init. set at midway position
initc7 8,12,0.5
;;
;transposition in octaves
koct ctrl7 8,12,-2,2
;convert to a frequency rescaling ratio
kscale = cpsoct(8+koct)/cpsoct(8)

Bye,
Iain

> Date: Tue, 7 Jul 2009 10:52:50 -0500
> From: chasgran@gmail.com
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] Initializing and scaling MIDI controlled values
>
> I'm sure this info is out there, but if someone could help or point
> that would be great!
>
>
> 1. If I have a value like a time value for delay:
>
> kdelay ctrl7 8,13,0,4
>
> do I need to use initc7 to create the initial value, or is there
> something else I can use? I can't seem to do something like:
>
> kdelay = 1
> kdelay ctrl7 8,13,0,4
>
> so that kdelay will stay at one until I move the knob.
>
>
> 2. If I'm using a controller for pvscale to do realtime transposition
> and I want my panpot which I'm controlling with
>
> kscale ctrl7 8,12,0.25,4.
>
> What I'd really like is to equally divide the controller with 2
> octaves on either side, so full left is 15va below, full right is 15va
> above and center is 1.
>
>
> Charles
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Windows Live™: Keep your life in sync. Check it out.