[Csnd] Fof2 and Midi
Date | 2019-05-05 20:24 |
From | Gpp |
Subject | [Csnd] Fof2 and Midi |
Dear Csounders, I hope in your patience, I am trying and play a fof2 orchestra with a Midi keyboard. No errors are mentioned in the console, but at the same time no sound is coming out. I can't understand why, the a similar orchestra worked with the grain3 opcode. Maybe you can help me? Thank you in advance, here is the orchestra: |
Date | 2019-05-05 20:29 |
From | john |
Subject | Re: [Csnd] Fof2 and Midi |
Writing in ignrance but where to you associate your MIDI keyboard with csound`? I did not see i`t in yoyr csd file. On Sun, 5 May 2019, Gpp wrote: > Dear Csounders, > > I hope in your patience, I am trying and play a fof2 orchestra with a Midi > keyboard. No errors are mentioned in the console, but at the same time no > sound is coming out. I can't understand why, the a similar orchestra worked > with the grain3 opcode. Maybe you can help me? > > Thank you in advance, here is the orchestra: > > > |
Date | 2019-05-05 20:39 |
From | Gpp |
Subject | Re: [Csnd] Fof2 and Midi |
The following lines should get the notes of the keyboard: icps cpsmidi ifreqbase = icps -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html 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 | 2019-05-05 23:20 |
From | John ff |
Subject | Re: [Csnd] Fof2 and Midi |
I would have expected a -M option to say which midi device
Sent from TypeApp
On 5 May 2019, at 20:40, Gpp <giuseppeiacono.friends@gmail.com> wrote: The following lines should get the notes of the keyboard: |
Date | 2019-05-06 01:00 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd] Fof2 and Midi |
Seems that you are also missing “massign” On Mon, 6 May 2019 at 00:21, John ff <jpff@codemist.co.uk> wrote:
|
Date | 2019-05-06 17:03 |
From | john |
Subject | Re: [Csnd] Fof2 and Midi |
I think you are wrong here. your instruments are MIDI started and so csound needs to know which midi device to listen before it can obey the cpsmidi opcode. -M selects the MIDI device. Look at the manual example for cpsmidi and you will see the -M0 option. Without knowing your setup we cannot know the correct number for your keyboard(?) or what MIDI system you are using n what platform. On Sun, 5 May 2019, Gpp wrote: > The following lines should get the notes of the keyboard: > > icps cpsmidi > ifreqbase = icps > > > > -- > Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html > > 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 |
Date | 2019-05-06 17:13 |
From | john |
Subject | Re: [Csnd] Fof2 and Midi |
and from the manual MIDI Realtime Input/Ouput -M DEVICE, --midi-device=DEVICE Read MIDI events from device DEVICE. If using ALSA MIDI (-+rtmidi=alsa), devices are selected by name and not number. So, you need to use an option like -M hw:CARD,DEVICE where CARD and DEVICE are the card and device numbers (e.g. -M hw:1,0). In the case of PortMidi and MME, DEVICE should be a number, and if it is out of range, an error occurs and the valid device numbers are printed. When using PortMidi, you can use '-Ma' to enable all devices. This is also convenient when you don't have devices as it will not generate an error. On Mon, 6 May 2019, john wrote: > I think you are wrong here. your instruments are MIDI started and so csound > needs to know which midi device to listen before it can obey the cpsmidi > opcode. -M selects the MIDI device. Look at the manual example for cpsmidi > and you will see the -M0 option. Without knowing your setup we cannot know > the correct number for your keyboard(?) or what MIDI system you are using n > what platform. > > On Sun, 5 May 2019, Gpp wrote: > >> The following lines should get the notes of the keyboard: >> >> icps cpsmidi >> ifreqbase = icps >> >> >> >> -- >> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html >> >> 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 |
Date | 2019-05-06 21:01 |
From | Gpp |
Subject | Re: [Csnd] Fof2 and Midi |
John, thanks. I used the cpsmidi opcode in other csd files, they worked also without adding -M0 at the beginning of the orchestra. About the device I am using, I set it in the preferences of CsoundQt. Anyway I tryed and play this fof2 orchestra adding -odac -M0. It still doesn't work. I think I am wrong here: asig fof2 kenv, kfreq_base, kform_freq1 , koctav1, kfrom_bdw1, krise1, kgr_dur1, kdec1, iolaps,gisine, giWFn, p3, kph1, kgliss1 The p3 parameter was clearly not initialized in the previous lines of the orc, because I am playing it live, so I guess it doesn't make sense at all. It should be substituted with the duration of the Midi event, I am wondering in which way. I also tryed and substitute it with arbitrary durations, i.e. 1, 20, 100. Finally I got some sounds, but always lasting not more than half second, and get this error: PERF ERROR in instr 1: FOF needs more overlaps In the manual - about this parameter - I read: itotdur -- total time during which this fof will be active. Any idea or suggestion? -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html 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 | 2019-05-06 21:12 |
From | john |
Subject | Re: [Csnd] Fof2 and Midi |
You did not say you were using CsoundQt which i do not use or know anything about. I only use csound, so I doubt I can hep you. One problem with MIDIi csound is that one camnnot know p3 at thr start of a note as it woul drequire knowing the future. I _think_ p3 is negative in midi notes, but cannot be used sensibly in an instr. No dea how to fix. On Mon, 6 May 2019, Gpp wrote: > John, thanks. > I used the cpsmidi opcode in other csd files, they worked also without > adding -M0 at the beginning of the orchestra. About the device I am using, I > set it in the preferences of CsoundQt. > Anyway I tryed and play this fof2 orchestra adding -odac -M0. It still > doesn't work. > > I think I am wrong here: > asig fof2 kenv, kfreq_base, kform_freq1 , koctav1, kfrom_bdw1, krise1, > kgr_dur1, kdec1, iolaps,gisine, giWFn, p3, kph1, kgliss1 > The p3 parameter was clearly not initialized in the previous lines of the > orc, because I am playing it live, so I guess it doesn't make sense at all. > It should be substituted with the duration of the Midi event, I am wondering > in which way. I also tryed and substitute it with arbitrary durations, i.e. > 1, 20, 100. Finally I got some sounds, but always lasting not more than half > second, and get this error: PERF ERROR in instr 1: FOF needs more overlaps > In the manual - about this parameter - I read: itotdur -- total time during > which this fof will be active. > > Any idea or suggestion? > > > > > > -- > Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html > > 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 |
Date | 2019-05-07 02:57 |
From | Pete Goodeve |
Subject | Re: [Csnd] Fof2 and Midi |
Attachments | None |
Date | 2019-05-07 14:42 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] Fof2 and Midi |
Just my 2cents, I think what you try to do is entirely possible but as others have mentioned the issue of p3 must be treated differently with midi events. But itotdur and iolaps can safely be set to large values, effectively bypassing their effect on the output. The instrument is also fairly complex, so simplifying it might give insight into what causes the lack of sound (or odd sounds and artifacts). The process of simplifying it can be done by editing out some of the k-rate automation, replacing with static values that you know will work, then building up again once you have identified the offending parts. Another approach would be starting with a simpler example and then building up, adding parts of your problem instrument one by one. A third approach could be adding another sound generator (simple oscillator or similar) to run in parallell in the same instrument, and output the simple oscillator to one channel (left) while running the fof2 output to another channel (right). This would give you clues as to if the instrument in general is running and calculating everything without stops or errors. Simplifying the instrument and chasing down the cause of the problem can be quite an effort sometimes, but I am 100% confident that you will learn something valuable in the process. all best Oeyvind tir. 7. mai 2019 kl. 03:57 skrev Pete Goodeve <pete.goodeve@computer.org>: On Mon, May 06, 2019 at 01:01:36PM -0700, Gpp wrote: Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://www.partikkelaudio.com/ http://crossadaptive.hf.ntnu.no http://gdsp.hf.ntnu.no/ http://soundcloud.com/brandtsegg http://flyndresang.no/ http://soundcloud.com/t-emp |
Date | 2019-05-08 12:31 |
From | Gpp |
Subject | Re: [Csnd] Fof2 and Midi |
Yes, I also believe that fof2 is not compatible with a MIDI performance. But let's follow Oeyvind's suggestions as well. Thank you for your feedback! -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html 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 | 2019-05-08 12:37 |
From | Gpp |
Subject | Re: [Csnd] Fof2 and Midi |
Hi Oeyvind, thanks, I will try and semplify and see what happens. What I can say is that the same orchestra - same use of k-rate LFOs - works very fine having all parameters set in a score. So, I am wondering if it's matter of semplification. Or it's just that fof2 and MIDI are not compatible? -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html 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 | 2019-05-08 13:32 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] Fof2 and Midi |
Hi, I have used fof2 in midi triggered instruments, so I am sure this should work. As a quick test you could try setting p3 explicitly at the beginning of your instrument, like p3 =1 This will let your midi triggered instrument play for one second, regardless of how long you hold the midi note. All envelopes should work as for a score event in this case. It is a bit inflexible and hackish, just a way to move forward with the process of finding the problem. Oeyvind ons. 8. mai 2019 kl. 13:37 skrev Gpp <giuseppeiacono.friends@gmail.com>: Hi Oeyvind, Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://www.partikkelaudio.com/ http://crossadaptive.hf.ntnu.no http://gdsp.hf.ntnu.no/ http://soundcloud.com/brandtsegg http://flyndresang.no/ http://soundcloud.com/t-emp |
Date | 2019-05-09 01:32 |
From | Michael Gogins |
Subject | Re: [Csnd] Fof2 and Midi |
You should try the MIDI inter-operation command line options: https://gogins.github.io/csound-extended/html/CommandFlagsCategory.html#FlagsCatMinusUpperM These are designed so that exactly the same instrument definitions can be used for regular score-driven performance, for MIDI file-driven performance, or for real-time MIDI controller-driven performance. There is then no need to use the cpsmidi, midiin, veloc, or other channel message opcodes. If you need MIDI controller numbers and values, you can still use midictrl, ctrl7, or the other controller opcodes. Write your instrument to use score statements, then use --midi-key=4 --midi-velocity=5 to route incoming MIDI channel message key numbers to p4, and MIDI channel message velocity numbers to p5. This is just an example, you can determine which pfields receive the MIDI channel message data. Regards, Mike See In your instr definition, use a releasing envelope such as transegr or linsegr. ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Wed, May 8, 2019 at 8:32 AM Oeyvind Brandtsegg |
Date | 2019-05-10 10:53 |
From | Gpp |
Subject | Re: [Csnd] Fof2 and Midi |
Thank you Michael, this would be great, absolutely useful in case of complex instruments that need many parameters. But I guess I did something wrong. Starting with a simple orchestra, it works until I don't trigger a Midi note. As soon as I play a note with the keyboard I get this error message: Invalid ftable no. 0.000000 INIT ERROR in instr 1: table: could not find ftable 0 kFreq_base_tab table.k kndx iFreq_base_fnz 1 0 0 The following is the csd file: |
Date | 2019-05-10 11:20 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Fof2 and Midi |
There is no incompatibility between fof2 and MIDI. Here’s a minimal example demonstrating it. i1 ftgen 2, 0, 16384, 7, 0, 16384, 1 instr 1 iamp ampmidi 0dbfs icps cpsmidib 2 a1 fof2 iamp, icps, 1000, 0, 100, 0.007, 0.04, 0.001, 100, -1, 2, 1000, 0, 0 outs a1,a1 endin ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 8 May 2019, at 12:37, Gpp |
Date | 2019-05-10 13:56 |
From | John ff |
Subject | Re: [Csnd] Fof2 and Midi |
Your instrument uses p6 which is not set by the midi keyboard.
Sent from TypeApp
On 10 May 2019, at 10:55, Gpp <giuseppeiacono.friends@gmail.com> wrote: Thank you Michael, |
Date | 2019-05-10 22:15 |
From | Pete Goodeve |
Subject | Re: [Csnd] Fof2 and Midi |
Attachments | None |
Date | 2019-05-19 18:56 |
From | Gpp |
Subject | Re: [Csnd] Fof2 and Midi |
Pete, sorry for this late reply. Thank you, this is really what I needed. It works well and semplifies many things. I have another question about pset, but I guess it's better to open another message with a new topic. Thanks again! -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html 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 |