Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: MIDI/Score Question

Date2008-03-23 15:54
Fromvictor
Subject[Csnd] Re: Re: MIDI/Score Question
I could use the midi compatibility flags without any problems on
the XO. I got the funny warnings but it worked. For example,
with the simple test.orc:

git ftgen 0,16384,10,1
instr 1
a1 oscil 10000, p4,git
     out a1
endin

I could happily play at the MIDI keyboard with:
csound -odac -Mhw:1,0 -+rtmidi=alsa --midi-key-cps=4  test.orc

just as expected. So it all works fine on the XO as well as elsewhere.
I got the warning,  but just disregarded.

Victor

----- Original Message ----- 
From: "Dr. Richard Boulanger" 
To: 
Sent: Sunday, March 23, 2008 2:27 PM
Subject: [Csnd] Re: MIDI/Score Question


> Great detective work Steven.  Please remove this warning.
> There are NO good/clear interop examples in the manual and in the 
> examples folder.
> We need them!
> I spent the past week working with these on the OLPC XO and found the 
> warnings confusing
> and the system did not really work.
> I was NOT able to create a .csd that worked with both MIDI and a 
> notelist.
> I could NOT set up a .csd that would work both with notelist and midi 
> input.
> I could NOT set more than one mididefault in one .csd
> I am using the Mac.   I think less of Michael's code runs on that 
> platform than Windows which he uses.
>
> -dB
>
> On Mar 20, 2008, at 6:15 PM, Steven Yi wrote:
>
>> I have tried this and reproduced Miguel's results.  This is on
>> Windows.  The warning is not issued from the opcode but rather the
>> event loop that inserts notes in Engine/insert.c:
>>
>>     if (tp->pmax > 3 && tp->psetdata == NULL) {
>>       csoundWarning(csound, Str("instr %d p%d illegal for MIDI"),
>>                             insno, tp->pmax);
>>     }
>>
>> This is saying, if a new event is added for an instrument that has
>> more than 3 p-fields, issue the error saying the max pfield the
>> instrument has is illegal.
>>
>> I assume this is an old warning from the original midi implementation,
>> where instruments would get all values from the midi opcodes and not
>> from pfields.  This is no longer valid with interop opcodes.  If my
>> understanding of this code is correct, I think this warning should
>> simply be discarded.
>>
>> Any thoughts from anyone else?
>>
>> steven
>>
>>
>>
>>
>> On Thu, Mar 20, 2008 at 12:23 PM, Miguel Morales
>>  wrote:
>>> For the time I have simply turned off warnings.  It doesn't seem  to 
>>> affect
>>> anything as far as score and midi is concerned.
>>>
>>> Thanks,
>>> Miguel
>>>
>>>
>>>
>>> On Thu, Mar 20, 2008 at 10:45 AM, Miguel Morales 
>>> 
>>> wrote:
>>>
>>>> I will try to compile the most recent checkout and report back if  I 
>>>> get
>>> the same warning.
>>>>
>>>> Thanks,
>>>> Miguel
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Mar 19, 2008 at 8:22 PM, mark jamerson  
>>> wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>   Just to let you know,  I ran your csd from the command line, and
>>> through winxound 3.0.60, on a vista install of csound v5.07 and  did not
>>> receive any warning or error, and sound was produced.  I figure  that 
>>> maybe
>>> this will help the debugging process.
>>>>>
>>>>>                                                       Mark
>>>>>
>>>>>
>>>>>
>>>>> ----- Original Message ----
>>>>> From: Miguel Morales 
>>>>> To: csound@lists.bath.ac.uk
>>>>>
>>>>>
>>>>>
>>>>> Sent: Wednesday, March 19, 2008 5:09:17 PM
>>>>> Subject: [Csnd] Re: Re: Re: Re: MIDI/Score Question
>>>>>
>>>>> Sure, I have attached both the .csd and .blue files.
>>>>>
>>>>> Thanks,
>>>>> Miguel
>>>>>
>>>>>
>>>>> On Wed, Mar 19, 2008 at 2:18 PM, Steven Yi  
>>>>> wrote:
>>>>>
>>>>>> Hi Miguel,
>>>>>>
>>>>>> Could you post a CSD or .blue project to check out?
>>>>>>
>>>>>> Thanks,
>>>>>> steven
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Mar 19, 2008 at 2:09 PM, Miguel Morales
>>>  wrote:
>>>>>>> I modified it to us a k-var (and tried with an i-var) but I still
>>> get the
>>>>>>> same warning.
>>>>>>>
>>>>>>> kfreq init 0
>>>>>>> kvelocity init 0
>>>>>>>
>>>>>>> midinoteoncps kfreq,  kvelocity
>>>>>>>
>>>>>>> mididefault 0dbfs, p4
>>>>>>>  mididefault 1, p5
>>>>>>> mididefault 1, p6
>>>>>>> mididefault kfreq, p7
>>>>>>>
>>>>>>> kenv linenr p4, p5, p6, .01
>>>>>>> asig oscil kenv, kfreq, gitab
>>>>>>>  outs asig,asig
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Mar 19, 2008 at 1:15 PM, victor  
>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I don't think you can assign to p7. You probably want
>>>>>>>> an i-variable (say  ifreq cpsmidi )
>>>>>>>>
>>>>>>>> Victor
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ----- Original Message -----
>>>>>>>> From: Miguel Morales
>>>>>>>> To: csound@lists.bath.ac.uk
>>>>>>>> Sent: Wednesday, March 19, 2008 7:41 PM
>>>>>>>> Subject: [Csnd] MIDI/Score Question
>>>>>>>>
>>>>>>>> Hi all,
>>>>>>>> I'm currently trying to learn how to use blue and I'm  starting to
>>> port
>>>>>>> some of my instruments to be MIDI/Score inter operable.
>>>>>>>> I have a question though, when I run the following instrument.
>>>>>>>> I get a warning when using the real time virtual keyboard  saying:
>>>>>>>> "WARNING: instr 1 p7 illegal for MIDI"
>>>>>>>> Can some one tell me how to get rid of this warning, and how I
>>> should
>>>>>>> properly set up  this instrument.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Miguel Morales
>>>>>>>>
>>>>>>>> gitab ftgen 1,0,1024,10,1
>>>>>>>> instr 1
>>>>>>>>
>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
>>>>>>>> ;all instruments MUST be score/midi interoperable!
>>>>>>>> ;1xOsc Argument Description
>>>>>>>> ;p1 = instrument id
>>>>>>>> ;   ;p2 = start time
>>>>>>>> ;        ;p3 = end time
>>>>>>>> ;           ;p4 = amperage (0dbfs?)
>>>>>>>> ;               ;p5 = Rise Time (secs)
>>>>>>>> ;                   ;p6 = Decay Time (secs)
>>>>>>>> ;                       ;p7 = Oscil Frequency
>>>>>>>>
>>>>>>>> ;define some defaults in case it is midi activated
>>>>>>>> kcps init 0
>>>>>>>> kvelocity init 0
>>>>>>>>
>>>>>>>> mididefault 0dbfs, p4
>>>>>>>> mididefault 1, p5
>>>>>>>> mididefault 1, p6
>>>>>>>> p7 cpsmidi
>>>>>>>>
>>>>>>>> kenv linen p4,p5,p6,p7
>>>>>>>> asig oscil kenv, p7, gitab
>>>>>>>> outs asig,asig
>>>>>>>> endin
>>>>>>>>
>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to this list.
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ________________________________
>>> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try 
>>> it
>>> now.
>>>>
>>>>
>>>
>>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  "unsubscribe 
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 


Date2008-03-23 16:01
From"Dr. Richard Boulanger"
Subject[Csnd] Re: Re: Re: MIDI/Score Question
thanks.

maybe we need some examples in the manual?

ok....  i'll try again later today.


On Mar 23, 2008, at 11:54 AM, victor wrote:

> I could use the midi compatibility flags without any problems on
> the XO. I got the funny warnings but it worked. For example,
> with the simple test.orc:
>
> git ftgen 0,16384,10,1
> instr 1
> a1 oscil 10000, p4,git
>     out a1
> endin
>
> I could happily play at the MIDI keyboard with:
> csound -odac -Mhw:1,0 -+rtmidi=alsa --midi-key-cps=4  test.orc
>
> just as expected. So it all works fine on the XO as well as elsewhere.
> I got the warning,  but just disregarded.
>
> Victor
>
> ----- Original Message ----- From: "Dr. Richard Boulanger"  
> 
> To: 
> Sent: Sunday, March 23, 2008 2:27 PM
> Subject: [Csnd] Re: MIDI/Score Question
>
>
>> Great detective work Steven.  Please remove this warning.
>> There are NO good/clear interop examples in the manual and in the  
>> examples folder.
>> We need them!
>> I spent the past week working with these on the OLPC XO and found  
>> the warnings confusing
>> and the system did not really work.
>> I was NOT able to create a .csd that worked with both MIDI and a  
>> notelist.
>> I could NOT set up a .csd that would work both with notelist and  
>> midi input.
>> I could NOT set more than one mididefault in one .csd
>> I am using the Mac.   I think less of Michael's code runs on that  
>> platform than Windows which he uses.
>>
>> -dB
>>
>> On Mar 20, 2008, at 6:15 PM, Steven Yi wrote:
>>
>>> I have tried this and reproduced Miguel's results.  This is on
>>> Windows.  The warning is not issued from the opcode but rather the
>>> event loop that inserts notes in Engine/insert.c:
>>>
>>>     if (tp->pmax > 3 && tp->psetdata == NULL) {
>>>       csoundWarning(csound, Str("instr %d p%d illegal for MIDI"),
>>>                             insno, tp->pmax);
>>>     }
>>>
>>> This is saying, if a new event is added for an instrument that has
>>> more than 3 p-fields, issue the error saying the max pfield the
>>> instrument has is illegal.
>>>
>>> I assume this is an old warning from the original midi  
>>> implementation,
>>> where instruments would get all values from the midi opcodes and not
>>> from pfields.  This is no longer valid with interop opcodes.  If my
>>> understanding of this code is correct, I think this warning should
>>> simply be discarded.
>>>
>>> Any thoughts from anyone else?
>>>
>>> steven
>>>
>>>
>>>
>>>
>>> On Thu, Mar 20, 2008 at 12:23 PM, Miguel Morales
>>>  wrote:
>>>> For the time I have simply turned off warnings.  It doesn't  
>>>> seem  to affect
>>>> anything as far as score and midi is concerned.
>>>>
>>>> Thanks,
>>>> Miguel
>>>>
>>>>
>>>>
>>>> On Thu, Mar 20, 2008 at 10:45 AM, Miguel Morales  
>>>> 
>>>> wrote:
>>>>
>>>>> I will try to compile the most recent checkout and report back  
>>>>> if  I get
>>>> the same warning.
>>>>>
>>>>> Thanks,
>>>>> Miguel
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Mar 19, 2008 at 8:22 PM, mark jamerson   
>>>>> 
>>>> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>   Just to let you know,  I ran your csd from the command line,  
>>>>>> and
>>>> through winxound 3.0.60, on a vista install of csound v5.07 and   
>>>> did not
>>>> receive any warning or error, and sound was produced.  I figure   
>>>> that maybe
>>>> this will help the debugging process.
>>>>>>
>>>>>>                                                       Mark
>>>>>>
>>>>>>
>>>>>>
>>>>>> ----- Original Message ----
>>>>>> From: Miguel Morales 
>>>>>> To: csound@lists.bath.ac.uk
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sent: Wednesday, March 19, 2008 5:09:17 PM
>>>>>> Subject: [Csnd] Re: Re: Re: Re: MIDI/Score Question
>>>>>>
>>>>>> Sure, I have attached both the .csd and .blue files.
>>>>>>
>>>>>> Thanks,
>>>>>> Miguel
>>>>>>
>>>>>>
>>>>>> On Wed, Mar 19, 2008 at 2:18 PM, Steven Yi  
>>>>>>  wrote:
>>>>>>
>>>>>>> Hi Miguel,
>>>>>>>
>>>>>>> Could you post a CSD or .blue project to check out?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> steven
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Mar 19, 2008 at 2:09 PM, Miguel Morales
>>>>  wrote:
>>>>>>>> I modified it to us a k-var (and tried with an i-var) but I  
>>>>>>>> still
>>>> get the
>>>>>>>> same warning.
>>>>>>>>
>>>>>>>> kfreq init 0
>>>>>>>> kvelocity init 0
>>>>>>>>
>>>>>>>> midinoteoncps kfreq,  kvelocity
>>>>>>>>
>>>>>>>> mididefault 0dbfs, p4
>>>>>>>>  mididefault 1, p5
>>>>>>>> mididefault 1, p6
>>>>>>>> mididefault kfreq, p7
>>>>>>>>
>>>>>>>> kenv linenr p4, p5, p6, .01
>>>>>>>> asig oscil kenv, kfreq, gitab
>>>>>>>>  outs asig,asig
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Mar 19, 2008 at 1:15 PM, victor   
>>>>>>>> 
>>>> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I don't think you can assign to p7. You probably want
>>>>>>>>> an i-variable (say  ifreq cpsmidi )
>>>>>>>>>
>>>>>>>>> Victor
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ----- Original Message -----
>>>>>>>>> From: Miguel Morales
>>>>>>>>> To: csound@lists.bath.ac.uk
>>>>>>>>> Sent: Wednesday, March 19, 2008 7:41 PM
>>>>>>>>> Subject: [Csnd] MIDI/Score Question
>>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>> I'm currently trying to learn how to use blue and I'm   
>>>>>>>>> starting to
>>>> port
>>>>>>>> some of my instruments to be MIDI/Score inter operable.
>>>>>>>>> I have a question though, when I run the following instrument.
>>>>>>>>> I get a warning when using the real time virtual keyboard   
>>>>>>>>> saying:
>>>>>>>>> "WARNING: instr 1 p7 illegal for MIDI"
>>>>>>>>> Can some one tell me how to get rid of this warning, and how I
>>>> should
>>>>>>>> properly set up  this instrument.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Miguel Morales
>>>>>>>>>
>>>>>>>>> gitab ftgen 1,0,1024,10,1
>>>>>>>>> instr 1
>>>>>>>>>
>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
>>>> ;; ;;
>>>>>>>>> ;all instruments MUST be score/midi interoperable!
>>>>>>>>> ;1xOsc Argument Description
>>>>>>>>> ;p1 = instrument id
>>>>>>>>> ;   ;p2 = start time
>>>>>>>>> ;        ;p3 = end time
>>>>>>>>> ;           ;p4 = amperage (0dbfs?)
>>>>>>>>> ;               ;p5 = Rise Time (secs)
>>>>>>>>> ;                   ;p6 = Decay Time (secs)
>>>>>>>>> ;                       ;p7 = Oscil Frequency
>>>>>>>>>
>>>>>>>>> ;define some defaults in case it is midi activated
>>>>>>>>> kcps init 0
>>>>>>>>> kvelocity init 0
>>>>>>>>>
>>>>>>>>> mididefault 0dbfs, p4
>>>>>>>>> mididefault 1, p5
>>>>>>>>> mididefault 1, p6
>>>>>>>>> p7 cpsmidi
>>>>>>>>>
>>>>>>>>> kenv linen p4,p5,p6,p7
>>>>>>>>> asig oscil kenv, p7, gitab
>>>>>>>>> outs asig,asig
>>>>>>>>> endin
>>>>>>>>>
>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
>>>> ;; ;;
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to this list.
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ________________________________
>>>> Be a better friend, newshound, and know-it-all with Yahoo!  
>>>> Mobile.  Try it
>>>> now.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body   
>>> "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"