< Back to IRCAM Forum

How to integrate tables in OM Instrument built with csound

HI All

I started building simple instruments in csound and exporting them in OM User Library.
But I dont understand how I can control/ define my tables there…
I would like to have it like this ->


that I define some tables somewhere and have pfield to choose one of them…

But I can only build for import in OM when I do like that:
03

How can I define the tables as pfield? and where are they saved? Im Sure it is really easy but I never used it before…

Thanks :slight_smile:
Best L

Dear MariaRose,

Can you send a MWE patch (the patch you are displaying here)?
And can you be more specific about the libraries you are using.

Best
K

Dear Karim
Thank you for fast reply :slight_smile:

I dont know what is a MWE Patch… :smiley:
Here are all displayed patches:
Fmklasse.omp (11.6 KB)
20200302_FMKLASSE2.orc (291 Bytes) 20200302_FMKLASSE2.csd (1.2 KB)
20190225_1115_FM.csd (1.4 KB)
In this case I use OM2Csound 2-2.2
Best
L

PS: I would also like to know how I can feed it with BPF for amplitude like you can do in add-1(last pfield)

Dear Mariarose,

First of all, i can’t locate the om2csound 2.2.2 version, the latest one available being 2.3
Then, you are apparently using omchroma library (which version?)
On top of that you have a special user class that you didn’t sent.
this is not what is apparently a Minimum Working Example.
Please try to narrow the problem, and you might find the solution on your own.
And i doubt that this is the simplest solution to your problem.
tables in Csound are generally defined in the score part. A simple straight forward example is given in the om2csound help file tutorial #4 (04-score-example).


Another issue is that this version of om2csound doesn’t handle the .csd csound files.
So i suspect that you are somehow mixed up with om2csound and omchroma.
Best
K

Sry Karim, sometimes its not so easy describing problems here…
I sent you the User class its 20200302_FMKLASSE2.orc
I call that file in OM with the function get instrument.
And sry for the missunderstanding with the library, in case that it works alone I thought it is OM2csound but sure you are right it is chroma. It is the version 4-2.3.

Ok I will try it again… mybe I can find a solution.
I know that you define the tables in the score… and thats the problem because I generate the user instrument where I only use the orc… then the score is missing.
I dont know how to call the tables out of OM in my own user class… :smiley:
Best and thank you
L

Dear mariarose

I am a little bit confused here:

  1. the “20200302_FMKLASSE2.orc” file is NOT an om class. It is a Csound orchestra. Your patch is not functionnal without om class FMCLASSE2 by the same name.
  2. The latest version of OMCHROMA is 5.1. i don’t know where to find the version you are talking about.

I will however make you a patch to be used with this orchestra using only om2csound. And will send it ASAP

Best
K

Ok here is one of your orcs.
Because i just found out that you have cited two different synth orcs.
If you need the first this should wait.

The patch:
04-score-example 2.omp (30.0 KB)

Best
K

Dear Karim

sry for late reply!

Meanwhile I found the function ftgen which solved my problems getting the tables into the orchestra.
In csound if its built like that it works fine its the version 20200306_1217_FM which is the same i tried to import in OM as fmklasse4.
But unfortunately there I get an error in synthesis… maybe you can have a look at it i zipped it all… hope I didnt forget something and that works on your computer.

Thank you for the example patches you built… if mine doesnt work, I guess your solution working in that way is the better way.
forumzip.zip (9.3 KB)

Dear Mariarose,

Now that you have sent me the user’s classes i can open your previous patch, and for me all is working:

Maybe you forgot to send me the patch that has the error, and can you at least send me the error report so i can see what is wrong here.

Best
K

yes that version you have opened there is fine (version2). But there I was missing the function ftgen to import the tables in the orc.
Then I found this function and built it in the instrument. (Version4).
In csound that works fine, only in OM I have the problem in synthesis.
OMclass(which is not working):
fmklasse4.omp (7.9 KB)
error:


file wich creates OM class:
fmklasse4.orc (534 Bytes)
same instrument in csound file(where it works):
20200306_1217_FM.csd (1.3 KB)

Thank you very much <3

PS: fmklasse4 is also in the User folder I already sent.

Still i am missing the patch: fmclass4.omp

its in the previous post… isnt it? :smiley:

here again :slight_smile:

fmklasse4.omp (7.9 KB)

Ok ,

sorry my bad didn’t see the link. It’s fixed,
You had in your user’s class a strange linefeed.
so substitute the user class i am sending with the one you have and it will surely work.

Best
K
FMKLASSE4-1.omc.zip (925 Bytes)

Great!! <3
Thank you very much for fixing it :slight_smile:
How did you found that mistake?

Best
L