|
Hi Art,
What you have there isn't really to do with diskin but to do with how controllers are initialized to 'useful' starting points according to their General MIDI function. Try the code below and you will see that Volume/ctrl 7 and Expression/ctrl 11 are initialised to their maximum level 127 - probably useful in a GM situation so that we aren't playing muted instruments until volume and expression are explicitly set. Balance/ctrl 8 and Pan/ctrl 10 are 'sensibly' set to their midway value 64. I think this could be a portmidi feature but perhaps someone more knowledgeable can illuminate me? Personally I find this not so useful as I have no interest in General MIDI and would prefer that this initialising was not done. Can it be removed / filtered out?
Iain
-----------------------------------
sr = 44100
ksmps = 1
nchnls = 1
instr 1
gk1 ctrl7 1,1,0,127
gk2 ctrl7 1,2,0,127
gk3 ctrl7 1,3,0,127
gk4 ctrl7 1,4,0,127
gk5 ctrl7 1,5,0,127
gk6 ctrl7 1,6,0,127
gk7 ctrl7 1,7,0,127
gk8 ctrl7 1,8,0,127
gk9 ctrl7 1,9,0,127
gk10 ctrl7 1,10,0,127
gk11 ctrl7 1,11,0,127
prints "Controller Initial Values:\\n"
prints "Ctrl. 1 = %d\\n", gk1
prints "Ctrl. 2 = %d\\n", gk2
prints "Ctrl. 3 = %d\\n", gk3
prints "Ctrl. 4 = %d\\n", gk4
prints "Ctrl. 5 = %d\\n", gk5
prints "Ctrl. 6 = %d\\n", gk6
prints "Ctrl. 7 = %d\\n", gk7
prints "Ctrl. 8 = %d\\n", gk8
prints "Ctrl. 9 = %d\\n", gk9
prints "Ctrl. 10 = %d\\n", gk10
prints "Ctrl. 11 = %d\\n\\n", gk11
endin
instr 2
prints "...and a moment later:\\n"
prints "Ctrl. 1 = %d\\n", i(gk1)
prints "Ctrl. 2 = %d\\n", i(gk2)
prints "Ctrl. 3 = %d\\n", i(gk3)
prints "Ctrl. 4 = %d\\n", i(gk4)
prints "Ctrl. 5 = %d\\n", i(gk5)
prints "Ctrl. 6 = %d\\n", i(gk6)
prints "Ctrl. 7 = %d\\n", i(gk7)
prints "Ctrl. 8 = %d\\n", i(gk8)
prints "Ctrl. 9 = %d\\n", i(gk9)
prints "Ctrl. 10 = %d\\n", i(gk10)
prints "Ctrl. 11 = %d\\n\\n", i(gk11)
endin
i 1 0.1 3600
i 2 0.2 3600
-----------------------------------------------
Output:
Controller Initial Values:
Ctrl. 1 = 0
Ctrl. 2 = 0
Ctrl. 3 = 0
Ctrl. 4 = 0
Ctrl. 5 = 0
Ctrl. 6 = 0
Ctrl. 7 = 0
Ctrl. 8 = 0
Ctrl. 9 = 0
Ctrl. 10 = 0
Ctrl. 11 = 0
...and a moment later:
Ctrl. 1 = 0
Ctrl. 2 = 0
Ctrl. 3 = 0
Ctrl. 4 = 0
Ctrl. 5 = 0
Ctrl. 6 = 0
Ctrl. 7 = 127
Ctrl. 8 = 64
Ctrl. 9 = 0
Ctrl. 10 = 64
Ctrl. 11 = 127
________________________________
> From: abhunkin@uncg.edu
> To: csound@lists.bath.ac.uk
> Date: Tue, 15 Jun 2010 19:10:00 -0400
> Subject: [Csnd] Re: RE: diskin anomoly
>
>
>
> Iain (and others),
>
> The basic example is below (I tried to make it close to the one in the manual - including using the "beats.wav" from the distro). Of course, the MIDI device number will likely need changing for a given system.
>
> Controller 7 is the volume control on most MIDI keyboards.
>
> I've tested this with several controllers and on both Csound 5.06 and 5.10 - with results as previously described.
>
> The file is looped (final "1" in diskin line) so you have time to experiment with controller 7's settings. Without the ctrlinit command, even with CC7 set to zero, "beats.wav" starts out full blast. With ctrlinit, the result is as expected.
>
> I'd appreciate feedback. And if my observations are verified, I'd be happy, for a developer to take a look at the diskin code.
>
> Art Hunkins
>
>
>
>
>
> -odac -M10
>
>
>
>
> sr = 44100
> ksmps = 100
> nchnls = 1
>
> instr 1
>
> ; ctrlinit 1, 7, 0
> kamp ctrl7 1, 7, 0, 1
> a1 diskin "beats.wav", 1, 0, 1
> out a1 * kamp
>
> endin
>
>
>
>
>
> i 1 0 3600
>
> e
>
>
>
> ----- Original Message -----
> From: Iain McCurdy
> To: csound@lists.bath.ac.uk
> Sent: Tuesday, June 15, 2010 3:30 PM
> Subject: [Csnd] RE: diskin anomoly
>
> HI Art,
>
> Could you post the full example? I tried what you have posted here and don't get the same results you seem to be getting. Admittedly I'm using the virtual midi device, I have no hardware handy at the moment.
>
>> From: abhunkin@uncg.edu
>> To: csound@lists.bath.ac.uk
>> Date: Tue, 15 Jun 2010 14:37:22 -0400
>> Subject: [Csnd] diskin anomoly
>>
>> Normally, an audio signal, when MIDI-controlled by ctrl7, will output
>> nothing until the controller is moved. This seems to suggest that the
>> default ctrl7 initialization is 0; the controller is read only when it is
>> moved.
>>
>> However, with this basic instrument:
>> a1 diskin
>> kamp ctrl7
>> out a1 * kamp
>>
>> the *full output* of diskin is heard until ctrl7 is moved (even with the
>> controller set to zero). To initialize to *silence*:
>> ctrlinit (controller value =) 0
>>
>> must be added before the ctrl7 line.
>>
>> Is this a bug? Why should diskin's output be treated (by a MIDI controller)
>> any different from any other audio generator? (I have very rarely found it
>> necessary to use ctrlinit; the only time I can recall was when the initial
>> value needed to be something *other* than zero.)
>>
>> Art Hunkins
>>
>>
>>
>> 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"
>>
>
> ________________________________
> Get a free e-mail account with Hotmail. Sign-up now.
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
Do you have a story that started on Hotmail? Tell us now
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"
|