As an approximation, you could use a bargraph, between 0 and 100 for example, and scale the value to display with the length of the file. Yann
Le mar. 25 sept. 2018 à 23:31, azvinz via Faudiostream-users < faudiostream-users@lists.sourceforge.net> a écrit : > okay, it is like it is ;) > > thank you! > > > On 09/25/2018 11:22 PM, Stéphane Letz wrote: > > The error message "ERROR : the parameter must be a constant value known > at compile time (the node of the tree is not a float nor an int) » is (this > time ((-;) quite explicit. It has to be known at compilation time, but the > sound length is discovered only when the program actually starts and the > file is loaded... so at runtime. > > > > I don’t see an easy to do what you want for now. > > > > Stéphane > > > > > >> Le 25 sept. 2018 à 23:08, azvinz <azv...@yahoo.de> a écrit : > >> > >> import("stdfaust.lib"); > >> > >> > >> // this triggers bass sample on each (very slow) pulse > >> process = bass, progressbargui : attach; > >> > >> trigger = ba.beat(120/32) : 1-_ ; > >> > >> playhead = (1:+~_*trigger: _*1); > >> > >> > >> sound = > soundfile("label[url:/media/sda7/Programming/Faust/Vinz4/bass.wav]",1) ; > >> bass = 0, playhead : sound : !,!,_; > >> > >> progressbar = 0,0 : sound : _,!,!; // get only the length of soundfile > in sample > >> > >> progressbargui = hbargraph("progress bar",0, progressbar); // put > length of soundfile as max value. Put an int instead of "progressbar" and > it should work > >> > >> > >> > >> > >> On 09/25/2018 10:17 PM, Stéphane Letz wrote: > >>> show me the code…. > >>> > >>>> Le 25 sept. 2018 à 22:14, azvinz via Faudiostream-users < > faudiostream-users@lists.sourceforge.net> a écrit : > >>>> > >>>> Hello Stéphane, > >>>> > >>>> I tried to put the sample length of a soundfile object into the > maximum value of a bargraph, but I get a compilation error. If there is a > way to make it work? this would be great, so one can use bargraphs as > progress bar for soundfiles. > >>>> > >>>> All the best > >>>> > >>>> Vince > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> Faudiostream-users mailing list > >>>> Faudiostream-users@lists.sourceforge.net > >>>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users > > > > _______________________________________________ > Faudiostream-users mailing list > Faudiostream-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/faudiostream-users >
_______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users