Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] tests and examples for Cs5

Date2005-02-22 21:37
From"Art Hunkins"
SubjectRe: [Cs-dev] tests and examples for Cs5
Re: command lines and typing

I attempt to include working command sequences for all Csound versions
capable of realtime performance of my .csd's *in CsOptions*. Then I direct
the performer to select his/her appropriate command-line set. After all, do
you expect performers to run around looking for the correct set of flags to
use for the version of Csound he has?

Regarding typing command lines, I have to admit to a fair amount of typing
in WindowsME with Csound5. Unfortunately, in ME, the performance message
window closes whenever an error occurs, unless I run from the command-line
in a DOS box (where the box remains open after a failure). Thank goodness
this has changed with XP. And frankly, I've had a *lot* of error messages to
catch in Csound5.

Art Hunkins

----- Original Message -----
From: "Richard Boulanger" 
To: 
Sent: Tuesday, February 22, 2005 11:09 AM
Subject: Re: [Cs-dev] tests and examples for Cs5


> Steven and Dave,
>
> Behind the scenes, I think that most versions of Csound formulate a
> command-line.   But, I think that apart from the Linux Users of Csound, I
> think that most beginners/intermediates/composers/students and most of the
> general users of Csound - i.e. MacCsounders, CsoundAvers, SuperMills
> Csounders, WInSounders, Cecilia users, and Blue users rarely type the
> command line themselves to the program.
>
> There are a lot of Linux users of the program for sure, and I think that
> almost all are command-line users, but if you are not using Csound under
> Linux, then I think you have not been using the command-line.
>
> Every now and then, I modify a command line - especially when using an
> analysis utility.
>
> I am not sure that I should be admitting this, but I have not typed a
> command-line to Csound (except to experiment with some of the Csound5
stuff
> and the Utils) since about 1990/91.
>
> This means that many of us will not only need the test orchestras, but a
> nice set of command-lines to use with them.
>
> OR Better - When Csound5 is released, it would be great to have a nice
> cross-platform front-end that included a menu of default command lines and
> help the user set up the directories and preferences from a GUI.
>
> This may all already be there in the form of CsoundVST5.  As I am just
> beginning my testing, I am probably way off base here.
>
> I look forward to David's collection, instructions, and advice and am
happy
> that we will be hosting this at cSounds.com!
>
> -Dr. B.
>
> on 2/22/05 10:47 AM, steven yi at stevenyi@csounds.com wrote:
>
> > Hi Dave,
> >
> > By "text mode", what is it you are asking?  Are you saying "run on the
> > commandline on files"?  If so, blue uses csound this way.
> >
> > steven
> >
> > Dave Phillips wrote:
> >
> >> Btw, am I correct to assume that the majority of Csound users have
> >> abandoned the use of text mode ? It certainly looks that way from
> >> here. I consider this assumption to be a critical point, one that
> >> perhaps should be discussed a little more thoroughly by the developers.
> >
> >
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> _______________________________________________________________________
>  +  Dr. Richard Boulanger, Professor
>  +  Music Synthesis Department, Berklee College of Music
>  +  1140 Boylston Street  - Boston, MA  02215-3693
>  +  Office Phone: (617) 747-2485   Office Fax: (617) 747-2564
>  +  eMail: rboulanger@csounds.com  or  rboulanger@berklee.edu
>  +  WebPage: http://csounds.com/boulanger/
> ________________________________________________________________________
>  +  Almost Everything Csound @ http://csounds.com/
>  +  The Csound Catalog with Audio @ http://csounds.com/catalog/
>  +  The Csound Book @ http://csounds.com/book/
>  +  The Csound Magazine @ http://csounds.com/ezine/
>  +  CsoundForums @ http://csounds.com/phpBB2/
> ________________________________________________________________________
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-22 22:01
FromIstvan Varga
SubjectRe: [Cs-dev] tests and examples for Cs5
Art Hunkins wrote:


> I attempt to include working command sequences for all Csound versions
> capable of realtime performance of my .csd's *in CsOptions*.

I do not think it is a good idea to include command line options in CSD
files that are going to be distributed. Even if there are no incompatibilities,
it is not necessarily sure that everyone prefers to use the same settings
(message level, buffer sizes, device identifiers etc.) as those included in
the CSD. And the fact that a particular flag is supported by a version of
Csound does not always mean that it will actually work (for example,
a buffer size may be too small, a device may not exist, etc.).


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-22 22:06
FromIain Duncan
SubjectRe: [Cs-dev] tests and examples for Cs5
Well, you can always include a few versions with comments and let the 
user un-comment the right one. I think that can be helpful to new users 
who might not know all the flags.

Iain

Istvan Varga wrote:
> Art Hunkins wrote:
> 
> 
>> I attempt to include working command sequences for all Csound versions
>> capable of realtime performance of my .csd's *in CsOptions*.
> 
> 
> I do not think it is a good idea to include command line options in CSD
> files that are going to be distributed. Even if there are no 
> incompatibilities,
> it is not necessarily sure that everyone prefers to use the same settings
> (message level, buffer sizes, device identifiers etc.) as those included in
> the CSD. And the fact that a particular flag is supported by a version of
> Csound does not always mean that it will actually work (for example,
> a buffer size may be too small, a device may not exist, etc.).
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-22 23:10
FromIstvan Varga
SubjectRe: [Cs-dev] tests and examples for Cs5
Iain Duncan wrote:

> Well, you can always include a few versions with comments and let the 
> user un-comment the right one. I think that can be helpful to new users 
> who might not know all the flags.

As long as all the flags are commented out by default, it should
be fine. It is then more like a documentation on how to use the
CSD, with examples.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-22 23:43
FromDave Phillips
SubjectRe: [Cs-dev] tests and examples for Cs5
Greetings:

  Incidentally, I've discovered that Csound is still incorrect with 
regards to MIDI output channels. The massign opcode doesn't work, and 
the default output of instr 1 is going to MIDI channel 2.

  pgmassign also doesn't work.

Best,

dp




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-23 11:56
FromIstvan Varga
SubjectRe: [Cs-dev] tests and examples for Cs5
Attachmentsmiditest.csd  
Dave Phillips wrote:

>  Incidentally, I've discovered that Csound is still incorrect with 
> regards to MIDI output channels. The massign opcode doesn't work, and 
> the default output of instr 1 is going to MIDI channel 2.
> 
>  pgmassign also doesn't work.

Some more details on this would be welcome, as I could not
reproduce the problems. I have tested massign, pgmassign,
and the midiout opcode with the attached CSD file and my
MIDI keyboard utility:
   http://csounds.com/istvan/html/keyboard.html
I tested all channels and various program changes, and
both massign and pgmassign were OK.

Here is the data sent to the MIDI out port (single MIDI
events are enclosed with () and full note events with []):

[(90 3C 7F) (80 3C 40)] [(91 3E 7F) (81 3E 40)]
[(92 40 7F) (82 40 40)] [(93 42 7F) (83 42 40)]
[(94 44 7F) (84 44 40)] [(95 46 7F) (85 46 40)]
[(96 48 7F) (86 48 40)] [(97 4A 7F) (87 4A 40)]
[(98 4C 7F) (88 4C 40)] [(99 4E 7F) (89 4E 40)]
[(9A 50 7F) (8A 50 40)] [(9B 52 7F) (8B 52 40)]
[(9C 54 7F) (8C 54 40)] [(9D 56 7F) (8D 56 40)]
[(9E 58 7F) (8E 58 40)] [(9F 5A 7F) (8F 5A 40)]

This looks perfect to me, although 2-byte messages were
not tested yet.

So, you may have outdated or inconsistent CVS sources,
or the problems are more difficult to reproduce.
Could you post the orc/sco/csd that did not work, and
more details about how the errors occured ?

Date2005-02-23 13:48
FromDave Phillips
SubjectRe: [Cs-dev] tests and examples for Cs5
Hi Istvan:

  I just tried your miditest.csd. It works, but no program changes are 
being transmitted by pgmassign. I've tested it with -Q0 (MIDI output to 
my TX802 hardware synth) and -Q10 (output to a softsynth). Both indicate 
what appears to be correct MIDI reception, so it does look like massign 
is working for you, but no program changes occur. More tests to follow.

Best,

dp



Istvan Varga wrote:

> Dave Phillips wrote:
>
>>  Incidentally, I've discovered that Csound is still incorrect with 
>> regards to MIDI output channels. The massign opcode doesn't work, and 
>> the default output of instr 1 is going to MIDI channel 2.
>>
>>  pgmassign also doesn't work.
>
>
> Some more details on this would be welcome, as I could not
> reproduce the problems. I have tested massign, pgmassign,
> and the midiout opcode with the attached CSD file and my
> MIDI keyboard utility:
>   http://csounds.com/istvan/html/keyboard.html
> I tested all channels and various program changes, and
> both massign and pgmassign were OK.
>
> Here is the data sent to the MIDI out port (single MIDI
> events are enclosed with () and full note events with []):
>
> [(90 3C 7F) (80 3C 40)] [(91 3E 7F) (81 3E 40)]
> [(92 40 7F) (82 40 40)] [(93 42 7F) (83 42 40)]
> [(94 44 7F) (84 44 40)] [(95 46 7F) (85 46 40)]
> [(96 48 7F) (86 48 40)] [(97 4A 7F) (87 4A 40)]
> [(98 4C 7F) (88 4C 40)] [(99 4E 7F) (89 4E 40)]
> [(9A 50 7F) (8A 50 40)] [(9B 52 7F) (8B 52 40)]
> [(9C 54 7F) (8C 54 40)] [(9D 56 7F) (8D 56 40)]
> [(9E 58 7F) (8E 58 40)] [(9F 5A 7F) (8F 5A 40)]
>
> This looks perfect to me, although 2-byte messages were
> not tested yet.
>
> So, you may have outdated or inconsistent CVS sources,
> or the problems are more difficult to reproduce.
> Could you post the orc/sco/csd that did not work, and
> more details about how the errors occured ?
>
>------------------------------------------------------------------------
>
>
>
>
>
>sr	=  48000
>ksmps	=  32
>nchnls	=  1
>
>	massign 1, 7
>	massign 2, 4
>	massign 3, 11
>	massign 4, 8
>	massign 5, 9
>	massign 6, 18
>	massign 7, 3
>	massign 8, 12
>	massign 9, 1
>	massign 10, 15
>	massign 11, 6
>	massign 12, 2
>	massign 13, 14
>	massign 14, 14
>	massign 15, 14
>	massign 16, 14
>
>	pgmassign 0, 10
>	pgmassign 1, 5
>	pgmassign 2, 13
>	pgmassign 3, 16
>	pgmassign 4, 19
>	pgmassign 5, 17
>
>	instr 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
>	print p1
>	endin
>
>	instr 200
>kfoo	init 0
>kbar	init 1
>	if (kbar > 16) kgoto skip2
>	if (kfoo != 0) kgoto skip1
>	midiout 144, kbar, 58 + (kbar * 2), 127
>skip1:
>	if (kfoo != 1499) kgoto skip2
>	midiout 128, kbar, 58 + (kbar * 2), 64
>kbar	=  kbar + 1
>kfoo	=  -1
>skip2:
>kfoo	=  kfoo + 1
>	endin
>
>
>f 0 3600
>i 200 1 17
>e
>
>
>
>  
>




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-23 14:00
FromDave Phillips
SubjectRe: [Cs-dev] tests and examples for Cs5
Greetings:

  A little more news. I discovered that I had been setting kchn=0 in my 
use of the moscil opcode. Regardless of massign's values moscil was 
routing the output to MIDI channel 2. If I set kchn to 1 then 
everything's happy (and I don't really need massign at all in that 
example). So that one's my bad, but I still can't get pgmassign working 
at all.

Best,

dp




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-23 14:04
FromIstvan Varga
SubjectRe: [Cs-dev] tests and examples for Cs5
Dave Phillips wrote:

>  Re: pgmassign: I think I'm confused about how it works. I'm assuming it 
> sends a program change, but is that a correct assumption ? I've read the 
> manual entry, but now I'm not sure it's what I'm looking for. I need an 
> opcode that sends a simple MIDI program change value.

Both massign and pgmassign affect how MIDI input is being processed,
that is, these opcodes route incoming note events to the selected
instruments. They have nothing to do with MIDI output.

 >  What should I use if not pgmassign ?

The midiout opcode can send any simple message to the MIDI output,
including a program change.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-23 14:10
FromDave Phillips
SubjectRe: [Cs-dev] tests and examples for Cs5
Greetings:

  Re: pgmassign: I think I'm confused about how it works. I'm assuming 
it sends a program change, but is that a correct assumption ? I've read 
the manual entry, but now I'm not sure it's what I'm looking for. I need 
an opcode that sends a simple MIDI program change value. What should I 
use if not pgmassign ?

Best,

dp




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-23 14:59
FromDave Phillips
SubjectRe: [Cs-dev] tests and examples for Cs5
Attachmentsmidi-out-test.csd  
Istvan Varga wrote:

> The midiout opcode can send any simple message to the MIDI output, 
> including a program change.

With the attached file I receive a stream of this error message:

SECTION 1:
 *** PortMIDI: invalid MIDI out data
 *** PortMIDI: invalid MIDI out data
 *** PortMIDI: invalid MIDI out data
 *** PortMIDI: invalid MIDI out data
 *** PortMIDI: invalid MIDI out data
 *** PortMIDI: invalid MIDI out data
 *** PortMIDI: invalid MIDI out data
[snip]

These messages delay the entry of the actual sound (i.e. it comes in 
late, ignoring the first few notes).

    csound --expression-opt -odac0 -d -m0 -Q10

where -Q10 is connected to the HyperCanvas VSTi plugin. The messages go 
away if I remove the midiout opcode.

Best,

dp


Date2005-02-23 16:08
FromIstvan Varga
SubjectRe: [Cs-dev] tests and examples for Cs5
Dave Phillips wrote:

> With the attached file I receive a stream of this error message:
> 
> SECTION 1:
> *** PortMIDI: invalid MIDI out data
> *** PortMIDI: invalid MIDI out data
> *** PortMIDI: invalid MIDI out data
> *** PortMIDI: invalid MIDI out data
> *** PortMIDI: invalid MIDI out data
> *** PortMIDI: invalid MIDI out data
> *** PortMIDI: invalid MIDI out data
> [snip]

In OOps/midiout.c, at line 492 replace the function midiout() with this:

int midiout(ENVIRON *csound, MIDIOUT *p)        /*gab-A6 fixed*/
{
     int st, ch, d1, d2;

     if (!MGLOB(MIDIoutDONE)) openMIDIout();
     st = (int) (*p->in_type + 0.5);
     if (!st)
       return OK;
     st = (st & 0x70) | 0x80;
     ch = (int) (*p->in_chan - 0.5) & 0x0F;
     d1 = (int) (*p->in_dat1 + 0.5) & 0x7F;
     switch (st) {
       case 0xC0: program_change(ch, d1); break;
       case 0xD0: after_touch(ch, d1); break;
       case 0xF0: break;
       default:
         d2 = (int) (*p->in_dat2 + 0.5) & 0x7F;
         send_midi_message(st | ch, d1, d2);
     }
     return OK;
}


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-23 18:02
FromDave Phillips
SubjectRe: [Cs-dev] tests and examples for Cs5
Hi Istvan:

  That fixed it, thank you. The midiout opcode works fine for program 
change.

Best,

dp



Istvan Varga wrote:

> Dave Phillips wrote:
>
>> With the attached file I receive a stream of this error message:
>>
>> SECTION 1:
>> *** PortMIDI: invalid MIDI out data
>> *** PortMIDI: invalid MIDI out data
>> *** PortMIDI: invalid MIDI out data
>> *** PortMIDI: invalid MIDI out data
>> *** PortMIDI: invalid MIDI out data
>> *** PortMIDI: invalid MIDI out data
>> *** PortMIDI: invalid MIDI out data
>> [snip]
>
>
> In OOps/midiout.c, at line 492 replace the function midiout() with this:
>
> int midiout(ENVIRON *csound, MIDIOUT *p)        /*gab-A6 fixed*/
> {
>     int st, ch, d1, d2;
>
>     if (!MGLOB(MIDIoutDONE)) openMIDIout();
>     st = (int) (*p->in_type + 0.5);
>     if (!st)
>       return OK;
>     st = (st & 0x70) | 0x80;
>     ch = (int) (*p->in_chan - 0.5) & 0x0F;
>     d1 = (int) (*p->in_dat1 + 0.5) & 0x7F;
>     switch (st) {
>       case 0xC0: program_change(ch, d1); break;
>       case 0xD0: after_touch(ch, d1); break;
>       case 0xF0: break;
>       default:
>         d2 = (int) (*p->in_dat2 + 0.5) & 0x7F;
>         send_midi_message(st | ch, d1, d2);
>     }
>     return OK;
> }
>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net