Csound Csound-dev Csound-tekno Search About

[Csnd] Need some pointers to work with CSound and MIDI

Date2022-07-30 17:59
FromSusanne Pedersen
Subject[Csnd] Need some pointers to work with CSound and MIDI

Hi all,

I’m quite inexperienced with working with MIDI in general, but I’d like to give it a try with cSound. I’ve read about working with MIDI in Csound both in the reference manual and the floss manual, but I still feel, I need a little help to get me started. In particular, I’d like to know two things that I couldn’t quite figure out from what I’ve read.

First, I’d like to know how I can make Csound produce MIDI notes, rather than using a keyboard or a MIDI file as input. I’d like to try to make a Csound program that generates music with some element of randomness, so that’s why I can’t use a keyboard or a file as inputs.

Second, I’d like to know how I can use my computer’s MIDI instruments/programs in my Csound instruments. The examples, I’ve looked at, use sounds that are generated inside the Csound instruments themselves, but I’d like to use the ones that come with my computer, rather than having to try to construct the same or similar instrument sounds myself. Sorry if this question sounds vague, but I’m not sure how to describe it clearer.

 

Thanks in advance for any help,

Susanne

 


Date2022-07-30 18:14
FromJacques Leplat
SubjectRe: [Csnd] Need some pointers to work with CSound and MIDI
One possible solution is to use soundfonts. I’ve used the fluidsynth opcode along with the soundfont file that comes with Csound. The soundfonts in the file has General MIDI sounds : when playing a MIDI file, devices such as computers and mobile phones use General MIDI to perform the file, so it’s possible that is what you mean by looking to use your computer’s sounds. I wrote code to generate a Csound script, then calls Csound API’s to perform the script, all in Java. There are other languages you can use to do the same thing (Python, C…).

I hope this helps.

Best regards,

Jacques

On 30 Jul 2022, at 17:59, Susanne Pedersen <sp@susanne-pedersen.dk> wrote:



Hi all,

I’m quite inexperienced with working with MIDI in general, but I’d like to give it a try with cSound. I’ve read about working with MIDI in Csound both in the reference manual and the floss manual, but I still feel, I need a little help to get me started. In particular, I’d like to know two things that I couldn’t quite figure out from what I’ve read.

First, I’d like to know how I can make Csound produce MIDI notes, rather than using a keyboard or a MIDI file as input. I’d like to try to make a Csound program that generates music with some element of randomness, so that’s why I can’t use a keyboard or a file as inputs.

Second, I’d like to know how I can use my computer’s MIDI instruments/programs in my Csound instruments. The examples, I’ve looked at, use sounds that are generated inside the Csound instruments themselves, but I’d like to use the ones that come with my computer, rather than having to try to construct the same or similar instrument sounds myself. Sorry if this question sounds vague, but I’m not sure how to describe it clearer.

 

Thanks in advance for any help,

Susanne

 

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2022-07-30 18:31
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Need some pointers to work with CSound and MIDI
Not sure if I understood you correctly, but you wanted to use Csound to generate MIDI notes etc and play them using another software synthesizer in your computer.

If that's the case, you should look for the MIDI output opcodes in the Csound manual. You will need to use some form of interapplication midi  connection  (like the MIDI IAC driver on a Mac), then select it using the appropriate MIDI output option (see flags in the manual).

However you'll probably find that for MIDI output generation there are more specialised applications that may be better for this particular case (where there is no audio processing involved). There's Open Music, Pure Data, Common Music (and its descendants) that are perhaps more suited to the task.

Using Csound solely for MIDI output is probably like using a cannon to kill a fly.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 30 Jul 2022, at 17:59, Susanne Pedersen <sp@susanne-pedersen.dk> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi all,

I’m quite inexperienced with working with MIDI in general, but I’d like to give it a try with cSound. I’ve read about working with MIDI in Csound both in the reference manual and the floss manual, but I still feel, I need a little help to get me started. In particular, I’d like to know two things that I couldn’t quite figure out from what I’ve read.

First, I’d like to know how I can make Csound produce MIDI notes, rather than using a keyboard or a MIDI file as input. I’d like to try to make a Csound program that generates music with some element of randomness, so that’s why I can’t use a keyboard or a file as inputs.

Second, I’d like to know how I can use my computer’s MIDI instruments/programs in my Csound instruments. The examples, I’ve looked at, use sounds that are generated inside the Csound instruments themselves, but I’d like to use the ones that come with my computer, rather than having to try to construct the same or similar instrument sounds myself. Sorry if this question sounds vague, but I’m not sure how to describe it clearer.

 

Thanks in advance for any help,

Susanne

 

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2022-07-31 00:01
FromForrest Curo
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Need some pointers to work with CSound and MIDI
Also (What I'm using lately) using zynaddsubfx as your soft-synth. The advantage? An interesting collection of timbres available, also the ability to set your scale degrees to any set of frequencies you like, various "just tunings" or virtually anything else. It's also possible (though not instantly) to retune the tonic of your scale via OSC messages; by running zyn with the -P option, ie saying starting in a terminal with "zynaddsubfx -P 1234" and sending messages to localhost 1234. While sending the standard 0-127 midi values; you'd get whatever custom scale (using a scala file) you'd set up.

On Sat, Jul 30, 2022 at 10:32 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Not sure if I understood you correctly, but you wanted to use Csound to generate MIDI notes etc and play them using another software synthesizer in your computer.

If that's the case, you should look for the MIDI output opcodes in the Csound manual. You will need to use some form of interapplication midi  connection  (like the MIDI IAC driver on a Mac), then select it using the appropriate MIDI output option (see flags in the manual).

However you'll probably find that for MIDI output generation there are more specialised applications that may be better for this particular case (where there is no audio processing involved). There's Open Music, Pure Data, Common Music (and its descendants) that are perhaps more suited to the task.

Using Csound solely for MIDI output is probably like using a cannon to kill a fly.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 30 Jul 2022, at 17:59, Susanne Pedersen <sp@susanne-pedersen.dk> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi all,

I’m quite inexperienced with working with MIDI in general, but I’d like to give it a try with cSound. I’ve read about working with MIDI in Csound both in the reference manual and the floss manual, but I still feel, I need a little help to get me started. In particular, I’d like to know two things that I couldn’t quite figure out from what I’ve read.

First, I’d like to know how I can make Csound produce MIDI notes, rather than using a keyboard or a MIDI file as input. I’d like to try to make a Csound program that generates music with some element of randomness, so that’s why I can’t use a keyboard or a file as inputs.

Second, I’d like to know how I can use my computer’s MIDI instruments/programs in my Csound instruments. The examples, I’ve looked at, use sounds that are generated inside the Csound instruments themselves, but I’d like to use the ones that come with my computer, rather than having to try to construct the same or similar instrument sounds myself. Sorry if this question sounds vague, but I’m not sure how to describe it clearer.

 

Thanks in advance for any help,

Susanne

 

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here