[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] File Player using SoundFileView



Hi James, 

Thanks for the Help. 
A couple of questions that I don't find more information.

The phase warning in BufRd help will be really a problem with larger audio Files? I'm using more than 15 minutes long files. 
I'm experiencing a lot of XRUN with BufRd that doesn't occur for me in much more complex codes! 

And (Sorry!!!), the last one. To setup the audio stream with actual (clicked) position of SoundFileView.timeCursorPostion the Phasor, startpoint argument is a ir or a Dynamic argument? In my tests, this argument seems to be a static argument.

Sorry, for the dummy questions!

Thanks



Em qui., 5 de dez. de 2019 às 06:39, <jamshark70@xxxxxxxxx> escreveu:
On Thu, Dec 5, 2019 at 10:48 AM <rael.gimenes@xxxxxxxxx> wrote:
> I need to create a Sound File Player in a GUI that we can use buttons like Play, Pause (to play/pause/resume) and Stop (to stop stream and send stream to it's beginning to a new play) to control the audio Stream, but I also need a chronometer synchronized with the audio stream and with the play/pause/resume/stop functions. I'm trying to figure out how to do that using SoundFileView. I have tried to find some ideas at the forum or other documents and could figure out how to solve this problem. I'm also trying to understand how to synchronize the .timeCursorPostion with an audio stream and how to use this cursor to position the audio stream. Anyone could send me some tips, or documentation, to help me find a way to solve this problem?

If loading the whole soundfile into a buffer:

b = Buffer.read(s, "...");

a = {
    var dur = BufDur.kr(b),
    phase = Line.ar(0, dur, dur, doneAction: 2);
    // 10 times per second, send back current frame
    SendReply.ar(Impulse.ar(10), '/phase', phase);
    BufRd.ar(2, b, phase);
}.play;

OSCdef(\sfviewUpdater, { |msg|
    { sfview.timeCursorPosition = msg[3] }.defer
}, '/phase');

If streaming from disk:

b = Buffer.cueSoundFile(s, "...", bufferSize: 65536);

a = { VDiskIn.ar(2, b) }.play;

OSCdef(\sfviewUpdater, { |msg|
    { sfview.timeCursorPosition = msg[3] }.defer
}, '/diskin');  // '/diskin' is documented under VDiskIn

hjh

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/


--
========================================
              Prof. Dr. Rael B. Gimenes Toffolo
                Diretor de Cultura - DCU - PEC
                Regente da Orquestra da UEM
Laboratório de Pesquisa e Produção Sonora - LAPPSO
                Departamento de Música - DMU
          Universidade Estadual de Maringá - UEM
       +55 44 3011-3878             +55 44 8845-5678
    rael.gimenes@xxxxxxxxx       rbgtoffolo@xxxxxx
========================================