On Thursday 4 April 2013 at 20:39, joachim heintz wrote:
hi edward -on a first look (without testing), i'd say it should work. does it not?what is the problem?best -joachimAm 04.04.2013 17:48, schrieb Edward Costello:Hi,I have and instrument that is always on that reads 2 function tables ofaudio into 2 PVS buffers, basically a stereo signal. I then have anotherinstrument that reads from these PVS buffers and synthesises the databack into audio using a pvssynth. What I need to be able to do is havedifferent instances of this instrument reading from the stereo PVSbuffers at different offsets at the same time, is this possible? Or do Ihave to make separate PVS buffers for each instance?I have an example of what I mean here, you would think 20 instances ofthe PVSReader instrument would be louder.--Edward Costello<CsoundSynthesizer><CsOptions>-d</CsOptions><CsInstruments>sr = 44100ksmps = 256nchnls = 20dbfs=1#define ChannelOneTable #100##define ChannelTwoTable #101##define WarpPath #200#;; based off FileToPvsBuf example written by joachim heintz 2009opcode TableToPvsBuf, ikk, iiiiii_Table, i_FFTSize, i_Overlap, i_WindowSize, i_WindowShape xink_TimeInKCycles timeinstkif k_TimeInKCycles == 1 theni_Length = ftlen(i_Table) / srk_Cycles = i_Length * krk_Count init 0loop:f_FFTIn pvstanal 1, 1, 1, i_Table, 1, 0, 0i_Buffer, k_TimePointer pvsbuffer f_FFTIn, i_Length + (i_FFTSize / sr)loop_lt k_Count, 1, k_Cycles, loopxout i_Buffer, k_Count, k_TimePointerendifendopgi_FFTSize init 1024gk_TimePointer init 0instr 1, PVSBuffergi_Overlap = gi_FFTSize / 4i_WindowSize = gi_FFTSizei_WindowShape = 1; von-Hann windowgi_PVSBufferOneL, gk_HopCount, k0 TableToPvsBuf $ChannelOneTable,gi_FFTSize, gi_Overlap, i_WindowSize, i_WindowShapegi_PVSBufferOneR, gk_HopCount, k0 TableToPvsBuf $ChannelTwoTable,gi_FFTSize, gi_Overlap, i_WindowSize, i_WindowShapek_On init 0k_PVSReaderInstances = p4if k_On == 0 thenk_Count = 0until k_Count == k_PVSReaderInstances doevent "i", "PVSReader", 0, -1, gk_HopCount, k_Count + 200k_Count = k_Count + 1odk_On = 1endifgi_TimeInSeconds = ftlen($ChannelOneTable) / sr;i_PhasorCPS = 1/gi_TimeInSecondsgk_PhasorIndex phasor i_PhasorCPSendininstr 2, PVSReaderi_HopCount = p4i_TimeTableNumber = p5gi_TimeTable ftgen i_TimeTableNumber, 0, -i_HopCount, -7, 0, i_HopCount,gi_TimeInSecondsgk_TimePointer table gk_PhasorIndex , i_TimeTableNumber, 1f_ChannelOne pvsbufread gk_TimePointer, gi_PVSBufferOneLf_ChannelTwo pvsbufread gk_TimePointer, gi_PVSBufferOneRa_ChannelOne pvsynth f_ChannelOnea_ChannelTwo pvsynth f_ChannelTwoouts a_ChannelOne, a_ChannelTwoendin</CsInstruments><CsScore>f100 0 0 1"/Users/eddyc/Dropbox/SoftwareProjects/Audio-Mosaicing/Audio-Mosaicing/input.wav"0 0 1f101 0 0 1"/Users/eddyc/Dropbox/SoftwareProjects/Audio-Mosaicing/Audio-Mosaicing/input.wav"0 0 2i 1 0 -1 20e3600</CsScore></CsoundSynthesizer>Send bugs reports to the Sourceforge bug trackerDiscussions of bugs and features can be posted hereTo unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"