Csound Csound-dev Csound-tekno Search About

[Csnd-dev] General MIDI by AI

Date2026-10-29 16:42
FromMichael Gogins
Subject[Csnd-dev] General MIDI by AI

The above is a single .csd that contains a complete implementation of the General MIDI specification in pure Csound 7, with a sample swing tune to exercise the instruments. This file, both orchestra and score, was generated using Claude Fable 5.1, with one prompt to get one response, no iterations, and played out of the box without errors. It played in the Web IDE also.

Some of the instruments are kind of cheesy, but I will try to fix them up. Some of the instruments are pretty good. I think the capabilities displayed by Claude Fable here are quite remarkable.

Here's my entire prompt:

In this directory, create a general-midi.csd that, using only Csound and no samples or other external dependencies, gets as close as possible to a good implementation of the General MIDI standard. Include in this .csd file a mid-tempo jazz-like  tune, in the form of a Csound score, that plays all of the instruments/channels. Use only the pfields and numerical scaling that are used in the .inc files in this directory. Each iinstrument should be named "GM_<name>" where <name> is the same as in the General MIDI standard. The instruments should be self-contained and feed into effects and outputs using the signal flow graph opcodes, just like the .inc files do. Where appropriate, include global variables just above the insdef declaration for controlling parameters in that instrument, using the naming pattern in the .inc files. Wavetables should be defined in instr 0 but just above the insdef declaration that uses those tables, just as in the .inc files. The instruments should sound like acoustic instruments if possible, but if that is not possible, they should at least sound musical, without artifacts or "cheesy" sounds.

Regards,
Mike



-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

Date2026-10-29 16:59
Fromvlz
SubjectRe: [Csnd] General MIDI by AI
Thanks. It's quite complex; interesting that it doesn't adopt modern Csound 7 syntax, but I guess there are fewer examples out there of it.

How does it sound vs GM soundfonts?

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Oct 2026, at 16:42, Michael Gogins <michael.gogins@gmail.com> 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.


The above is a single .csd that contains a complete implementation of the General MIDI specification in pure Csound 7, with a sample swing tune to exercise the instruments. This file, both orchestra and score, was generated using Claude Fable 5.1, with one prompt to get one response, no iterations, and played out of the box without errors. It played in the Web IDE also.

Some of the instruments are kind of cheesy, but I will try to fix them up. Some of the instruments are pretty good. I think the capabilities displayed by Claude Fable here are quite remarkable.

Here's my entire prompt:

In this directory, create a general-midi.csd that, using only Csound and no samples or other external dependencies, gets as close as possible to a good implementation of the General MIDI standard. Include in this .csd file a mid-tempo jazz-like  tune, in the form of a Csound score, that plays all of the instruments/channels. Use only the pfields and numerical scaling that are used in the .inc files in this directory. Each iinstrument should be named "GM_<name>" where <name> is the same as in the General MIDI standard. The instruments should be self-contained and feed into effects and outputs using the signal flow graph opcodes, just like the .inc files do. Where appropriate, include global variables just above the insdef declaration for controlling parameters in that instrument, using the naming pattern in the .inc files. Wavetables should be defined in instr 0 but just above the insdef declaration that uses those tables, just as in the .inc files. The instruments should sound like acoustic instruments if possible, but if that is not possible, they should at least sound musical, without artifacts or "cheesy" sounds.

Regards,
Mike



-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com
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

Date2026-10-29 22:27
FromJames Croson
SubjectRe: [Csnd-dev] General MIDI by AI
Thanks for this, Michael.
Have used AI to make some tools in csound, filters, techniques such as wavetables, etc. AI knows csound (6 and 7). 
Quite a difference between the google web AI and Claude: spent 4 hours trying to fix a saw with sync on Genesis that Claude solved it 4 minutes. I think best used as a tutor: I want to know why it did what.
Jm C

On Oct 29, 2026, at 12:42 PM, Michael Gogins <michael.gogins@gmail.com> wrote:



The above is a single .csd that contains a complete implementation of the General MIDI specification in pure Csound 7, with a sample swing tune to exercise the instruments. This file, both orchestra and score, was generated using Claude Fable 5.1, with one prompt to get one response, no iterations, and played out of the box without errors. It played in the Web IDE also.

Some of the instruments are kind of cheesy, but I will try to fix them up. Some of the instruments are pretty good. I think the capabilities displayed by Claude Fable here are quite remarkable.

Here's my entire prompt:

In this directory, create a general-midi.csd that, using only Csound and no samples or other external dependencies, gets as close as possible to a good implementation of the General MIDI standard. Include in this .csd file a mid-tempo jazz-like  tune, in the form of a Csound score, that plays all of the instruments/channels. Use only the pfields and numerical scaling that are used in the .inc files in this directory. Each iinstrument should be named "GM_<name>" where <name> is the same as in the General MIDI standard. The instruments should be self-contained and feed into effects and outputs using the signal flow graph opcodes, just like the .inc files do. Where appropriate, include global variables just above the insdef declaration for controlling parameters in that instrument, using the naming pattern in the .inc files. Wavetables should be defined in instr 0 but just above the insdef declaration that uses those tables, just as in the .inc files. The instruments should sound like acoustic instruments if possible, but if that is not possible, they should at least sound musical, without artifacts or "cheesy" sounds.

Regards,
Mike



-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com