[Csnd] Anyone used tabrec opcode?
Date | 2018-04-21 21:42 |
From | John |
Subject | [Csnd] Anyone used tabrec opcode? |
I may have asked this before, but I am struggling to understand the tabrec/tabplay opcodes so any input is welcome ==John ffitch 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 | 2018-04-22 13:46 |
From | Anders Genell |
Subject | Re: [Csnd] Anyone used tabrec opcode? |
I don’t know if this is what you are after, and I don’t have my example before me now to include here, but I have used tabplay successfully by importing values from a text file to a table (is that GEN23? - can’t remember) and then let tabplay vary a k-rate signal according to values in the table. The values were recorded values for revolutions per minute of an engine, and by setting the global kr value to the rate of recorded rpm values (1kHz for a standard vehicle CAN-bus), I was able to replay a rpm sweep of the engine using our synthesized engine sound and compare it to the corresponding audio recording. I also imagine one could record MIDI data from twiddling knobs into a table in order to play it back as needed, kind of like a simple MIDI sequencer. For my case I found tabplay very useful and I don’t recall having any trouble adapting the manual example to my needs. Regards, Anders > 21 apr. 2018 kl. 22:42 skrev John |
Date | 2018-04-23 18:03 | ||
From | Iain McCurdy | ||
Subject | Re: [Csnd] Anyone used tabrec opcode? | ||
Hi John,
It is used for storing and playing back one or more control signals. On reading the documentation I agree that its entry could probably be expanded upon and improved. Here is an example that might help. instr 1 records rspline control signals for pitch (oct) and panning position using tabrec for 3 seconds. Then instr 2 reads these functions and uses them with an oscillator.
0dbfs = 1
nchnls = 2
gifn ftgen 0,0,1049576,2,0
; record control signals
instr 1
ktrig_start init 1
koct rspline 7,10,1,2
kpan rspline 7,10,0.1,0.9
ktrig_stop = 1
knumtics = kr*p3
tabrec ktrig_start,ktrig_stop,knumtics,gifn,koct,kpan
ktrig_start = 0
endin
; play control signals
instr 2
koct,kpan init 0
ktrig init 1
knumtics = kr*p3
tabplay ktrig,knumtics,gifn,koct,kpan
ktrig = 0 asig poscil 0.1, cpsoct(koct)aL,aR pan2 asig,kpan
outs aL,aR
endin
Iain From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of John <jpff@CODEMIST.CO.UK>
Sent: 21 April 2018 20:42 To: CSOUND@LISTSERV.HEANET.IE Subject: [Csnd] Anyone used tabrec opcode? I may have asked this before, but I am struggling to understand the
tabrec/tabplay opcodes so any input is welcome ==John ffitch 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 | 2018-04-26 22:04 |
From | jpff |
Subject | Re: [Csnd] Anyone used tabrec opcode? |
Thank you; that almost makes sense. I hope it is OK but I adjusted your example a little and used it (with acknowledgement) in the manual. -==John ff On Mon, 23 Apr 2018, Iain McCurdy wrote: > > Hi John, > > > It is used for storing and playing back one or more control signals. On > reading the documentation I agree that its entry could probably be expanded > upon and improved. > > Here is an example that might help. instr 1 records rspline control signals > for pitch (oct) and panning position using tabrec for 3 seconds. Then instr 2 > reads these functions and uses them with an oscillator. > > > 0dbfs = 1 > nchnls = 2 > > gifn ftgen 0,0,1049576,2,0 > > ; record control signals > instr 1 > ktrig_start init 1 > koct rspline 7,10,1,2 > kpan rspline 7,10,0.1,0.9 > ktrig_stop = 1 > knumtics = kr*p3 > tabrec ktrig_start,ktrig_stop,knumtics,gifn,koct,kpan > ktrig_start = 0 > endin > > ; play control signals > instr 2 > koct,kpan init 0 > ktrig init 1 > knumtics = kr*p3 > tabplay ktrig,knumtics,gifn,koct,kpan > > ktrig = 0 > > asig poscil 0.1, cpsoct(koct) > aL,aR pan2 asig,kpan > outs aL,aR > endin > > Iain > > > > ______________________________________________________________________________ > From: A discussion list for users of Csound |
Date | 2018-04-26 22:07 |
From | "Dr. Richard Boulanger" |
Subject | Re: [Csnd] Anyone used tabrec opcode? |
Great. It is an excellent example! Thanks again Iain! (and John!!) _____________________________________________ Dr. Richard Boulanger Professor of Electronic Production and Design Professional Writing and Music Technology Division Berklee College of Music ______________________________________________ President of Boulanger Labs - http://boulangerlabs.com Author & Editor of The Csound Book - http://mitpress.mit.edu/books/csound-book Author & Editor of The Audio Programming Book - http://mitpress.mit.edu/books/audio-programming-book ______________________________________________ about: http://www.boulangerlabs.com/#about about: http://www.csounds.com/community/developers/dr-richard-boulanger/ music: http://www.csounds.com/community/developers/dr-richard-boulanger/dr-richard-boulanger-music/ ______________________________________________ email: rboulanger@berklee.edu facebook: https://www.facebook.com/richard.boulanger.58 On Thu, Apr 26, 2018 at 5:04 PM, jpff <jpff@codemist.co.uk> wrote: Thank you; that almost makes sense. I hope it is OK but I adjusted your example a little and used it (with acknowledgement) in the manual. |