< Back to IRCAM Forum

Normalized? -- Use Gen01 to load audio file

Hello,

I am connecting a DIY wav-soundbank to OM with the objects SMPL-1 and SMPL-3 in Chroma, in order to convert the chord-seq directly to audio file (since I am a bit tired to repeat the workflow: om-export-midi ==> load in DAW ==> bounce as sf :wink: )

Firstly I tried it with SMPL-1 to load 1500 files (some of them are repeated) from disk and it took very long time.
Then I tried with SMPL-3 to load the files into GEN01, it is much quicker. But with the two approaches, the results were different.

At the end, I made an algorithm (but very slow) for peak-amp dectection for each loaded soundfile, and multiply it with the amplitude parameter list for the SMPL-3 class, and the result was finally the same as the one with SMPL-1.

I guess, there should be a process of normalization by loading the soundfile into “GEN01” or by using the GEN01 table for synthesis between “SMPL-3” and “synthesizer” . I tried to find a place to disable that but at the end, the rescale (keyword input for synthesizer) is just for the finale normalization not for each single loaded sf.

So I would like to discover:

  1. If there is a way to disable this normalization for the GEN01 table?
    or
  2. If there is a nice function for detect the peak-amp of each soundfile? (I tried sox or audio-io::om-get-sound-buffer==>om-read-ptr but it was very slow)
    or
  3. If there is a similar approach to render a chord-seq with WAV-samplebank in OM which I can inspire myself?

Thank you very much in advance!
(ps … the patch is with too much user defined function and the soundbank is too large to be uploaded, but I think the idea is clear)

Best wishes,
Jialin

002_chord-seq-sampler-pro-export-version.omp (3.2 MB)

Dear Jialin,
In csound, GENs with a negative number do not normalise their values (like GEN 0 -7). There are two possibilities in OMChroma: either use the object “GEN-01”, which does not normalise the values (this is my suggestion), or build your own GEN function from scratch using “CS-TABLE”.
SMPL-1 reads files from disk and is, therefore, appropriate if one has not so many, potentially long files. SMPL-3 loads the files into a deferred table (GEN-01). It will take a little time only when csound is loading the score. It is recommended when one has many (rather short) sound files.
Hope this solves your issue.
Viele Grüße!
Marco

1 Like

Dear Marco,

Thank you very much for the very quick response and the detailed solutions! I will try the GEN-01 and CS-Table solution and use the SMPL-3 solution – in my case they are shorter files and many!

Herzliche Grüße,
Jialin