Re: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] Art's Issue

Arthur Hunkins <[email protected]>
Newsgroups gmane.comp.audio.csound.devel
Message-ID <CO6PR14MB430529C40010D2AF74036C88A336A@CO6PR14MB4305.namprd14.prod.outlook.com>
Hi Mike and Victor -

Two items:


  1.
For me, on Windows, a proper MIDI file is written when Csound ends normally, but an empty MIDI file is "written" when Csound is ended with CTRL-C. Do you both agree that this is also the case with Mac and Linux platforms?
  2.
Mike, I think the fact that only the first note sounds with -Q is because I've only written noteon's - no noteoff's. This is because I'm writing for carillons (and some other similar instruments) that don't take noteoff's. When I specify an instrument that requires a noteoff, I get the same "first-note-only" response that you are getting. (So this is a non-issue for me, and the sensekey behavior is fine - unless you try holding down a key, which can give you a machine-gun effect!)

Art H.

  1.


[email protected]
http://www.arthunkins.com
________________________________
From: Csound-developers <[email protected]> on behalf of Michael Gogins <[email protected]>
Sent: Sunday, August 17, 2025 6:46 AM
To: [email protected] <[email protected]>
Subject: Re: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] Art's Issue

⚠️ 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.
They are ALSO not sent when the soundfile is NOT written.

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


On Sun, Aug 17, 2025 at 5:54 AM Victor Lazzarini <[email protected]<mailto:[email protected]>> wrote:
If the MIDI on notes are not being sent out to a device when -Q and --midioutfile are used, I suspect the midi file write function is clearing the buffer.

The MIDI off notes at the end are sent by the reset routine to clear any hanging notes, I presume.

I'll have a look at this (develop branch).

best
Prof. Victor Lazzarini
Maynooth University
Ireland

On 17 Aug 2025, at 02:31, Michael Gogins <[email protected]<mailto:[email protected]>> 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.

On my macOS I tested your .csd and also created my own .csd (attached) which behaved as follows:

Both files received keystrokes and translated them to MIDI messages that were sent out from Csound.

Both files recorded valid MIDI files that I could load into Reaper and play.

Only the first keystroke actually played a note on the synth. All the other keystrokes, though they continued to be translated and to be saved, were silent.

When the user ended the Csound performance with Control-C, the Midiview app on the Mac showed all the note off messages arriving at once; no trace of the note on messages.

This issue describes similar behavior experienced by another user: https://github.com/csound/csound/issues/1784

Regards,
Mike

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


On Thu, Aug 14, 2025 at 7:01 PM Arthur Hunkins <[email protected]<mailto:[email protected]>> wrote:
Hi, Mike -

Good and helpful discussion this afternoon.

Glad to have any feedback regarding my issue as demoed in the attached .csd.

The problem is simple: run as is, everything works as expected, except that the MIDI file written is empty. This is associated with the fact that the duration of performance (via ASC keyboard, the first 8 number keys) is infinite (z) and must be stopped by CTRL-C.

Changing the z infinite duration to a finite number (say 5 or 10) finishes the performance normally and writes an appropriate MIDI file. (Try it and see/verify.)

According to Victor L., z (CTRL-C) should write a proper MIDI file as well. This is the only issue. The audio performance depends on the right -Q value, but the MIDI file output seems totally independent of this.

Actually, as long as you have some kind of MIDI device plugged in (or an active MIDI cable), you can test this out without any audio at all. Just see whether the MIDI file (which if Csound runs, will be created) has any bytes!

Thanks for any insight. Victor suggests that "this is a Windows problem" - which may well be true. (Do you find the same results with Mac or Linux?)

Art H.
<senskey_test.txt>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.