Csound Csound-dev Csound-tekno Search About

Re: [Csnd] [EXTERNAL] [Csnd] Problems with -F

Date2024-03-20 20:35
FromRisto Kuusisto
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Problems with -F
The original purpose of this csd was to set (FLsetVal) some FLslider values to CC-values sent through a  midi connection from a (ancient) guitar effect processor
(Yamaha DG-Stomp).
To test the idea i first made a simple midi-file including a few CC's and some note-on's and -off's and used that for testing.
Then i found that there is something wrong either in my thinking or missing command-line flags because there were no time-gaps between csound
visible printing outputs but midi-file events had quite long time delays between each other.

Let me first tell how i think how csound works in this case. My thinking is that the given print-commands in csd-file activate according to the the time-points in the midi-file. 
So the present very simple csd reads only the midi-file and at the moment there is a new event, prints the information about that.
In this case according to the time-stamps i would see messages at the terminal roughly after every 2 s. 
Here's the csd-file:



-n



sr = 44100
ksmps = 441
nchnls = 2
0dbfs = 1

instr 1

kStatus, kChan, kData1, kData2 midiin

if kStatus != 0 then ;print if any new MIDI message has been received
    printk 0, kStatus
    printk 0, kChan
    printk 0, kData1
    printk 0, kData2


endif

endin




f 0 3600 ;dummy table for realtime input
i1 0 3600
e




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

Date2024-03-20 20:48
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Problems with -F
Attachmentsfavicon.ico  
Ok, what will happen here is that any midi note on in channel will cause instrument 1 to run until you get a midi note off. If you want that, it's what you get. Read this:


This is probably what is confusing you.

However if you want to run instrument 1 as a midi monitor, you need to disable midi triggering of instruments with massign.

Then you can run it as you did and it will just print the midi data coming in from midiin

Prof. Victor Lazzarini
Maynooth University
Ireland

On 20 Mar 2024, at 20:35, Risto Kuusisto <rjzkuusisto@gmail.com> wrote:

The original purpose of this csd was to set (FLsetVal) some FLslider values to CC-values sent through a  midi connection from a (ancient) guitar effect processor
(Yamaha DG-Stomp).
To test the idea i first made a simple midi-file including a few CC's and some note-on's and -off's and used that for testing.
Then i found that there is something wrong either in my thinking or missing command-line flags because there were no time-gaps between csound
visible printing outputs but midi-file events had quite long time delays between each other.

Let me first tell how i think how csound works in this case. My thinking is that the given print-commands in csd-file activate according to the the time-points in the midi-file.
So the present very simple csd reads only the midi-file and at the moment there is a new event, prints the information about that.
In this case according to the time-stamps i would see messages at the terminal roughly after every 2 s.
Here's the csd-file:

<CsoundSynthesizer>
<CsOptions>
-n
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 441
nchnls = 2
0dbfs = 1

instr 1

kStatus, kChan, kData1, kData2 midiin

if kStatus != 0 then ;print if any new MIDI message has been received
   printk 0, kStatus
   printk 0, kChan
   printk 0, kData1
   printk 0, kData2


endif

endin


</CsInstruments>
<CsScore>
f 0 3600 ;dummy table for realtime input
i1 0 3600
e
</CsScore>

</CsoundSynthesizer>

Csound mailing list
Csound@listserv.heanet.ie
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C02%7CVictor.Lazzarini%40mu.ie%7Cb677d4074ad84f5fa7fa08dc491d4766%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638465637311672743%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=GEHWc%2BNfEYf5NsHYGMiGsGQRH%2B9ysTj4IIdUr6bDk%2Fs%3D&reserved=0
Send bugs reports to
       https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C02%7CVictor.Lazzarini%40mu.ie%7Cb677d4074ad84f5fa7fa08dc491d4766%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638465637311684442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=hpIylbSlGBiiJWIZ4elk9vwOEF6onlQNtlhx2XXufnw%3D&reserved=0
Discussions of bugs and features can be posted here