[Csnd] Efficient way to implement a "vector mixer"
| Date | 2017-11-20 20:45 |
| From | "Jeanette C." |
| Subject | [Csnd] Efficient way to implement a "vector mixer" |
Hey hey everyone,
not sure, if "vector mixer" is the correct term: I have a number of audio
signals, in the program logic indexed from 0 to n. Based on a floating point
mixing controller, between 0 and n, I'd like to mix each two consecutive
signals based on:
klevel_left = 1 - frac(kmix_index)
klevel_right = frac(kmix_index)
I haven't found a direct opcode to do this for me.
The complete number of audio signals will be <10. My current approach is to do
it on a conditional basis:
1. calculate the left and right levels once
2. based on the integral part - int(kmix_index) use if/elseif to find the
correct pair
3. inside the conditional blocks, mix the two signals into an output signal
Is there a faster better approach?
TIA.
Best wishes,
Jeanette
--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c
If there's nothing missing in my life
Then why do these tears come at night <3
(Britney Spears)
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 | 2017-11-20 22:51 |
| From | Oeyvind Brandtsegg |
| Subject | Re: [Csnd] Efficient way to implement a "vector mixer" |
You could use (n) tables with precalculated level for each output, and index the tables with your kmix_index (?) 2017-11-20 21:45 GMT+01:00 Jeanette C. <julien@mail.upb.de>: Hey hey everyone, 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 |