Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: Re: Re: Re: Re: Re: massign, pgmassign

Date2010-04-01 09:45
From"vallste@libero.it"
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: massign, pgmassign

I do not understand what you want to do but, if you want to change the table for your tuning you can try by creating an always on intrument like this before your midi instruments:

instr 50

imin = 10; number of the first tuning table

imax = 20; number of the last tuning table

kval midictrl inum_of_your_controller

ktab = imin + (imax -imin) * kval / 127

gktable_out = int(ktab)

endin

In your instruments change:

ituningtable =  10
with:

ituningtable = i(gktable_out)

in the score add:

i 50 0 3600

Hope it works

----Messaggio originale----
Da: kontrapunktstefan@googlemail.com
Data: 30/03/2010 22.04
A: "vallste@libero.it"<vallste@libero.it>, <csound@lists.bath.ac.uk>
Ogg: [Csnd] Re: Re: Re: Re: Re: Re: massign, pgmassign

Dear community,
unfortunately I do have a new problem : although the allocation between different instruments and midi-channels works fine,
it does not work, when I want to change the pitch via a global control.
In this example I use the mod-wheel to choose a different scale (as I learned here in the commmunity).
It works fine with instrument 101 in channel one, but not with instr. 102 in channel two!
How can I achieve this?

2010/3/30 vallste@libero.it <vallste@libero.it>

No problem Sir!

Stefano

----Messaggio originale----
Da: kontrapunktstefan@googlemail.com
Data: 30/03/2010 14.37 Ogg: [Csnd] Re: Re: Re: Re: Re: massign, pgmassign


Dear Vallste,
now it works, thank You a lot!

2010/3/30 vallste@libero.it <vallste@libero.it>

Try by removing the following from the score:

 

i1   0    3600
i2   0    3600
i3   0    3600
and put a:

f 0 0 3600

before f1 so instruments should be activated only when required by massign.

----Messaggio originale----
Da: kontrapunktstefan@googlemail.com
Data: 30/03/2010 11.41 Ogg: [Csnd] Re: Re: Re: massign, pgmassign


No, it seems to be the same problem, at least:
it plays back instr. 31 (which is associated to channel 1) when I choose channel 3.

2010/3/30 vallste@libero.it <vallste@libero.it>
Hello,
did you try to change instrument numbers above 16 (default midi channels)?

Lets say:
instr 1 become instr 31
instr 3 become instr 32
and so on...

and:
massign 1, 31
massign 2, 32
and so on...

Don't know if it could help in your case but I remember having a strange
behaviour with lower numbered midi instruments.
Ciao


>----Messaggio originale----
>Da: rorywalsh@ear.ie
>Data: 30/03/2010 10.43
>A: <csound@lists.bath.ac.uk>
>Ogg: [Csnd] Re: massign, pgmassign
>
>I reported a similar problem yesterday on the dev list. Same thing
>really, anything I play on channel one will start instrument two
>playing.
>
>On 30 March 2010 09:39, Stefan Thomas <kontrapunktstefan@googlemail.com>
wrote:
>> Dear community,
>> I have a question concerning massign and pgmassign.
>> I want to use a csound-file to record midi via rosegarden and I want to
use
>> rosegarden also for playback.
>> When I run only csound and Jack I have the following problems:
>> although instr. 1 is played when choosing channel 1 and instr. 2 is played
>> when choosing number 2, I hear also instr. 2 when I choose program 2 on
>> channel one.
>> I also hear instr. 3 (which I only want to use for metronome click) when I
>> choose programm 9 on channel 1.
>> When I also start rosegarden, thinks become even more complicated.
Sometimes
>> I hear sound, when I start the playback in rosegarden, sometimes not.
>> What could be the reason?
>> Here is my (musical senseless) dummy-file:
>> <CsoundSynthesizer>
>> <CsOptions>
>> -odevaudio -Ma -b400 -m0d -+rtaudio=jack -i adc -o dac ; the output is
>> routed to Jack
>> ;-odevaudio -M1 -b400 ; for realtime-midi
>> </CsOptions>
>> <CsInstruments>
>>
>> sr     = 44100
>> kr     = 2205
>> ksmps  = 20
>> nchnls = 2
>>  ipch = 8.02
>>   iequal = 12
>>
>> massign 1, 1 ; midi channel one is for instr. 2
>> massign 2, 2 ; midi channel two for instr. 2
>> massign 10,3 ; midi channel 10 for instr. number 3;
>> pgmassign 2, 1; program two for inst. 1
>> pgmassign 3, 2; program three for instr. 2
>> pgmassign 1, 3 ; program one for instr. 3
>>
>>
>>
>> instr 1
>>
>>
>> ituningtable =  10
>>
>>
>>
>>  imnn    notnum
>>  indx    =  imnn * 2 + 1   ; values in table alternate between
>>                            ; Midi note nums and frequencies
>>  icps    table  indx, ituningtable
>>   iamp    ampmidi        10000
>>
>> ; defining the envelopes
>> iatt = 0.01
>> idec = 1.5
>> islev = 0
>> irel = 0.01
>> kenv madsr iatt, idec, islev, irel
>> icar = 1
>> imod = 1
>> ifmindex = 8
>> a1    foscil   kenv*iamp, icps, icar, imod, kenv*ifmindex, 1
>>
>>       outs       a1, a1
>>       endin
>>
>>  ;;;;;;;;;;;;;;;; the 2nd instrument ;;;;;;;;;;;;;;
>> instr 2
>>
>>
>> ituningtable =  10
>>
>>
>>  imnn    notnum
>>  indx    =  imnn * 2 + 1   ; values in table alternate between
>>                            ; Midi note nums and frequencies
>>  icps    table  indx, ituningtable
>>   iamp    ampmidi        10000
>>
>> ; defining the envelopes
>> iatt = 0.01
>> idec = 1.5
>> islev = 0
>> irel = 0.01
>> kenv madsr iatt, idec, islev, irel
>> icar = 1
>> imod = 1.4
>> ifmindex = 8
>> a2    foscil   kenv*iamp, icps, icar, imod, kenv*ifmindex, 1
>>
>>       outs       a2, a2
>>       endin
>> ;;;;;;;;;; the 3rd instrument
>>
>> instr 3
>> ituningtable = 10
>>  imnn    notnum
>>  indx    =  imnn * 2 + 1   ; values in table alternate between
>>                            ; Midi note nums and frequencies
>>  icps    table  indx, ituningtable
>>   iamp    ampmidi        10000
>>   adrum pluck iamp, icps, icps*0.81, 1, 3, .5
>>       outs       adrum, adrum
>>       endin
>>
>> </CsInstruments>
>> ; defining the "score"
>> <CsScore>
>> f1  0   8193  10   1
>> f 10  0 256 -23 "12tet.cps"    ; normal tempered scale
>>
>> i1   0    3600
>> i2   0    3600
>> i3   0    3600
>>
>>
>> </CsScore>
>> </CsoundSynthesizer>
>>
>>
>>
>
>
>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"
>
>




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"











Date2010-04-01 13:22
FromStefan Thomas
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: massign, pgmassign
Dear Stefano,
I don't know why, but I'didnt't succed with Your suggestion.
Instead I succeeded with:
massign 1, 101 ; midi channel one for instrument 101, the voice!
massign 2, 102 ; channel one for instrument 102, the keyboard
massign 10,103 ; channel 10 for "instrument" 103, it's just a metronome click
gkleftpedalone init 0
gkleftpedaltwo init 0
; global control of the chosen scale in channel one via the left pedal!
instr 1
ichannelinstrumentone = 67
icontrollerinstrumentone = 67
gkleftpedalone ctrl7 ichannelinstrumentone, icontrollerinstrumentone, 0, 1 ; controller 67 is the left pedal
endin
; global control of the chosen scale in channel two via the left pedal!
instr 2
ichannelinstrumenttwo = 2
icontrollerinstrumenttwo = 1
gkleftpedaltwo ctrl7 ichannelinstrumenttwo, icontrollerinstrumenttwo, 0, 1 ; controller 67 is the left pedal
endin
In instr. 101 I put the code:
instr 101
ileftpedalone = i(gkleftpedalone)
ituningtable init  10
if (ileftpedalone>0 ) then
ituningtable = 11 ;choose tuningtable number 11, if the left pedal is down
else
ituningtable = 10 ; when the left pedal is not used, use tuningtable numer 10
endif
And the same in instr. 102, but ileftpadaltwo.
Now everything seems to work fine.


2010/4/1 vallste@libero.it <vallste@libero.it>

I do not understand what you want to do but, if you want to change the table for your tuning you can try by creating an always on intrument like this before your midi instruments:

instr 50

imin = 10; number of the first tuning table

imax = 20; number of the last tuning table

kval midictrl inum_of_your_controller

ktab = imin + (imax -imin) * kval / 127

gktable_out = int(ktab)

endin

In your instruments change:

ituningtable =  10
with:

ituningtable = i(gktable_out)

in the score add:

i 50 0 3600

Hope it works

----Messaggio originale----
Da: kontrapunktstefan@googlemail.com
Data: 30/03/2010 22.04
A: "vallste@libero.it"<vallste@libero.it>, <csound@lists.bath.ac.uk>
Ogg: [Csnd] Re: Re: Re: Re: Re: Re: massign, pgmassign


Dear community,
unfortunately I do have a new problem : although the allocation between different instruments and midi-channels works fine,
it does not work, when I want to change the pitch via a global control.
In this example I use the mod-wheel to choose a different scale (as I learned here in the commmunity).
It works fine with instrument 101 in channel one, but not with instr. 102 in channel two!
How can I achieve this?

2010/3/30 vallste@libero.it <vallste@libero.it>

No problem Sir!

Stefano

----Messaggio originale----
Da: kontrapunktstefan@googlemail.com
Data: 30/03/2010 14.37 Ogg: [Csnd] Re: Re: Re: Re: Re: massign, pgmassign


Dear Vallste,
now it works, thank You a lot!

2010/3/30 vallste@libero.it <vallste@libero.it>

Try by removing the following from the score:

 

i1   0    3600
i2   0    3600
i3   0    3600
and put a:

f 0 0 3600

before f1 so instruments should be activated only when required by massign.

----Messaggio originale----
Da: kontrapunktstefan@googlemail.com
Data: 30/03/2010 11.41 Ogg: [Csnd] Re: Re: Re: massign, pgmassign


No, it seems to be the same problem, at least:
it plays back instr. 31 (which is associated to channel 1) when I choose channel 3.

2010/3/30 vallste@libero.it <vallste@libero.it>
Hello,
did you try to change instrument numbers above 16 (default midi channels)?

Lets say:
instr 1 become instr 31
instr 3 become instr 32
and so on...

and:
massign 1, 31
massign 2, 32
and so on...

Don't know if it could help in your case but I remember having a strange
behaviour with lower numbered midi instruments.
Ciao


>----Messaggio originale----
>Da: rorywalsh@ear.ie
>Data: 30/03/2010 10.43
>A: <csound@lists.bath.ac.uk>
>Ogg: [Csnd] Re: massign, pgmassign
>
>I reported a similar problem yesterday on the dev list. Same thing
>really, anything I play on channel one will start instrument two
>playing.
>
>On 30 March 2010 09:39, Stefan Thomas <kontrapunktstefan@googlemail.com>
wrote:
>> Dear community,
>> I have a question concerning massign and pgmassign.
>> I want to use a csound-file to record midi via rosegarden and I want to
use
>> rosegarden also for playback.
>> When I run only csound and Jack I have the following problems:
>> although instr. 1 is played when choosing channel 1 and instr. 2 is played
>> when choosing number 2, I hear also instr. 2 when I choose program 2 on
>> channel one.
>> I also hear instr. 3 (which I only want to use for metronome click) when I
>> choose programm 9 on channel 1.
>> When I also start rosegarden, thinks become even more complicated.
Sometimes
>> I hear sound, when I start the playback in rosegarden, sometimes not.
>> What could be the reason?
>> Here is my (musical senseless) dummy-file:
>> <CsoundSynthesizer>
>> <CsOptions>
>> -odevaudio -Ma -b400 -m0d -+rtaudio=jack -i adc -o dac ; the output is
>> routed to Jack
>> ;-odevaudio -M1 -b400 ; for realtime-midi
>> </CsOptions>
>> <CsInstruments>
>>
>> sr     = 44100
>> kr     = 2205
>> ksmps  = 20
>> nchnls = 2
>>  ipch = 8.02
>>   iequal = 12
>>
>> massign 1, 1 ; midi channel one is for instr. 2
>> massign 2, 2 ; midi channel two for instr. 2
>> massign 10,3 ; midi channel 10 for instr. number 3;
>> pgmassign 2, 1; program two for inst. 1
>> pgmassign 3, 2; program three for instr. 2
>> pgmassign 1, 3 ; program one for instr. 3
>>
>>
>>
>> instr 1
>>
>>
>> ituningtable =  10
>>
>>
>>
>>  imnn    notnum
>>  indx    =  imnn * 2 + 1   ; values in table alternate between
>>                            ; Midi note nums and frequencies
>>  icps    table  indx, ituningtable
>>   iamp    ampmidi        10000
>>
>> ; defining the envelopes
>> iatt = 0.01
>> idec = 1.5
>> islev = 0
>> irel = 0.01
>> kenv madsr iatt, idec, islev, irel
>> icar = 1
>> imod = 1
>> ifmindex = 8
>> a1    foscil   kenv*iamp, icps, icar, imod, kenv*ifmindex, 1
>>
>>       outs       a1, a1
>>       endin
>>
>>  ;;;;;;;;;;;;;;;; the 2nd instrument ;;;;;;;;;;;;;;
>> instr 2
>>
>>
>> ituningtable =  10
>>
>>
>>  imnn    notnum
>>  indx    =  imnn * 2 + 1   ; values in table alternate between
>>                            ; Midi note nums and frequencies
>>  icps    table  indx, ituningtable
>>   iamp    ampmidi        10000
>>
>> ; defining the envelopes
>> iatt = 0.01
>> idec = 1.5
>> islev = 0
>> irel = 0.01
>> kenv madsr iatt, idec, islev, irel
>> icar = 1
>> imod = 1.4
>> ifmindex = 8
>> a2    foscil   kenv*iamp, icps, icar, imod, kenv*ifmindex, 1
>>
>>       outs       a2, a2
>>       endin
>> ;;;;;;;;;; the 3rd instrument
>>
>> instr 3
>> ituningtable = 10
>>  imnn    notnum
>>  indx    =  imnn * 2 + 1   ; values in table alternate between
>>                            ; Midi note nums and frequencies
>>  icps    table  indx, ituningtable
>>   iamp    ampmidi        10000
>>   adrum pluck iamp, icps, icps*0.81, 1, 3, .5
>>       outs       adrum, adrum
>>       endin
>>
>> </CsInstruments>
>> ; defining the "score"
>> <CsScore>
>> f1  0   8193  10   1
>> f 10  0 256 -23 "12tet.cps"    ; normal tempered scale
>>
>> i1   0    3600
>> i2   0    3600
>> i3   0    3600
>>
>>
>> </CsScore>
>> </CsoundSynthesizer>
>>
>>
>>
>
>
>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"
>
>




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"