[Csnd] Problem writing a MIDI file
| Date | 2025-08-07 20:26 |
| From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | [Csnd] Problem writing a MIDI file |
|
Using the following CsOptions:
-odac -Q1 --midioutfile=Carillon8MIDI4.mid
and using either of the following lines to create MIDI output:
noteon 1, 63, 100
midion 1, 63, 100
a "Carillon8MIDI4.mid" is created in my home directory, but it is empty (byte count = 0).
Meanwhile, the MIDI notes are playing fine on my output synth, command line shows no errors nor warnings, and realtime events are indicated on the console as notes are playing.
What am I missing?
I'm running (latest) Windows Csound 6 from a USB stick with a skeletal Csound installation; I could be missing a necessary .dll, though I have pmidi, rtpa, portaudio and portmidi in my home directory.
In short: all signs seem to be "mission going smoothly" - yet there are no results.
Art H.
abhunkin@uncg.edu
http://www.arthunkins.com
|
| Date | 2025-08-07 20:45 |
| From | vlz |
| Subject | Re: [Csnd] Problem writing a MIDI file |
I can’t reproduce this on the Mac - on Csound 7 or Csound 6.18 I get a 31-byte file with |
| Date | 2025-08-11 23:19 |
| From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd] Problem writing a MIDI file |
|
Thanks for the help with this issue, Victor. Your example worked fine on my system, so I had to dig deeper into my .csd.
Finally discovered the problem: my audio output was:
"I1 0 z" . (I think "z" won't work for you either.) Indeed if you end a Csound run with CTRL-C, it will write an empty MIDI file. You need to put in a numerical value.
Using "z" is otherwise fine for Csound live improv, and this MIDIfile case is the only situation where z doesn't do the job for me. (My particular situation didn't seem to respond to turnoff messages either, nor did exitnow. I gather it's a matter of closing
Csound "properly."
Art H.
abhunkin@uncg.edu
http://www.arthunkins.com
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of vlz <viclazzarini@GMAIL.COM>
Sent: Thursday, August 7, 2025 3:45 PM To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE> Subject: Re: [Csnd] Problem writing a MIDI file ⚠️ Warning: This email originated outside of the organization. Do not click links or open attachments unless you recognize the sender. Do not provide personal information to forms, or links in the attachment.
I can’t reproduce this on the Mac - on Csound 7 or Csound 6.18 I get a 31-byte file with <CsoundSynthesizer> <CsOptions> -odac -Q0 --midioutfile=test3.mid </CsOptions> <CsInstruments> instr 1 noteon 1, 63, 100 endin schedule(1,0,1) </CsInstruments> <CsScore> f 0 1 </CsScore> </CsoundSynthesizer> > On 7 Aug 2025, at 20:26, Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> wrote: > > Using the following CsOptions: > > -odac -Q1 --midioutfile=Carillon8MIDI4.mid > > and using either of the following lines to create MIDI output: > noteon 1, 63, 100 > midion 1, 63, 100 > > a "Carillon8MIDI4.mid" is created in my home directory, but it is empty (byte count = 0). > > Meanwhile, the MIDI notes are playing fine on my output synth, command line shows no errors nor warnings, and realtime events are indicated on the console as notes are playing. > > What am I missing? > > I'm running (latest) Windows Csound 6 from a USB stick with a skeletal Csound installation; I could be missing a necessary .dll, though I have pmidi, rtpa, portaudio and portmidi in my home directory. > > In short: all signs seem to be "mission going smoothly" - yet there are no results. > > Art H. > > abhunkin@uncg.edu > http://www.arthunkins.com > Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports tohttps://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 |
| Date | 2025-08-12 00:42 |
| From | Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file |
Maybe it’s a Windows issue. I can close Csound with ctrl-c and a MIDI file is written properly on the Mac. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 11 Aug 2025, at 23:19, Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> 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. > Thanks for the help with this issue, Victor. Your example worked fine on my system, so I had to dig deeper into my .csd. > > Finally discovered the problem: my audio output was: > "I1 0 z" . (I think "z" won't work for you either.) Indeed if you end a Csound run with CTRL-C, it will write an empty MIDI file. You need to put in a numerical value. > Using "z" is otherwise fine for Csound live improv, and this MIDIfile case is the only situation where z doesn't do the job for me. (My particular situation didn't seem to respond to turnoff messages either, nor did exitnow. I gather it's a matter of closing Csound "properly." > > Art H. > > abhunkin@uncg.edu > http://www.arthunkins.comFrom: A discussion list for users of Csound |
| Date | 2025-08-12 00:54 |
| From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file |
|
Is that with using "z"?
Or do you use a long duration (via "i" or "f") then interrupt with CTRL-C?
Or does CTRL-C give a MIDI file regardless?
Art H.
abhunkin@uncg.edu
http://www.arthunkins.com
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
Sent: Monday, August 11, 2025 7:42 PM To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE> Subject: Re: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file Maybe it’s a Windows issue. I can close Csound with ctrl-c and a MIDI file is written properly on the Mac.
======================== Prof. Victor Lazzarini Maynooth University Ireland > On 11 Aug 2025, at 23:19, Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> 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. > Thanks for the help with this issue, Victor. Your example worked fine on my system, so I had to dig deeper into my .csd. > > Finally discovered the problem: my audio output was: > "I1 0 z" . (I think "z" won't work for you either.) Indeed if you end a Csound run with CTRL-C, it will write an empty MIDI file. You need to put in a numerical value. > Using "z" is otherwise fine for Csound live improv, and this MIDIfile case is the only situation where z doesn't do the job for me. (My particular situation didn't seem to respond to turnoff messages either, nor did exitnow. I gather it's a matter of closing Csound "properly." > > Art H. > > abhunkin@uncg.edu > http://www.arthunkins.comFrom: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of vlz <viclazzarini@GMAIL.COM> > Sent: Thursday, August 7, 2025 3:45 PM > To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE> > Subject: Re: [Csnd] Problem writing a MIDI file > ⚠️ Warning: This email originated outside of the organization. Do not click links or open attachments unless you recognize the sender. Do not provide personal information to forms, or links in the attachment. > > I can’t reproduce this on the Mac - on Csound 7 or Csound 6.18 > I get a 31-byte file with > > <CsoundSynthesizer> > <CsOptions> > -odac -Q0 --midioutfile=test3.mid > </CsOptions> > <CsInstruments> > > instr 1 > noteon 1, 63, 100 > endin > > schedule(1,0,1) > </CsInstruments> > <CsScore> > f 0 1 > </CsScore> > </CsoundSynthesizer> > > > On 7 Aug 2025, at 20:26, Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> wrote: > > > > Using the following CsOptions: > > > > -odac -Q1 --midioutfile=Carillon8MIDI4.mid > > > > and using either of the following lines to create MIDI output: > > noteon 1, 63, 100 > > midion 1, 63, 100 > > > > a "Carillon8MIDI4.mid" is created in my home directory, but it is empty (byte count = 0). > > > > Meanwhile, the MIDI notes are playing fine on my output synth, command line shows no errors nor warnings, and realtime events are indicated on the console as notes are playing. > > > > What am I missing? > > > > I'm running (latest) Windows Csound 6 from a USB stick with a skeletal Csound installation; I could be missing a necessary .dll, though I have pmidi, rtpa, portaudio and portmidi in my home directory. > > > > In short: all signs seem to be "mission going smoothly" - yet there are no results. > > > > Art H. > > > > abhunkin@uncg.edu > > http://www.arthunkins.com > > Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports tohttps://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 tohttps://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 |
| Date | 2025-08-12 01:26 |
| From | vlz |
| Subject | Re: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file |
| This should be when stopping Csound with ctrl-C regardless of whether it runs forever or for any duration. There is a signal handler that calls the Csound destruction routine closing files etc. Not sure whether this works correctly on Windows as it does on linux/macos as I have not used Windows for the last fifteen years. Prof. Victor Lazzarini Maynooth University Ireland On 11 Aug 2025, at 20:54, Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote:
|
| Date | 2025-08-12 02:55 |
| From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file |
|
Could any other Windows Csound user comment on my issue - i.e., with both MIDI in and MIDI out, simultaneously trying to write a MIDI file (.mid)?
Is this just a Windows issue (or something having to do with my system setup)?
Both MIDI in and MIDI out work fine - just no MIDI file data is captured at the same time. Capture is fine with
either -M or -Q, but not both - or so it seems.
Art H.
abhunkin@uncg.edu
http://www.arthunkins.com
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of vlz <viclazzarini@GMAIL.COM>
Sent: Monday, August 11, 2025 8:26 PM To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE> Subject: Re: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file ⚠️ Warning: This email originated outside of the organization. Do not click links or open attachments unless you recognize the sender. Do not provide personal information to forms, or
links in the attachment.
This should be when stopping Csound with ctrl-C regardless of whether it runs forever or for any duration.
There is a signal handler that calls the Csound destruction routine closing files etc. Not sure whether this works correctly on Windows as it does on linux/macos as I have not used Windows for the last fifteen years.
Prof. Victor Lazzarini
Maynooth University
Ireland
On 11 Aug 2025, at 20:54, Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote:
|
| Date | 2025-08-31 22:42 |
| From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | [Csnd] Fw: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file |
|
FWIW:
ChatGPT confirms that, on Windows only, Csound will not write a MIDI file (.mid) out if it is "ended" (interrupted) by CTRL-C. (Windows needs a "regular" (clean) ending.)
Victor is correct when he suggests that "this could be a Windows thing."
Perhaps the Csound manuals could reference this fact when documenting MIDI file output.
I've found ChatGPT to have significant knowledge of Csound, though it is hardly inerrant. (Or perhaps it is largely a matter of our not understanding each other!)
abhunkin@uncg.edu
http://www.arthunkins.com
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE>
Sent: Monday, August 11, 2025 9:55 PM To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE> Subject: Re: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file
Could any other Windows Csound user comment on my issue - i.e., with both MIDI in and MIDI out, simultaneously trying to write a MIDI file (.mid)?
Is this just a Windows issue (or something having to do with my system setup)?
Both MIDI in and MIDI out work fine - just no MIDI file data is captured at the same time. Capture is fine with
either -M or -Q, but not both - or so it seems.
Art H.
abhunkin@uncg.edu
http://www.arthunkins.com
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of vlz <viclazzarini@GMAIL.COM>
Sent: Monday, August 11, 2025 8:26 PM To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE> Subject: Re: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file ⚠️ Warning: This email originated outside of the organization. Do not click links or open attachments unless you recognize the sender. Do not provide personal information to forms, or
links in the attachment.
This should be when stopping Csound with ctrl-C regardless of whether it runs forever or for any duration.
There is a signal handler that calls the Csound destruction routine closing files etc. Not sure whether this works correctly on Windows as it does on linux/macos as I have not used Windows for the last fifteen years.
Prof. Victor Lazzarini
Maynooth University
Ireland
On 11 Aug 2025, at 20:54, Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote:
|
| Date | 2025-09-01 06:44 |
| From | Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd] Fw: [Csnd] [EXTERNAL] [Csnd] Problem writing a MIDI file |
|
Wouldn't ChatGPT be just repeating what we said here? Prof. Victor Lazzarini
Maynooth University
Ireland
On 31 Aug 2025, at 22:43, Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote:
|