Csound Csound-dev Csound-tekno Search About

Re: envlpx

Date2005-12-16 20:19
FromBruce McKinney
SubjectRe: envlpx
>From: Dave Phillips 
>Date: Tue Dec 13 04:55:14 CST 2005
>To: csound@lists.bath.ac.uk
>Subject: Re: [Csnd] envlpx

>jpff@codemist.co.uk wrote:
>
>>I would much prefer an "Opcode of the Week" to allow time for
>>discussion and expansion.  
>>==John ffitch
>>  
>>
>Seconded. Examples could be offered, maybe the best stuff could go to a 
>wiki or somewhere on csounds.com ?
>
>Best,
>
>dp
>
>-- 
>Send bugs reports to this list.
>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Date2005-12-20 12:56
FromOeyvind Brandtsegg
Subjectmidi program change
I'm trying to make a custom setup for midi program change.

What I'd like to do is:

midi channel 1 plays on instr 3
midi channel 2 plays on instr 4

if I receive a program change message (regardless of what channel it is received on): 
midi channel 1 plays on instr 13
midi channel 2 plays on instr 14

I'm using pgmassign 0, -1 to disable standard program change behaviour,
and I have an "always on" instr 1 receiving the program change messages correctly.
I figured, the easiest way was to use massign inside a conditional branch in instr 1,
but it does not work (probably only works when it's in the global section).

any ideas on how to do this very welcome
best
Oeyvind

Date2005-12-20 16:32
FromGabriel Maldonado
SubjectRe: midi program change
Have you tried with midiin (in an ever-running instr num) and schedk 
with a set of if...goto?....(just a thougth)

Gab

Oeyvind Brandtsegg wrote:

>I'm trying to make a custom setup for midi program change.
>
>What I'd like to do is:
>
>midi channel 1 plays on instr 3
>midi channel 2 plays on instr 4
>
>if I receive a program change message (regardless of what channel it is received on): 
>midi channel 1 plays on instr 13
>midi channel 2 plays on instr 14
>
>I'm using pgmassign 0, -1 to disable standard program change behaviour,
>and I have an "always on" instr 1 receiving the program change messages correctly.
>I figured, the easiest way was to use massign inside a conditional branch in instr 1,
>but it does not work (probably only works when it's in the global section).
>
>any ideas on how to do this very welcome
>best
>Oeyvind
>  
>

-- 
Gabriel Maldonado
http://csounds.com/maldonado
--

Date2005-12-20 21:10
FromIain Duncan
SubjectRe: midi program change
> Have you tried with midiin (in an ever-running instr num) and schedk 
> with a set of if...goto?....(just a thougth)
> 
> Gab

That's what I do, midiin, followed by event to control the instruments. 
Then I also don't need to code instruments differently for midi, but you 
do have to do some extra work on the midi parsing end.

Iain

Date2005-12-21 12:18
FromOeyvind Brandtsegg
SubjectRe: midi program change
I was wondering, maybe I have to do it like that, yes.
I do have two questions though...

How do you handle release segment envelopes in this setup ?

And, do the extra processing (midi input and instr scheduling) induce extra latency (of one k-rate period) ?

I recall there was some code examples for this, but can't seem to find them now.
best
Oeyvind



> From: Iain Duncan [iainduncan@telus.net]
> Sent: 2005-12-20 22:10:09 CET
> To: csound@lists.bath.ac.uk
> Subject: Re: [Csnd] midi program change
> 
> 
> > Have you tried with midiin (in an ever-running instr num) and schedk 
> > with a set of if...goto?....(just a thougth)
> > 
> > Gab
> 
> That's what I do, midiin, followed by event to control the instruments. 
> Then I also don't need to code instruments differently for midi, but you 
> do have to do some extra work on the midi parsing end.
> 
> Iain
> -- 
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
> 

Date2005-12-21 12:31
FromIstvan Varga
SubjectRe: midi program change
AttachmentsNone  

Date2005-12-21 19:37
Fromsal g sofia
Subject[OT] Holidays.
Dear all,

Sending best wishes for Peace, Joy, love and laughter to you and your 
family! And a special good whish to all the Developers of Csound.

Best regards,

-Sal

Date2005-12-22 12:41
FromOeyvind Brandtsegg
SubjectRe: midi program change
Attachmentspgm_change2.csd  
I was not aware that massign actually do work inside an instr.

For my purposes, I made this csd for reassigning midichannels to instr numbers.
I know that in this simple example, a standard program change via midi wuold have been easier. But the attached setup gives flexibility for more complex mappings when needed (making a program change map that is different for each midi channel for example).

I've attached it in case anyone find it useful.

Oeyvind